Github Action fails to save cache on Linux
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 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時間
- マージ済み PR(30日)
- 54
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 が 1 日前に担当しました。 オープン
難易度 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
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
hemi-earn
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
vetro-protocol/vetro-monorepo#1043 ·
メンテナーはふだん 1 日以内に返信
-
stage 2: bare names resolve against PATH differently from the shell (empty and relative entries)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
STRML/omp-classifier#206 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
atlassian-labs/mermaid-diagrams-viewer#188 ·
メンテナーはふだん 1 日以内に返信
-
dashboard enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Olanetsoft/agent-lookout#225 ·
メンテナーはふだん 1 日以内に返信