Incorrect architecture definition for cache key
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
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- node.js, typescript
Hướng nghiên cứu
Bắt đầu từ src/cache-restore.ts ở dòng 25 và theo dõi cách kiến trúc cache được chọn cho setup-node. Tái hiện vấn đề bằng hai workflow macos-latest trong issue, sau đó xác minh rằng các bản build x64 và arm64 sử dụng các cache riêng biệt dựa trên kiến trúc được yêu cầu thay vì kiến trúc của host.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 5k
- Fork
- 1.7k
- Merge trung bình
- 2 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 actions/setup-node
-
feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
actions/setup-node#1531 · 1 bình luận · 4 reaction ·
-
feature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
actions/setup-node#1634 · 1 bình luận ·
-
actions/setup-node#1628 · 3 bình luận · 1 người được giao ·
-
`npm config get cache` fails with `EBADDEVENGINES` when requiring newer npm versions in `devEngines` Đang mởfeature request
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
actions/setup-node#1553 · 12 bình luận · 2 reaction ·
-
feature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
actions/setup-node#1428 · 1 bình luận · 3 reaction ·
Tất cả issue của actions/setup-node
Issue tương tự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100