Skip to content

CLDSRV-955: Cache node_modules instead of yarn download cache#6227

Open
tcarmet wants to merge 3 commits into
development/9.3from
improvement/CLDSRV-955/node-modules-cache
Open

CLDSRV-955: Cache node_modules instead of yarn download cache#6227
tcarmet wants to merge 3 commits into
development/9.3from
improvement/CLDSRV-955/node-modules-cache

Conversation

@tcarmet

@tcarmet tcarmet commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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)

Job dependency setup before after (warm) job wall time
lint 61s 9s 116s → 49s
unit-tests 54s 10s 114s → 64s
file-ft-tests 84s 41s 750s → 722s
  • ~43–52s of dependency setup saved per job, across ~15 jobs (4 inline + ~11 functional via the setup-ci composite action).
  • Jobs run in parallel, so end-to-end wall time drops modestly (critical-path bound, ~30–40s), but total CI compute falls ~10 min per run and the short feedback jobs (lint, unit) are >2× faster.
  • Cache key is ${{ 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.

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.
@bert-e

bert-e commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Hello tcarmet,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e

bert-e commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Incorrect fix version

The Fix Version/s in issue CLDSRV-955 contains:

  • None

Considering where you are trying to merge, I ignored possible hotfix versions and I expected to find:

  • 9.3.14

  • 9.4.0

Please check the Fix Version/s of CLDSRV-955, or the target
branch of this pull request.

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
8489 1 8488 0
View the top 2 failed test(s) by shortest run time
should log correct objectGetAttributes operation with all required fields::Server Access Logs - File Output With v4 signature should log correct objectGetAttributes operation with all required fields
Stack Traces | 0.033s run time
Expected 3 log entries, got 4

4 !== 3
should log correct bucketDeletePolicy operation with all required fields::Server Access Logs - File Output With default signature should log correct bucketDeletePolicy operation with all required fields
Stack Traces | 0.038s run time
Expected 3 log entries, got 4

4 !== 3
View the full list of 1 ❄️ flaky test(s)
"after each" hook for "should create a bunch of objects and their versions"::put and head object with versioning With v4 signature "after each" hook for "should create a bunch of objects and their versions"

Flake rate in main: 100.00% (Passed 0 times, Failed 5 times)

Stack Traces | 1.05s run time
The bucket you tried to delete is not empty.

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@tcarmet tcarmet marked this pull request as ready for review July 10, 2026 00:04
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.
Comment thread .github/actions/setup-ci/action.yaml Outdated
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.
@tcarmet tcarmet requested a review from a team July 14, 2026 17:00
@bert-e

bert-e commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants