Skip to content

fix: subscribe manual builds to artifact callbacks - #13581

Merged
loks0n merged 2 commits into
mainfrom
codex/manual-build-artifact-callbacks
Sep 9, 2026
Merged

loks0n merged 2 commits into
mainfrom
codex/manual-build-artifact-callbacks

Conversation

@loks0n

@loks0n loks0n commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Always subscribe build jobs to artifact callbacks. A manually uploaded function using local build storage previously omitted this subscription, so a source extraction failure before the worker started could not reach the deployment handler. Remote output uploads, templates, and sites retain their existing subscriptions.

Test Plan

  • A regression drives createFromUpload() through the real orchestrator PHP SDK, captures the outgoing HTTP request, and verifies that the queued deployment subscribes to artifact failures.
  • The focused test passes on the current main base; it was observed failing with the subscription change removed before rebasing.
  • Together with the Cloud companion, 15 PHP tests / 65 assertions pass using installed local dependencies and a focused bootstrap. Pint passes for changed PHP files.
  • No cluster E2E or staging deployment was performed. The cloud-to-orchestrator-to-Kubernetes seam has not been exercised end to end.

Related PRs and Issues

Checklist

  • Have you read the Contributing Guidelines?
  • API metadata/spec updates (not applicable: no HTTP metadata changes).

@greptile-apps

greptile-apps Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge, with no outstanding blocking findings.

Summary

  • Adds CallbackEvent::Artifact unconditionally to build-job callback subscriptions.
  • Adds a regression test covering the serialized callback subscription for manual uploads.
  • Renames the test since the previous review to accurately describe the boundary it verifies.

Comment thread src/Appwrite/Deployment/Deployments.php Resolved
@github-actions

github-actions Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → codex/manual-build-artifact-callbacks (after).

Metric Before After Change
🚀 Requests/sec 207.4 197.75 ⚪ -4.7%
⏱️ Latency P50 83.77 ms 87.59 ms ⚪ +4.6%
⏱️ Latency P95 196.14 ms 209.58 ms 🔴 +6.9%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 87.59 209.58 12,540 197.75 +13.44
Account 175.21 319.21 660 11.17 +26.49
TablesDB 83.26 151.52 6,820 110.51 -1.54
Storage 83 181.79 3,300 55.02 +13.62
Functions 132.29 268.81 1,760 30.06 +29.98

Top API waits (after)

API request Max wait (ms)
account.name.update 678.15
functions.variables.update 561.34
functions.create 547.24
functions.variables.create 541.9
storage.buckets.create 478.94

@loks0n

loks0n commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

@greptileai Please re-review. The extraction-failure concern is addressed in the thread with the existing orchestrator Failed-to-exit lifecycle; all CI checks are green.

@loks0n
loks0n merged commit f31509d into main Sep 9, 2026
47 checks passed
@ChiragAgg5k ChiragAgg5k mentioned this pull request Sep 10, 2026
2 of 4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant