ci: enforce immutable installs and scope the docker bake cache - #2662
ci: enforce immutable installs and scope the docker bake cache#2662jordan-simonovski wants to merge 1 commit into
Conversation
Use `yarn install --immutable` across CI install steps (main.yml lint/unit/ integration/clickhouse-static-build, knip.yml, e2e-setup) so CI fails on lockfile drift instead of silently re-resolving. Scope the integration job's docker buildx bake cache with mode=max and a stable scope=ci-integration (was unscoped, mode=min), mirroring docker-build.yml so layers persist between runs. node_modules caching was evaluated and dropped: a timing gate showed restoring the ~1.8G tree (~30s decompress+extract, before the network download of the 241M blob) loses to a warm-download `yarn install` (~23s).
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
🔴 Tier 4 — CriticalTouches auth, data models, config, tasks, OTel pipeline, ClickHouse, or CI/CD. Why this tier:
Review process: Deep review from a domain expert. Synchronous walkthrough may be required. Stats
|
Deep Review✅ No critical issues found. This is a CI-only change across three workflow files: 🔵 P3 nitpicks (2)
Reviewers (5): correctness, maintainability, testing, reliability, agent-native. Testing gaps: none — the change is self-verifying by running CI; Residual risk: |
E2E Test Results✅ All tests passed • 239 passed • 3 skipped • 1534s
Tests ran across 4 shards in parallel. |
|
Thanks — no P0/P1/P2, and the two notes are expected:
|
|
Distributed into the PRs that own each file, to remove this PR's main.yml conflicts and cut the PR count:
Nothing dropped; the node_modules-cache decision (dropped on the timing gate) doesn't need a home. Closing. |
Two CI-time improvements. The headline non-change: I measured caching
node_modulesand it loses, so it was deliberately not added — restoring the ~1.8G tree costs ~29.6s (plus a 241M cache download) versus a ~23.2s warmyarn install. What did ship is smaller and safe.What changed
yarn install→yarn install --immutableacross the CI install steps (main.yml lint/unit/integration/clickhouse-static-build, knip.yml, and the e2e-setup action). This fails CI on lockfile drift — the same class of bug that would otherwise slip through.docker buildx bakecache goes from an unscopedtype=ghatotype=gha,mode=max,scope=ci-integration, so its layers actually persist between runs.Key decisions
setup-nodeyarn download cache.bakestep to scope — the e2e stack usesdocker compose pullof published images.Impact
release.ymlandclaude.ymlhave their ownyarn installsteps left intentionally out of scope (this PR targets the PR-time CI path).main, so it will conflict inmain.ymlwith the lint and integration PRs; on resolution, carry forward--immutableand themode=max,scope=ci-integrationbake cache.Implementation detail
--immutableis the Yarn 4 flag (repo pinsyarn@4.13.0). Local dev install paths (scripts/, Makefile) are untouched. The singlebuild:target indocker-compose.ci.ymlmeans the shared*bake selector can't cause a scope collision (verified withbuildx bake --print).