CLDSRV-955: Cache node_modules instead of yarn download cache#6227
CLDSRV-955: Cache node_modules instead of yarn download cache#6227tcarmet wants to merge 3 commits into
Conversation
Replace `cache: yarn` (which only caches the yarn download dir) with an actions/cache on node_modules keyed by the yarn.lock hash, and make the yarn install / typescript steps conditional on a cache miss. Because the git dependencies compile TypeScript at install time, a warm cache now skips the clone, tsc build and relink entirely. Applied to the setup-ci composite action (used by all functional jobs) and the lint, async-migration-report, unit-tests and cleanup-gcp-buckets jobs.
Hello tcarmet,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Incorrect fix versionThe
Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:
Please check the |
❌ 1 Tests Failed:
View the top 2 failed test(s) by shortest run time
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
The prettier check formats whole changed files; touching action.yaml brought its pre-existing double-quoted name/description into scope. Reformat them to single quotes to match the prettier style.
node_modules can contain native addons compiled for a specific Node version, so a Node bump without a yarn.lock change could restore an incompatible cache. Add the Node version to the cache key, taken from the setup-node step's node-version output rather than hardcoded, so it tracks whatever version setup-node resolves.
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
Speeds up CI by caching the installed dependency tree between runs instead of only the package-manager download cache. Because several dependencies compile TypeScript at install time, previous runs re-cloned, recompiled and relinked them on every job despite a "cache hit"; now a warm cache skips that work entirely and jobs reuse the prior install.
Measured impact (warm run vs a development/9.3 baseline)
lintunit-testsfile-ft-testssetup-cicomposite action).${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }}; a lockfile bump invalidates it and the next run repopulates.See the pinned comparison comment for full details.