Repository navigation
Fix build timeout overrides and duration reporting - #13582
Merged
Merged
Conversation
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
loks0n
force-pushed
the
codex/fix-build-timeout-reporting
branch
from
September 9, 2026 15:05
ec1d696 to
93108fe
Compare
loks0n
marked this pull request as ready for review
September 9, 2026 15:05
Contributor
|
loks0n
force-pushed
the
codex/fix-build-timeout-reporting
branch
from
September 14, 2026 10:45
811e60e to
6b323da
Compare
loks0n
force-pushed
the
codex/fix-build-timeout-reporting
branch
from
September 14, 2026 11:28
6b323da to
2b147bf
Compare
Member
Author
|
@greptileai please re-review the current head. The sole remaining finding was withdrawn in discussion_r4005831648 after verifying PHPUnit argument semantics; please refresh the summary to reflect that review. |
1 of 2 tasks
NancyWei123
pushed a commit
to NancyWei123/appwrite
that referenced
this pull request
Sep 30, 2026
When a build's exit callback carries no measured duration, Jobs::duration() falls back to wall clock since buildStartedAt. appwrite#13582 removed the clamp from appwrite#13430 so measured durations past the timeout (termination grace) are kept, but that also left the fallback unbounded: an exit reported seven weeks after its build started was billed as 50 days of build compute. The build's timeout now travels in the job's meta and comes back on its exit callback. The fallback is capped at that timeout plus the 300s of headroom Deployments already grants the build's credentials, or at _APP_COMPUTE_BUILD_TIMEOUT for jobs submitted before this change. Measured durations are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Build submission always read the global timeout, so downstream editions could not apply a project-specific budget. Require a numeric timeout on each
createFromUpload,createFromRef,createFromUrl, andcreateFromVcscall. The service stores no timeout. The submitted value governs the job, ephemeral API key, and source-download token.HTTP actions pass the configured build budget through shared redeployment helpers. Queued template builds pass the timeout already in their message. The existing VCS tenant-validation hook may return a tenant budget; otherwise webhook creation uses the operator setting. CE receives no plan object.
Completed jobs also capped
buildDurationat the global timeout. Persist the orchestrator exit callback'sdurationSecondsand preserve it through the artifact/completion join, including zero-runtime failures. Older callbacks retain an uncapped elapsed-time fallback. A 1,341.36-second worker now records 1,342 seconds instead of 900, and delayed callbacks do not inflate measured runtime. Output-upload failures finalize immediately, with nullable duration left unknown if exit has not arrived. A late exit fills duration and publishes usage once without repeating finalization; if exit is lost, the build remains failed and unknown compute is not billed. Build usage consumes that same measurement. CE gains no plan or billing-entitlement dependency.Test Plan
51b91bb3a22ecd467875eb86639226fea20be397, including Functions, Sites, Realtime and Migrations. Greptile reviewed this head at 5/5.Related PRs and Issues
Companion Cloud PR: https://github.com/appwrite-labs/cloud/pull/5744. It supplies the owning organization's timeout and pins this commit. Merge CE first; update the downstream pin if the merge changes the commit SHA.
Checklist