ci: cache npm downloads in the translations workflow#40779
Merged
Conversation
Contributor
|
Bito Automatic Review Skipped - Files Excluded |
fe22bf1 to
ca2a760
Compare
sadpandajoe
approved these changes
Jun 5, 2026
villebro
approved these changes
Jun 5, 2026
The frontend-check-translations job in superset-translations.yml runs an uncached npm install via cached-dependencies — actions/setup-node has no `cache:` and the npm download cache is otherwise disabled — so it re-fetches the full package set from the registry on every run. Besides being slow, that makes the job prone to transient registry failures (e.g. ECONNRESET mid- download). Enable setup-node's built-in npm download cache, keyed on the frontend lockfile, matching the pattern applied to the other frontend-heavy workflows (pre-commit, E2E, Playwright). `npm ci` still does a clean install but skips re-downloading unchanged tarballs. This caches only ~/.npm (not node_modules), keeping it lightweight under the repo's cache budget. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ca2a760 to
e085d2b
Compare
Contributor
|
Bito Automatic Review Skipped – PR Already Merged |
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.
SUMMARY
The
frontend-check-translationsjob insuperset-translations.ymlruns anuncached npm install via the
cached-dependenciesaction —actions/setup-nodeis configured without
cache:, and the npm download cache is otherwise disabled(
# cache-restore npmis commented out inbashlib.sh). So it re-downloads thefull package set from the registry on every run.
Besides being slow, an uncached install is prone to transient registry failures.
This was observed concretely on #40744, where this exact job failed with
npm error code ECONNRESET/network abortedmid-download — unrelated to thatPR's changes.
This enables
setup-node's built-in npm download cache, keyed on thefrontend lockfile, matching the pattern applied to the other frontend-heavy
workflows in #40744 (
pre-commit, E2E, Playwright):npm cistill does a clean install but skips re-fetching unchanged tarballs.It caches only
~/.npm(notnode_modules), keeping it lightweight under therepo's cache budget.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — CI configuration only.
TESTING INSTRUCTIONS
CI-only. The first run on this workflow primes the cache; subsequent runs should
show a cache hit on the "Setup Node.js" step and a faster
npm ci.ADDITIONAL INFORMATION
Split out from #40744 so the translations workflow can be assessed separately.
🤖 Generated with Claude Code