Github Action fails to save cache on Linux
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 72/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- bash, github-actions, react-native, typescript
Piste de recherche
Start in action.yml at the "Plan Metro cache save" step and the snapshot-metro / plan-metro-save commands it calls. Trace how snapshot-metro writes the JSON snapshot to GITHUB_OUTPUT and how INPUT_METRO_SNAPSHOT reaches plan-metro-save, then write the snapshot under .harness/ and pass only its path. Done means an Android run restoring a ~2,100-file Metro cache no longer hits "Argument list too long" and the cache-save plan still works.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the bug
On Linux runners the GitHub Action fails in the "Plan Metro cache save" step once a Metro cache has been restored. The tests themselves pass:
An error occurred trying to start process '/usr/bin/bash' with working directory '.../examples/anoncreds-react-native-example'. Argument list too long
ci snapshot-metro writes the full cache snapshot, with every file's path, size and mtime, to GITHUB_OUTPUT as JSON. action.yml then passes it to plan-metro-save in one environment variable:
env:
INPUT_METRO_SNAPSHOT: ${{ steps.snapshot-metro-restore.outputs.metroSnapshot }}
Linux limits one environment variable to 128 KiB (MAX_ARG_STRLEN). Our restored cache has about 2,100 files (Metro cache: restored from key "harness-metro-Linux-…" (2095 files, 60.3 MB).), so the JSON is far over that limit and bash fails to start. macOS has no limit per variable, so the iOS jobs with the same cache size pass.
The first run on the default branch passes: nothing is restored, so the snapshot is {}, and that run saves the cache. Every later run that restores the cache fails.
A possible fix: snapshot-metro writes the snapshot to a file under .harness/ (outside the cached directories) and outputs only the file path, and plan-metro-save reads that file.
System Info
GitHub Actions `ubuntu-latest`, Android emulator (API 35). Expo SDK 53, 55 and 58 all fail the same way.
React Native Harness Version
1.6.0 (callstackincubator/[email protected])
Reproduction
https://github.com/anoncreds/anoncreds-wrapper-javascript/actions/runs/40483261633/job/122118593885
Steps to reproduce
- Use the action with the default
cacheSavePolicyon an Android runner, in a project whose Metro cache has more than about 1,000 files. - Run the workflow on the default branch so it saves a Metro cache.
- Run it again so it restores that cache. "Plan Metro cache save" fails with
Argument list too long.
- Langage dominant
- TypeScript
- Étoiles
- 335
- Forks
- 23
- Merge moyen
- 1 j 8 h
- PR mergées (30 j)
- 54
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de callstackincubator/react-native-harness
-
On Windows, `report.test.ts`'s unwritable-folder case creates `\dev\null\nope` at the drive root instead of meeting an unwritable folderPeut-être pris @TheSeydiCharyyev l’a pris il y a 1 jour. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
callstackincubator/react-native-harness#301 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
callstackincubator/react-native-harness#296 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
callstackincubator/react-native-harness#128 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 58/100
callstackincubator/react-native-harness#303 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
callstackincubator/react-native-harness#300 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de callstackincubator/react-native-harness
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
components-web-app/docs#307 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
localstack/localstack-mcp-server#112 ·
Les mainteneurs répondent en général sous 1 jour
-
area:frontend kind:bug priority:p1 ready
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour
-
bug ready-for-agent
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
PhyberApex/kuroshiro#1687 ·
Les mainteneurs répondent en général sous 1 jour
-
Performance (Web Vitals) collector: LCP/FCP from background tabs are not discarded, inflating p75Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
umami-software/umami#4720 ·
Les mainteneurs répondent en général sous 3 jours