Github Action fails to save cache on Linux
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- bash, github-actions, react-native, typescript
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 335
- 派生
- 23
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 54
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstackincubator/react-native-harness 的其他 Issue
-
On Windows, `report.test.ts`'s unwritable-folder case creates `\dev\null\nope` at the drive root instead of meeting an unwritable folder可能已有人在做 @TheSeydiCharyyev 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 83/100
callstackincubator/react-native-harness#301 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
callstackincubator/react-native-harness#296 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
callstackincubator/react-native-harness#128 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 58/100
callstackincubator/react-native-harness#303 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 52/100
callstackincubator/react-native-harness#300 ·
维护者通常 1 天内回复
查看 callstackincubator/react-native-harness 的全部 Issue
相似的 Issue
-
Parallel reticle_verify opens per-flow leases without the source lease's ignoreHTTPSErrors可能已有人在做 @as992949791 今天认领。 未关闭good first issue help wanted
难度 2/5 1-3 小时 新手友好度 85/100
reticlehq/reticle#2033 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area:quality p3-medium ready-for-agent type:docs
难度 2/5 1-3 小时 新手友好度 83/100
fderuiter/deruiter.dev#3589 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
manfredsteyer/angular-oauth2-oidc#1514 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
marmelab/react-admin#11431 ·
维护者通常 1 天内回复