Skip to content

ci: restore intra-run .turbo cache fan-out to cut CI compute - #8186

Draft
y-lakhdar wants to merge 1 commit into
mainfrom
spike/ci-turbo-fanout
Draft

ci: restore intra-run .turbo cache fan-out to cut CI compute#8186
y-lakhdar wants to merge 1 commit into
mainfrom
spike/ci-turbo-fanout

Conversation

@y-lakhdar

Copy link
Copy Markdown
Contributor

Summary

Restores the intra-run .turbo cache fan-out (build once → share as one artifact) that #8146 removed, layered on top of Turbo remote caching, to cut CI compute. Spike — draft until measured and reviewed.

What it does

  • After ci: replace artifact Turbo cache with native remote caching #8146, every CI job re-ran turbo build in setup and restored the whole graph from the remote cache (~60s/job; the Run unit tests job showed 57 cached / 62 tasks in ~61s). With ~70 jobs that added roughly +57 job-min per full merge_group run (total ~248 → ~291 job-min), and CI got marginally slower rather than faster.
  • The build job now publishes its .turbo once as a per-run artifact (save-cache: 'true'), and needs: build consumers restore it (default load-cache: 'true') for local cache hits instead of each re-fetching ~57 task outputs from the remote cache.
  • Restore is best-effort (continue-on-error): on a miss, turbo falls back to the remote cache. turbo.json remoteCache + TURBO_TOKEN are unchanged, so cross-run / cross-branch / local-dev reuse is preserved.
  • pr-report, build-windows (different runner OS → different artifact), and build-missing opt out via load-cache: 'false'.

How to evaluate

Compare median total job-minutes of merge_group runs against the current baseline (~291 job-min), targeting a return to ≲250. Also spot-check a consumer job's setup step duration (was 119s on Run unit tests, ~60s of it remote turbo restore).

After #8146, every CI job re-primed the full Turbo graph from the remote cache (~60s/job, ~57 remote fetches) because the build->consumers artifact fan-out was removed. Publish the build job's .turbo once as a per-run artifact and have consumer jobs restore it for local cache hits, while keeping turbo.json remoteCache + TURBO_TOKEN for cross-run/branch/local reuse.
@changeset-bot

changeset-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2fb97f2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@svcsnykcoveo

svcsnykcoveo commented Aug 6, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@y-lakhdar

Copy link
Copy Markdown
Contributor Author
  • wait a couple days to have a better picture of the performances before and after the turbo remote caching implementation

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.

2 participants