You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/06/04 19:59:34 UTC

(superset) 01/01: ci: cache npm downloads in the translations workflow

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch ci/npm-cache-translations
in repository https://gitbox.apache.org/repos/asf/superset.git

commit fe22bf1b5a285b9f95c3638f550db8e03aab63e0
Author: Claude Code <no...@anthropic.com>
AuthorDate: Thu Jun 4 12:59:04 2026 -0700

    ci: cache npm downloads in the translations workflow
    
    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 <no...@anthropic.com>
---
 .github/workflows/superset-translations.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/superset-translations.yml b/.github/workflows/superset-translations.yml
index 784ef1457b5..6468be57d0b 100644
--- a/.github/workflows/superset-translations.yml
+++ b/.github/workflows/superset-translations.yml
@@ -41,6 +41,8 @@ jobs:
         uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
         with:
           node-version-file:  './superset-frontend/.nvmrc'
+          cache: 'npm'
+          cache-dependency-path: 'superset-frontend/package-lock.json'
       - name: Install dependencies
         if: steps.check.outputs.frontend
         uses: ./.github/actions/cached-dependencies