From fcdda55454effbf09e87bc43bac946ed6ed64348 Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Fri, 10 Jul 2026 04:54:35 -0300 Subject: [PATCH] Move e2e npm registry cache out of the node-cache- namespace (#37427) The e2e npm registry cache keyed on node-cache---npm-e2e-, sharing the node-cache- prefix that actions/setup-node generates automatically for its built-in npm cache (node-cache---npm-). Because the arch segment differs only by case (setup-node uses Node's process.arch 'x64'; this action uses runner.arch 'X64') and GitHub matches restore-key prefixes case-insensitively, the two buckets share a common prefix. A future broad restore-key such as node-cache---npm- could then cross-restore one bucket's ~/.npm into the other. Rename the key to e2e-npm-registry---, giving it a distinct namespace that is not a prefix of node-cache- in either direction and matches the repo's content-descriptive e2e cache keys (e2e-cypress-deps-, e2e-playwright-deps-, e2e-platform-pkgs-). Existing entries orphan and age out; the daily warm job repopulates under the new key on next run. --- .github/actions/restore-e2e-npm-cache/action.yml | 4 ++-- .github/workflows/e2e-ci-cache-warm.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/restore-e2e-npm-cache/action.yml b/.github/actions/restore-e2e-npm-cache/action.yml index df1b7b70403..e2be400f881 100644 --- a/.github/actions/restore-e2e-npm-cache/action.yml +++ b/.github/actions/restore-e2e-npm-cache/action.yml @@ -8,6 +8,6 @@ runs: uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: ~/.npm - key: node-cache-${{ runner.os }}-${{ runner.arch }}-npm-e2e-${{ hashFiles('e2e-tests/cypress/package-lock.json', 'e2e-tests/playwright/package-lock.json', 'api/package-lock.json') }} + key: e2e-npm-registry-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('e2e-tests/cypress/package-lock.json', 'e2e-tests/playwright/package-lock.json', 'api/package-lock.json') }} restore-keys: | - node-cache-${{ runner.os }}-${{ runner.arch }}-npm-e2e- + e2e-npm-registry-${{ runner.os }}-${{ runner.arch }}- diff --git a/.github/workflows/e2e-ci-cache-warm.yml b/.github/workflows/e2e-ci-cache-warm.yml index bd77695f867..007b7a697a2 100644 --- a/.github/workflows/e2e-ci-cache-warm.yml +++ b/.github/workflows/e2e-ci-cache-warm.yml @@ -44,7 +44,7 @@ jobs: uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: ~/.npm - key: node-cache-${{ runner.os }}-${{ runner.arch }}-npm-e2e-${{ hashFiles('e2e-tests/cypress/package-lock.json', 'e2e-tests/playwright/package-lock.json', 'api/package-lock.json') }} + key: e2e-npm-registry-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('e2e-tests/cypress/package-lock.json', 'e2e-tests/playwright/package-lock.json', 'api/package-lock.json') }} lookup-only: true - name: ci/setup-node @@ -75,4 +75,4 @@ jobs: uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: path: ~/.npm - key: node-cache-${{ runner.os }}-${{ runner.arch }}-npm-e2e-${{ hashFiles('e2e-tests/cypress/package-lock.json', 'e2e-tests/playwright/package-lock.json', 'api/package-lock.json') }} + key: e2e-npm-registry-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('e2e-tests/cypress/package-lock.json', 'e2e-tests/playwright/package-lock.json', 'api/package-lock.json') }}