mirror of
https://github.com/mattermost/mattermost.git
synced 2026-08-26 21:27:40 -05:00
Move e2e npm registry cache out of the node-cache- namespace (#37427)
The e2e npm registry cache keyed on node-cache-<os>-<arch>-npm-e2e-, sharing the node-cache- prefix that actions/setup-node generates automatically for its built-in npm cache (node-cache-<os>-<arch>-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-<os>-<arch>-npm- could then cross-restore one bucket's ~/.npm into the other. Rename the key to e2e-npm-registry-<os>-<arch>-, 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.
This commit is contained in:
@@ -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 }}-
|
||||
|
||||
@@ -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') }}
|
||||
|
||||
Reference in New Issue
Block a user