Repository navigation
ci: run on pushes to integration so PRs restore a warm rust-cache (SNB-625) - #27
Merged
Merged
Conversation
Every PR run logged `No cache found.` and compiled the workspace cold (about 2-3 minutes). PRs target `integration`, but CI only ran on pushes to `master`, and a PR run can only restore caches saved on its own ref, its base branch or the default branch. No cache ever existed on `integration`, and per-PR caches are invisible to other PRs. Also run on pushes to `integration`. Each merge then saves one cache that every PR into `integration` restores. The extra run per merge is off the PR critical path, and it also tests the merged state. SNB-625 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 1, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SNB-625
Problem
Every PR run logs
No cache found.fromSwatinem/rust-cacheand compiles the whole workspace cold, which takes about 2–3 minutes per run.integration, butci.ymlonly runs on pushes tomaster.integration, and each PR's ownrefs/pull/N/mergecache is invisible to every other PR.Change
on.push.branchesnow includesintegration(.github/workflows/ci.yml). Each merge intointegrationruns CI once and saves one cache, and every PR intointegrationrestores it. The extra run per merge is off the PR critical path, and it also tests the merged state.Verification
I didn't push to
integration. Instead, a throwaway branchsnb-625-demo-basestood in for it: this PR's head plus one commit adding that branch toon.push.branches. Its push-triggered run saved a cache. Then a draft PR into that branch (#30, an empty commit) checked that a PR restores its base branch's cache.testcompileintegration)No cache found.snb-625-demo-base, stands in for anintegrationmerge)No cache found., then savedv0-rust-test-Linux-x64-c7b3ef7d-b8922df3onrefs/heads/snb-625-demo-basesnb-625-demo-base)Restored from cache key "v0-rust-test-Linux-x64-c7b3ef7d-b8922df3" full match: true.Cache up-to-date.)integrationwould save: the same rustc hash (c7b3ef7d) and the same lockfile hash (b8922df3, also used by the earlier integration-based PR caches).Limits
Cargo.lockmisses the exact key. rust-cache then falls back to thev0-rust-test-Linux-x64-c7b3ef7dprefix and restores most dependencies.integration. Pinning the toolchain would avoid that; it is not done here.refs/pull/N/mergecaches (about 1.2 GB each, against a 10 GB limit). Theintegrationcache is read by every PR, so it is the least likely to be evicted. If eviction shows up,save-if: ${{ github.event_name == 'push' }}would stop PR runs from saving.