Repository navigation
Conversation
Co-Authored-By: Claude Code <noreply@anthropic.com>
Contributor
Failing CI jobsCommit: e72eba7 | About building and testing Next.js |
| // time out. | ||
| if (this._startPromise && !this._deployEndedAt) { | ||
| await Promise.race([ | ||
| this._startPromise.catch(() => {}), |
Contributor
eps1lon
added this pull request to stack #99785
October 7, 2026 09:46
eps1lon
removed this pull request from stack #99785
October 7, 2026 10:02
Member
Author
|
Closing in favor of a simpler approach (get deployment ID synchronously at deploy start, time from there) to be done separately. |
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.
Adds queue-vs-build timing instrumentation to deploy tests, motivated by the
-c 8experiment in #99770 where deploy shard failures were all 240s hook timeouts and the queue-vs-build split had to be inferred from logs (remote builds took 21–31s while deployments took ~5min wall — the rest was Vercel-side queueing).Per deployment, a
[deploy-timing]line is logged, split from the deployment's lifecycle timestamps (createdAt/buildingAt/readyfromGET /v13/deployments/:idOrUrl, using the same token and team scope the deploy itself used):Reported on all three paths:
deploy(), after the CLI returns)throwDeploymentError()) — distinguishes queue time from build time on failed buildsdestroy()): jest runsafterAlleven whenbeforeAlltimes out, sodestroy()now gives an in-flight deployment a bounded 90s grace to settle, then reports timings. If it still hasn't settled, a[deploy-timing] … timings unavailableline is logged instead.To make the timeout path reachable,
nextTestSetup'safterAllnow always destroys the instance: previouslyawait next?.destroy()silently skipped teardown when thebeforeAllhook never resolved (jest timeout), leaving the running deployment to the module-level leak-detectorafterAll(which then also failed the suite with "next instance not destroyed"). TheafterAllnow tracks the in-flightcreateNextpromise, waits a bounded 30s grace, and falls back to the registered instance — so teardown runs, deployments settle enough to be timed, and the leak detector stays quiet. Both graces are sized to stay well under the 240s deploy hook timeout.Safety: instrumentation can never fail a test — the API call is wrapped and only ever logs, and it no-ops when there is no token/scope (custom deploy script path) or no identifiable deployment.
Not included (deliberately): a shard-level post-step listing the run's deployments via the API — it would mix in unrelated deployments sharing the same Vercel project.