Github Action fails to save cache on Linux
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- bash, github-actions, react-native, typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 340
- Fork
- 23
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 58
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstackincubator/react-native-harness
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
callstackincubator/react-native-harness#296 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
callstackincubator/react-native-harness#128 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
callstackincubator/react-native-harness#303 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
callstackincubator/react-native-harness#300 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
callstackincubator/react-native-harness#277 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstackincubator/react-native-harness
Issue tương tự
-
Phone app shows Unknown for a remote machine whose key changedCó thể đã có người làm @janicduplessis đã nhận hôm nay. Đang mởarea: mobile priority: P3 type: bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
appandflow/stim#5006 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Area - Local to Cloud Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
microsoft/vscode-mssql#23209 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
code-yeongyu/senpi#5713 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A-linter
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
oxc-project/oxc#28783 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
lingdojo/kana-dojo#33553 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày