ci: stop pre-cloning an action that never runs - 22-36 s off every test leg #1689

Closed
jaylouisw wants to merge 0 commits from ci/1116-1621 into main
Owner

What was slow

Every leg of Test (Node 18/20/22) paid 22-36 s before its first step, to pre-clone an action that never executes.

Baseline (run 3887, main 268ddd58, 16:20-16:22, all green):

job task duration gap before first step
Test (Node 18) 8604 81 s 28 s
Test (Node 20) 8605 83 s 27 s
Test (Node 22) 8606 93 s 32 s

The gap is the runner fetching actions/setup-node@v4 for the job's `uses:` list before any step runs:

16:20:54  ☁  git clone 'https://data.forgejo.org/actions/setup-node' # ref=v4
16:21:16  ⭐ Run Main actions/checkout@v4          <- 22 s later
16:22:08  skipping post step for 'actions/setup-node@v4'; main step was skipped

Same shape in earlier runs: 3877 (PR #1686) Node 22 = 32 s, 3884 = 36 s. In none of them did setup-node run - Node 20 excludes it by if:, and the 18/22 legs had already installed the pinned tarball. It was not an independent fallback either: setup-node downloads from nodejs.org/dist, the same host and tarball the step above it fetches.

Change

Removed the actions/setup-node@v4 fallback step. The hedge it provided is kept as a second attempt inside the download step: curl's own retries, then one more attempt after 5 s with a clean destination each time (so a truncated tarball cannot be bolted onto).

Verified in the real runner image (node:20-bookworm):

  • happy path, MAJOR=18: installed /usr/local/bin/node: v18.20.8 / npm 10.8.2
  • failure path (unreachable host): two attempts, exit 7, no fake runtime left behind, so The runtime is the version this leg is named for still fails the leg loudly

Coverage unchanged

  • matrix still [18, 20, 22], fail-fast: false, all three legs still run npm test + scripts/syntax-check.js and all four static checks and both example steps.
  • the major-version assertion step is byte-for-byte unchanged - it is what actually gates a wrong runtime.
  • no check weakened or removed; only a redundant second install path that never executed.
## What was slow Every leg of `Test (Node 18/20/22)` paid 22-36 s before its first step, to pre-clone an action that never executes. **Baseline (run 3887, main `268ddd58`, 16:20-16:22, all green):** | job | task | duration | gap before first step | |---|---|---|---| | Test (Node 18) | 8604 | 81 s | 28 s | | Test (Node 20) | 8605 | 83 s | 27 s | | Test (Node 22) | 8606 | 93 s | 32 s | The gap is the runner fetching `actions/setup-node@v4` for the job's \`uses:\` list before any step runs: ``` 16:20:54 ☁ git clone 'https://data.forgejo.org/actions/setup-node' # ref=v4 16:21:16 ⭐ Run Main actions/checkout@v4 <- 22 s later 16:22:08 skipping post step for 'actions/setup-node@v4'; main step was skipped ``` Same shape in earlier runs: 3877 (PR #1686) Node 22 = 32 s, 3884 = 36 s. In none of them did setup-node run - Node 20 excludes it by `if:`, and the 18/22 legs had already installed the pinned tarball. It was not an independent fallback either: `setup-node` downloads from `nodejs.org/dist`, the same host and tarball the step above it fetches. ## Change Removed the `actions/setup-node@v4` fallback step. The hedge it provided is kept as a second attempt *inside* the download step: curl's own retries, then one more attempt after 5 s with a clean destination each time (so a truncated tarball cannot be bolted onto). Verified in the real runner image (`node:20-bookworm`): - happy path, MAJOR=18: `installed /usr/local/bin/node: v18.20.8 / npm 10.8.2` - failure path (unreachable host): two attempts, exit 7, no fake runtime left behind, so `The runtime is the version this leg is named for` still fails the leg loudly ## Coverage unchanged - matrix still `[18, 20, 22]`, `fail-fast: false`, all three legs still run `npm test` + `scripts/syntax-check.js` and all four static checks and both example steps. - the major-version assertion step is byte-for-byte unchanged - it is what actually gates a wrong runtime. - no check weakened or removed; only a redundant second install path that never executed.
ci: stop pre-cloning an action that never runs - 22-36 s off every test leg
All checks were successful
CI / Classify the change (pull_request) Successful in 13s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 20s
CI / Server smoke test (pull_request) Successful in 18s
CI / Docker build (pull_request) Successful in 24s
CI / Test (Node 20) (pull_request) Successful in 55s
CI / Test (Node 18) (pull_request) Successful in 1m0s
CI / Test (Node 22) (pull_request) Successful in 1m1s
88fb4d0237
The test matrix kept actions/setup-node@v4 as a fallback for the pinned
Node tarball download. The runner pre-fetches every `uses:` action of a
job before its first step, including a step whose `if:` is false, and it
does not reuse that clone between runs - so all three legs paid for it:

  run 3877 (#1686) Node 22: setup-node cloned 16:14:17, first step 16:14:49
  (32 s), then 'skipping post step for actions/setup-node@v4; main step
  was skipped'. run 3884: 36 s. run 3887: 22 s / 27 s / 32 s.

The step never executed in any of them: Node 20 excludes it by `if:` and
the 18/22 legs had already installed from the tarball. It was never an
independent path either - setup-node fetches from nodejs.org/dist, the
same host and tarball the step already uses.

So the fallback is now a second attempt inside the step (curl's retries,
then one more after 5 s, with a clean dest each time), which keeps the
hedge without the pre-clone. The major-version assertion after it is
untouched, so the job still fails loudly if the runtime is not the one
the leg is named for.
jaylouisw scheduled this pull request to auto merge when all checks succeed 2026-11-16 16:32:10 +00:00
jaylouisw force-pushed ci/1116-1621 from 88fb4d0237
All checks were successful
CI / Classify the change (pull_request) Successful in 13s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 20s
CI / Server smoke test (pull_request) Successful in 18s
CI / Docker build (pull_request) Successful in 24s
CI / Test (Node 20) (pull_request) Successful in 55s
CI / Test (Node 18) (pull_request) Successful in 1m0s
CI / Test (Node 22) (pull_request) Successful in 1m1s
to 5556fb3d14
All checks were successful
Auto-rebase / Rebase open PRs and arm auto-merge (push) Successful in 14s
CI / Classify the change (push) Successful in 12s
Closed request audit / audit (push) Successful in 13s
CI / Server smoke test (push) Successful in 21s
CI / Docker build (push) Successful in 26s
CI / Test (Node 20) (push) Successful in 57s
CI / Test (Node 18) (push) Successful in 1m1s
CI / Test (Node 22) (push) Successful in 1m2s
CI / Classify the change (pull_request) Successful in 15s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 13s
CI / Server smoke test (pull_request) Successful in 12s
CI / Docker build (pull_request) Successful in 24s
CI / Test (Node 20) (pull_request) Successful in 1m0s
CI / Test (Node 18) (pull_request) Successful in 1m5s
CI / Test (Node 22) (pull_request) Successful in 58s
2026-11-16 16:32:12 +00:00
Compare
Author
Owner

Closing as superseded: this branch holds no unique work. Its head 5556fb3d is already an ancestor of origin/main � the same CI change went in as #1688 ("ci: stop pre-cloning an action that never runs - 22-36 s off every test leg"), so this PR has an empty diff (0 files, 0 additions, 0 deletions).

No action needed from the ci loop on this one; further CI work should branch from the current main (656fbe3b).

Closing as superseded: this branch holds no unique work. Its head `5556fb3d` is already an ancestor of `origin/main` � the same CI change went in as **#1688** ("ci: stop pre-cloning an action that never runs - 22-36 s off every test leg"), so this PR has an empty diff (0 files, 0 additions, 0 deletions). No action needed from the `ci` loop on this one; further CI work should branch from the current `main` (`656fbe3b`).
jaylouisw closed this pull request 2026-11-16 16:39:46 +00:00
All checks were successful
Auto-rebase / Rebase open PRs and arm auto-merge (push) Successful in 14s
CI / Classify the change (push) Successful in 12s
Closed request audit / audit (push) Successful in 13s
CI / Server smoke test (push) Successful in 21s
CI / Docker build (push) Successful in 26s
CI / Test (Node 20) (push) Successful in 57s
CI / Test (Node 18) (push) Successful in 1m1s
CI / Test (Node 22) (push) Successful in 1m2s
CI / Classify the change (pull_request) Successful in 15s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 13s
CI / Server smoke test (pull_request) Successful in 12s
CI / Docker build (pull_request) Successful in 24s
CI / Test (Node 20) (pull_request) Successful in 1m0s
CI / Test (Node 18) (pull_request) Successful in 1m5s
CI / Test (Node 22) (pull_request) Successful in 58s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!1689
No description provided.