Incorrect architecture definition for cache key
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- node.js, typescript
Direzione di ricerca
Inizia da src/cache-restore.ts alla riga 25 e segui come viene selezionata l’architettura della cache per setup-node. Riproduci il problema con i due workflow macos-latest nell’issue, quindi verifica che le build x64 e arm64 utilizzino cache separate in base all’architettura richiesta anziché a quella dell’host.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description:
The architecture used to pull the cache is based on the runner's host architecture and not the architecture key supplied to the action. This problem manifests when running two pipelines that use the same host runner but build for different architectures. In this case the action which is building for an architecture that is different from the host will try to pull the cache for it's host architecture which causes the build to fail. The current solution is to only use caching for the pipeline where the host architecture matches the build architecture which is not ideal.
Action version:
Latest
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
all
Repro steps:
Make two actions pipelines with macos-latest and run with a package.json that include native modules:
for x86_64
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.17.0'
cache: 'yarn'
architecture: 'x64'
- name: Install dependencies with Yarn
run: npm_config_arch=x64 yarn install --frozen-lockfile --verbose
for arm64
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.17.0'
cache: 'yarn'
- name: Install dependencies with Yarn
run: yarn install --frozen-lockfile --verbose
Expected behavior:
These pipelines should have separate caches because they are specifying different architectures even though the host architecture is the same.
Actual behavior:
They pull the same cache key because the key is derived from the runner os architecture instead of the specified architecture in the action.
https://github.com/actions/setup-node/blob/89d709d423dc495668cd762a18dd4a070611be3f/src/cache-restore.ts#L25
- Lingua principale
- TypeScript
- Stelle
- 5k
- Fork
- 1.7k
- Merge medio
- 2g 11h
- PR unite (30g)
- 3
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di actions/setup-node
-
feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
actions/setup-node#1531 · 1 commento · 4 reazioni ·
-
feature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
actions/setup-node#1634 · 1 commento ·
-
actions/setup-node#1628 · 3 commenti · 1 assegnatario ·
-
`npm config get cache` fails with `EBADDEVENGINES` when requiring newer npm versions in `devEngines` Apertafeature request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
actions/setup-node#1553 · 12 commenti · 2 reazioni ·
-
feature request
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
actions/setup-node#1428 · 1 commento · 3 reazioni ·
Tutte le issue di actions/setup-node
Issue simili
-
blocklist removal
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
pastelsky/bundlephobia#1122 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100