Repository navigation
ci: the ci-duration report retries a server error on its job listing - #8744
Conversation
…sting The report's one request lists every job of the run with its steps, and GitHub answered it 502 Server Error after 10.4 s on run 40555065036; github-script, at its default of no retries, failed the job on that one response. The guard now requires the step to set `retries`, with no server error among the codes the action exempts. Fails on main, where the step sets none.
Its one request lists every job of the run with its steps; on run 40555065036 GitHub answered it 502 Server Error after 10.4 s (its gateway limit), and github-script's default of no retries failed the report on that one response, a red no pull request's change had caused. The step now sets `retries: 3`: the action retries a server error with backoff, and the client errors it exempts (400, 401, 403, 404, 422) stay final.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Recommended for approval: retries: 3 on the ci-duration step lets one transient server error on its job listing be retried instead of turning the check red, and the new guard case fails without it. One optional nit: the "exempt client errors stay final" comments slightly overstate, since the retry plugin can still re-send a 403 or 404 back to back before the step fails (see the inline note).
[Automated review]
| with: | ||
| # The listing is one request for every job of the run with its | ||
| # steps, and GitHub can answer it 502 at its gateway limit: retry a | ||
| # server error. The action's exempt client errors stay final. |
There was a problem hiding this comment.
Nit (optional): "stay final" may overstate. @octokit/plugin-retry's limiter re-runs any failed request while the request's retries count remains, and the exempt list only skips the backoff, so with retries: 3 a 403 or 404 here can go out four times, back to back, before the step fails. The outcome is still an immediate failure, so wording such as "exempt client errors still fail, without backoff" would be exact; the comment in ci-duration-guard.test.mjs says the same.
User impact
A pull request's
ci-durationcheck can go red for a reason no change caused: #8689's run 40555065036 failed it withUnhandled error: HttpError: Server Error. The job only reports durations (continue-on-error), but its red still reads as the pull request's.Problem and solution fit
502 Server Errorafter 10.4 s, its gateway limit. The same request takes about 2 s at rest.actions/github-scriptretries nothing by default, so one server error ends the step.The step now sets
retries: 3: the action retries a server error with backoff, and the client errors it exempts (400, 401, 403, 404, 422) stay final, so a real permission or missing-run error still fails at once.Expected behavior and authority
The report "lists each job's run time once every pull-request job has finished" (#8427,
.github/scripts/ci-duration-guard.test.mjs). One transient server error should not stop it.Smallest restoration
One
with:input on one step, and a guard case. The script is unchanged; smaller pages were measured and left out (30 jobs: 1.7 s, all 52: 2.1 s).Evidence
actions/github-script@v9bundle (3a2844b7e9) ran the step's own script and inputs from main'sci.ymlagainst a local API whose first listing answers 502: exit 1,::error::Unhandled error: HttpError: Server Error, one request, no summary, as in CI.ci.yml: exit 0, two requests (the 502, then the run's real 52-job listing), and the duration table written.needsandcontinue-on-errorare untouched; the guard's other 23 cases pass.retriesof at least 1 with no server error among the exempt codes; it fails on main.No repository test executes a step's retry: it lives in the action, not the inline script, so the forced 502 above is the behavioral proof.
Scope
Testing
pnpm exec vitest run .github/scripts/ci-duration-guard.test.mjs: 24 passed; the new case fails on main.pnpm exec vitest run --project node .github/scripts: 74 files, 1385 tests.CI=true pnpm lint;pnpm check:changesets.