Cache prefix key for multiple cache-dependency-path
メンテナーはふだん 8 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- nodejs, typescript
- 領域
- ci-cd
調査の方向性
setup-node が cache-dependency-path からキャッシュキーをどのように構築するかを確認し、次に関連する issue #1120 を読んで背景を把握してください。完了条件は、ワークフローからパッケージマネージャーと lockfile のハッシュの間に制御可能なプレフィックスを指定でき、目的の異なる monorepo のキャッシュが相互に復元されないことです。
索引モデルが issue の本文から書いたものです。
説明
Description:
Currently the cache key is always the following format node-cache-{platform}-{packageManager}-{fileHash(lockfile)}
I'd like a way to add a prefix between the packageManager and the file hash like node-cache-{platform}-{packageManager}-{cachePrefix}-{fileHash(lockfile)}
Justification:
We work in a monorepo with yarn workspaces. In order to scope our yarn installs and cache, we use yarn workspaces focus with cache-dependency-path pointing to yarn.workspace.lock from https://github.com/MaintainX/yarn-plugin-workspace-lockfile
This means we have multiple workflows all saving and restoring caches for different file hashes.
Because we use yarn3, setup-node uses fallback restore keys.
Which means it frequently happens that 1 workflow will fallback on the cache from a totally different set of lockfiles, run yarn effectively download what's missing and grow the cache and save that cache back.
Somewhat related https://github.com/actions/setup-node/issues/1120
What happens is that our caches are constantly growing, over time including the whole monorepo's dependencies and more.
We tried to mitigate this by manually creating caches on push to master using actions/cache/save instead of setup-node so we wouldn't restore the cache making it a "fresh" cache.
Having a cache prefix that we control, we could give a semantic name for scopes of the monorepo allowing to avoid workflows to cross restore caches for a different yarn workspaces focus command
Are you willing to submit a PR?
Yes I'm willing to open a PR if this suggestion is accepted
- 主要言語
- TypeScript
- スター
- 5k
- フォーク
- 1.7k
- 平均マージ
- 2日 11時間
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
actions/setup-node のほかの issue
-
feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
actions/setup-node#1531 · コメント 1 件 · リアクション 4 件 ·
メンテナーはふだん 8 日以内に返信
-
feature request
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
actions/setup-node#1634 · コメント 1 件 ·
メンテナーはふだん 8 日以内に返信
-
Volta extends resolution in getNodeVersionFromFile has no cycle detection, recursing until stack overflow対応中かも @v-gowridurgad が 14 日前に担当しました。 オープン
actions/setup-node#1628 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 8 日以内に返信
-
`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 件 ·
メンテナーはふだん 8 日以内に返信
-
feature request
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
actions/setup-node#1428 · コメント 1 件 · リアクション 3 件 ·
メンテナーはふだん 8 日以内に返信
actions/setup-node の issue をすべて見る
似ている issue
-
ADD openalgoオープンtemplate
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
factory-active factory-automatic task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
bug Needs: Triage :mag:
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoft/fluentui-contrib#671 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
sveltejs/acorn-typescript#150 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100