Repository navigation
Conversation
All Rust jobs shared one rust-cache key, so the fastest job saved it and every slower job restored a cache built for a different target, logged "Cache up-to-date", and rebuilt its dependencies on every run. Use a per-job shared key, restrict saves to main so PR-scoped caches stop evicting main's, and uninstall the runner image's preinstalled stable toolchain so image rollouts no longer rotate the cache key. Integration tests restore the axum job's cache, which builds the same artifacts. Closes #1258 Signed-off-by: dhruv8sh <dhruv8sh@proton.me>
ChristianPavilonis
approved these changes
Oct 8, 2026
ChristianPavilonis
left a comment
Collaborator
There was a problem hiding this comment.
Review summary
Reviewed b9235ca43d6e7dd1cd484eb5a69daeb3eae671db against 7a0ecb4cbfa39af3d83f7e1ed2733d7eabdc4cb1. No actionable issues introduced by this PR were found.
Inspected all three changed files, every affected job, all four integration-action consumers, and the resolved setup/cache action implementations.
Safety proof
- CI logs show all 12 affected job executions removing
stable, installing pinned Rust 1.95.0, and completing successfully. Coverage includes native Linux/macOS, both WASM targets, Clippy, parity, and integration tests. - Logs from runs
37701852034,37701851968, and37701851955confirm separate OS/job cache namespaces, matching Axum/integration keys, andsave-if: falseforwarded in every affected PR execution. No Rust cache saves occurred.
Validation and remaining uncertainty
- All 22 PR checks pass. The CI merge tree is identical to the reviewed head tree.
- Diff whitespace checks and actionlint without ShellCheck pass. Actionlint with ShellCheck reports 12 unchanged SC2086 diagnostics, confirmed against the base revision. All new removal scripts pass ShellCheck.
- In-memory assertions pass for all setup definitions, key uniqueness, intentional integration sharing, Rust pins, shell syntax, the absent-rustup branch, and CI log observations.
- Existing reviews, inline comments, issue comments, and review threads were empty.
- Main-branch cache saving, subsequent warm restores, and the claimed storage/performance improvements remain unverified on GitHub after merge.
This branch has not been deployed
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.
Summary
cargo-${{ runner.os }}, and a job with an exact key match never saves. The first job to save (cloudflare or parity) owns the cache, and the axum, fastly, spin and clippy jobs rebuild 150–1,000 dependency crates on every run even though they report a full hit.main. PR-scoped caches can't be reused by other PRs and were pushing the repo past its 10 GB limit (12.6 GB, ~10.8 GB of it from PRs), evicting main's caches.stabletoolchain before setup. rust-cache hashes every installed toolchain into its key, so each runner-image update was changing the key.Changes
.github/workflows/test.ymlcargo-fastly,cargo-axum,cargo-cloudflare,cargo-spin,cargo-parity;cargo-cliunchanged),cache-save-ifonmainonly, and a step that uninstalls the image'sstabletoolchain.github/workflows/format.ymlcargo-clippy).github/actions/setup-integration-test-env/action.ymlcargo-axum, which builds the same axum debug and Fastly release WASM artifacts. Same save and toolchain changes.Closes
Closes #1258
Test plan
cargo test-fastly && cargo test-axumcargo clippy-fastly && cargo clippy-axumcargo fmt --all -- --checkcd crates/trusted-server-js/lib && npx vitest run(ran withNODE_OPTIONS=--no-experimental-webstoragebecause local Node is 26, not the pinned 24.12.0)cd crates/trusted-server-js/lib && npm run formatcd docs && npm run formatcargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1fastly compute serveactbenchmark ofmain'stest.ymlvs this branch, running the cloudflare, fastly and axum jobs sequentially (one cold main-push run, then two warm PR runs per variant)cargo testWhat the benchmark confirmed:
mainruns save one cache per job.stabletoolchain.Not covered locally:
After merge, check these:
gh cache listshows Rust caches only forrefs/heads/main, under 10 GB.Compilinglines.The first PR runs after merge build cold until
mainhas saved the new keys.Checklist
unwrap()in production code — useexpect("should ...")tracingmacros (notprintln!)actbenchmark above.)