ci: pre-warm Namespace cache for unit/component-view test shards#30098
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Remove four opt-in inputs added to setup-node-modules.yml (setup-command, use-exact-artifact-name, include-yarn-install-state, include-inpage-bridge-artifacts) and revert the workflow to its original interface. The prepare-ci-js-deps producer now calls setup-node-modules.yml with only artifact-name, artifact-retention-days, and runner_provider, matching how push-eas-update.yml already consumes the same reusable workflow. Consumer jobs (unit-tests, component-view-tests, merge-unit-and-component-view-tests) now reference the artifact via needs.prepare-ci-js-deps.outputs.artifact-name instead of the hardcoded name, matching the established pattern in push-eas-update.yml.\
…), while namespace is still o trial
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7c8ed8d. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
These changes are a CI optimization/refactoring to reduce redundant dependency installations across parallel jobs. No application source code, E2E test files, test page objects, test fixtures, or app functionality was modified. Running E2E tests would not validate these CI infrastructure changes and would be wasteful. No performance tests are needed either since no app code was changed. Performance Test Selection: |
|




Summary
Introduces a `prepare-ci-js-deps` job and a `setup-ci-js-deps` composite action to eliminate redundant `yarn install` + `yarn setup:github-ci --node` across 13 CI shards (10 unit-test + 2 component-view + 1 merge job).
What changed
New job `prepare-ci-js-deps` (`ci.yml`)
Runs before `unit-tests`, `component-view-tests`, and `merge-unit-and-component-view-tests` and installs dependencies once on behalf of all consumers.
New composite action `.github/actions/setup-ci-js-deps`
Shared setup sequence used by the producer and all three consumer jobs:
On non-Namespace consumers, step 3 finds the tarball already extracted, so step 4 is skipped.
Consumer jobs (`unit-tests`, `component-view-tests`, `merge-unit-and-component-view-tests`)
Each job's setup block is replaced with:
`check-all-jobs-pass`
`prepare-ci-js-deps` added to the gate.
Not changed
Estimated impact
Removal guide (when Namespace passes trial)
Search for `# TEMP` in `ci.yml` — there are exactly 4 clearly marked blocks:
Delete those blocks. No changes needed to `setup-ci-js-deps/action.yml`.
Manual testing steps
```gherkin
Given a pull request runs CI on a non-Namespace runner (ubuntu-latest)
When prepare-ci-js-deps completes
Then a ci-js-deps.tar.gz artifact is uploaded
And each unit-tests and component-view-tests shard downloads and extracts it
And all shards skip yarn install and pass
Given a pull request runs CI on a Namespace runner
When prepare-ci-js-deps completes on a warm cache volume
Then all consumer shards mount the cache volume and skip yarn install
And all shards pass
Given the Namespace cache volume is cold (yarn.lock changed)
When prepare-ci-js-deps runs
Then it installs dependencies and warms the volume
And all consumer shards hit the warm volume and skip install
```
References
Note
Medium Risk
Changes CI job dependencies and dependency-caching behavior for unit/component-view shards; misconfiguration could cause flaky installs or missing artifacts, but impact is limited to CI execution.
Overview
Reduces redundant JS dependency setup across CI test shards. Adds a new composite action
setup-ci-js-depsthat configures Namespace cache, sets up Node, and conditionally runsyarn install --immutable+yarn setup:github-ci --nodebased on workspace freshness.Introduces a
prepare-ci-js-depsjob that runs once beforeunit-tests,component-view-tests, andmerge-unit-and-component-view-teststo warm Namespace shared cache; for non-Namespace runners it packs and uploads a short-livedci-js-depsartifact that consumer shards download/extract to skip their own installs.Updates test/merge jobs to depend on
prepare-ci-js-deps, replaces their inline dependency setup with the new action + temporary artifact restore steps, tightensifconditions to require successfulget_requirements, and addsprepare-ci-js-depsto thecheck-all-jobs-passgate.Reviewed by Cursor Bugbot for commit d9e8501. Bugbot is set up for automated code reviews on this repo. Configure here.