ci: keep a stalled pnpm bootstrap from cancelling a green run - #894
Open
kmonsoe wants to merge 1 commit into
Open
ci: keep a stalled pnpm bootstrap from cancelling a green run#894kmonsoe wants to merge 1 commit into
kmonsoe wants to merge 1 commit into
Conversation
Three of four first attempts on main on 2026-09-04 lost ~7 min inside pnpm/action-setup, a step that normally takes 4 s. The build job then ran out of its 15 min budget during Test, GitHub reported the job as cancelled rather than failed, and the release job was skipped, so a green push produced no publish until someone ran `gh run rerun --failed`: - run 33863649886 attempt 1: setup 10:32:46Z -> 10:39:49Z (7m03s), Test cancelled at 10:47:36Z, release skipped. Rerun passed in 9m34s. - run 33867350482 attempt 1: setup 11:19:14Z -> 11:26:18Z (7m04s), Test cancelled at 11:34:09Z, release skipped. Rerun passed in 11m15s. - run 33863399119 was different: superseded by the next push through the concurrency group, not a stall. The same runs show the stall is not specific to the build job. In 33863649886 the e2e job's setup also took 7m03s (it survived only because e2e has more slack), and in 33867350482 the license job's setup took 7m08s, turning a 30-second job into a 7.5-minute one. The step logs show where the time went. pnpm/action-setup v6.0.10 bootstraps by writing a package.json for pnpm@11.19.0 and running `npm ci` against registry.npmjs.org, then runs `pnpm self-update 10.28.0` to reach the version in packageManager. In all three stalled jobs the group opens, nothing is printed for seven minutes, and then npm reports `added 1 package in 7m`. No retry or HTTP error is logged, and the self-update download that follows completes in under a second. Three independent runners landing within five seconds of each other points at a timeout inside npm on a hung registry connection, not at slow transfer. The alternative install shapes don't avoid that path: `standalone: true` runs the same `npm ci` for @pnpm/exe, and corepack fetches from the same registry while being deprecated on the Node 24 that .nvmrc (lts/krypton) resolves to. Timeouts are the fix that matches the evidence. Two changes, nothing else in the workflow touched: - The build job's timeout-minutes goes 15 -> 25. A healthy run takes 9-11 min, so 15 left no room for the stall; 25 lets a run that absorbed one still finish and publish. - Every pnpm/action-setup step (build, release, licenses, e2e) gets timeout-minutes: 3. A genuine stall now fails that step at three minutes, visibly and attributed to the right step, instead of silently spending the job's budget so that Test gets cancelled downstream. Verified with actionlint 1.7.12 (no findings), a YAML parse asserting the build timeout and that all four pnpm/action-setup steps carry the step timeout, and a grep of the file. No changeset accompanies this: nothing under packages/ changed.
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.
Problem
Three of four first attempts on
maintoday (2026-09-04) lost ~7 minutes insidepnpm/action-setup, a step that normally takes 4 s. The build job then ran out of its 15-minute budget during Test, GitHub reported the job as cancelled rather than failed,release (changesets)was skipped, and a green push produced no publish until a manualgh run rerun --failed.The stall is not specific to the build job. In 33863649886 the e2e job's setup also took 7m03s (it survived only because e2e has more slack), and in 33867350482 the license policy job's setup took 7m08s, turning a 30-second job into a 7.5-minute one.
What the logs show
pnpm/action-setupv6.0.10 bootstraps by writing apackage.jsonforpnpm@11.19.0, runningnpm ciagainst registry.npmjs.org, thenpnpm self-update 10.28.0to reach thepackageManagerversion. In all three stalled jobs the log is identical:No retry or HTTP error is logged, and the self-update download that follows completes in under a second. Three independent runners landing within five seconds of each other points at a timeout inside npm on a hung registry connection, not slow transfer.
The alternative install shapes don't avoid that path, so this PR doesn't switch to them:
standalone: trueruns the samenpm ci(for@pnpm/exe), and corepack fetches from the same registry while being deprecated on the Node 24 that.nvmrc(lts/krypton) resolves to. No upstream issue tracks this and v6.0.10 (2026-08-03) is the latest release.Change
Two edits to
.github/workflows/ci.yml, nothing else touched:timeout-minutes: 15 → 25. A healthy run takes 9–11 min, so 15 left no room for the stall; 25 lets a run that absorbed one still finish and publish.timeout-minutes: 3on everypnpm/action-setupstep (build, release, licenses, e2e). A genuine stall now fails that step at three minutes, visibly and attributed to the right step, instead of silently spending the job's budget so that Test gets cancelled downstream. The release job is included because a stall there would block publishing just the same.Verification
actionlint1.7.12: no findings.jobs.build.timeout-minutes == 25and that all fourpnpm/action-setupsteps carrytimeout-minutes: 3.grep -nA1 'pnpm/action-setup@'shows the step timeout on every occurrence.No changeset: nothing under
packages/changed (same as #887).🤖 Generated with Claude Code