fix(validation): cache npm dependencies in validation and RA workflows - #448
Draft
hdamker wants to merge 1 commit into
Draft
fix(validation): cache npm dependencies in validation and RA workflows#448hdamker wants to merge 1 commit into
hdamker wants to merge 1 commit into
Conversation
A cold `npm ci` of 297 packages ran on every validation job because neither reusable workflow's setup-node step requested a cache. When the runner-to-registry path degraded on 2026-09-04 that turned a ~44s run into ~206s average, cohort-wide.
Contributor
Author
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 type of PR is this?
bug
What this PR does / why we need it:
Neither reusable workflow requested an npm cache, so every validation job cold-fetched all 297 validation dependencies from the npm registry. When the runner-to-registry path degraded on 2026-09-04,
npm cistalled for up to five minutes per run across every API repository — measured on ReleaseTest as ~44s average wall time before, ~206s during — while still concludingsuccess, so it degraded time-to-validate rather than correctness. This addscache: npmto bothsetup-nodesteps that feed the sharedrun-validationaction, and trims the install invocation.run-validationthrough its ownsetup-nodestep.--no-audit --no-funddrop two round trips that produce no signal in CI;--prefer-offlineuses the restored cache rather than revalidating.Which issue(s) this PR fixes:
None — reported and diagnosed directly against the run history.
Special notes for reviewers:
cache-dependency-pathdiffers by prefix between the two workflows because they check tooling out under different paths.tooling-ci.ymlalready uses this pattern for its own npm jobs.Two limits: the cache is scoped to the calling repository, since GitHub runs a called reusable workflow's job in the caller's execution context, so each consuming repository warms its own entry and still pays one cold install after a lockfile bump or a cache eviction. And the request that stalled was never identified from the logs — the tarball store is the likely site for a lockfile-driven
npm ci, but that is inference. Prebuilding dependencies would remove the registry entirely and remains available if this recurs.The change cannot be exercised from a fork branch, since callers pin the workflow file at a ref in this repository. After merge the validation path is covered by the regression canary, whose path filter includes both changed locations; the release-automation path has no canary coverage and needs one snapshot dispatch.
actionlintpasses locally with the argument set fromtooling-ci.yml.Changelog input
Additional documentation
This section can be blank.