Repository navigation
fix(builds): persist readiness across cache eviction - #15135
Conversation
|
Review complete. 🟡 1 medium 💬 Inline comments (1)
Build-job callback deduplication moves from ephemeral cache markers to a persisted string-array
Reviewed commit: 5db39a2 |
🟢 Tier S · Ready to mergeBuild readiness is derived from persisted deployment state and the stored output artifact, while cache remains responsible for callback deduplication. Callback processing persists build duration and completion, updates terminal deployment state and activation together, and resets build-specific fields when deployments are queued. The deployment unit test covers reset behavior and callback subscription for manual uploads. Latest changes: The newest commits clear inherited build duration and completion timestamps when queuing a deployment and assert that both values are reset by the upload flow.
📂 Walkthrough · 3
Reviewed the commits since |
Security rulesNo new WARNING or ERROR findings from security rules. 6 existing findings tracked in
|
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
There was a problem hiding this comment.
This PR replaces the in-memory cache markers used to deduplicate Functions build-job callbacks with a persisted callbacks attribute on deployments, restructures detection and finalization in the Jobs worker, adds the V25 migration and collection-schema entry, and pins the new contract with a dedicated e2e suite.
Key findings
- 🟡 Adapter mismatch missed when site adapter pre-set before manifest — Jobs.php:784
Successful Sites and Functions builds can remain
buildingif a readiness marker disappears from cache. Readiness now joins existing deployment fields with the stored output artifact; cache is used only for event deduplication.buildDuration, including zero runtime. Complete recordsbuildEndedAt.staticorssr; an empty/failed manifest retains the configured site adapter or uses the static default. Configured fallback files are preserved.No new attribute, schema preparation or migration is required. Drain builds before replacing Jobs consumers: previously queued deployments can contain an inherited adapter, and mixed worker versions use different completion semantics. Already-lost callbacks require reconciliation or rebuilding. Cloud rollout is tracked in appwrite-labs/cloud#7123.
Validation: Deployment library suite passed (51 tests), plus 24 temporary public-worker scenarios covering reordered callbacks, cache loss, zero runtime, delayed unmeasured exits, manifest failures, adapter races, cancellation and retries.
JobsCallbacksTestremains deleted from the repository as requested. Targeted Pint, PHPStan, Rector and monorepo validation passed. CI runs the existing Functions and Sites E2E lanes; the temporary SQLite/storage checks do not replace a staging drill through the real orchestrator, queue, S3 and Cloud edge distribution.Related: appwrite-labs/cloud#7123