pnpm cache race condition when using different node versions between workflows
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- github-actions, node.js, typescript
調査の方向性
このレポートでは、actions/setup-node@v3 と pnpm/action-setup@v2 を使用したワークフローの例を示しています。まず、setup-node で使用される pnpm キャッシュキーの生成を追跡します。Node 14 と Node 16 で生成されるキーを比較し、その後、別々のキーによって報告されたキャッシュの再利用と競合状態が防止されることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Description:
Same cache us being reused, regardless of node versions. This brings prolonged time for once of the operations, and cache race conditions.
As can be seen from the images attached below, same cache key is used for both, but once is using node14, while the other is using node16.
Action version:
actions/checkout@v3
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
Repro steps:
This is my Tests yaml
name: Tests
on:
push:
branches:
- master
pull_request:
jobs:
exec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 14
cache: "pnpm"

This is my Version yaml
name: Version
on:
push:
branches:
- master
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: "pnpm"

Expected behaviour:
Node version is taken into account on the cache generation key.
Actual behaviour:
Same cache is being used, which leads to longer pnpm install steps, and cache race conditions.
- 主要言語
- TypeScript
- スター
- 5k
- フォーク
- 1.7k
- 平均マージ
- 2日 11時間
- マージ済み PR(30日)
- 3
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
actions/setup-node のほかの issue
-
feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
actions/setup-node#1531 · コメント 1 件 · リアクション 4 件 ·
-
feature request
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
actions/setup-node#1634 · コメント 1 件 ·
-
actions/setup-node#1628 · コメント 3 件 · 担当者 1 名 ·
-
`npm config get cache` fails with `EBADDEVENGINES` when requiring newer npm versions in `devEngines` オープンfeature request
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
actions/setup-node#1553 · コメント 12 件 · リアクション 2 件 ·
-
feature request
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
actions/setup-node#1428 · コメント 1 件 · リアクション 3 件 ·
actions/setup-node の issue をすべて見る
似ている issue
-
blocklist removal
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MetaMask/eth-phishing-detect#296544 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pastelsky/bundlephobia#1122 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100