fix(ci): prevent sccache from evicting Rust target cache - #799
Conversation
📝 WalkthroughWalkthroughThe PR disables the GitHub Actions sccache backend across Rust, ACR, and Ploy workflows. Contract tests now require disabled backend settings and reject write-mode configuration. Changessccache policy
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5741b49c4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/scripts/test-acr-publish-workflow.sh (1)
198-201: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winScope the cache-policy assertions to
research-runner-binaries.The
grep -Fqxchecks search the entire ACR workflow. They do not prove thatRUSTC_WRAPPER,SCCACHE_GHA_ENABLED,mozilla-actions/sccache-action, andcontinue-on-errorbelong to the same job. A future job could satisfy these checks whileresearch-runner-binariesloses the disabled backend.Extract the
research-runner-binariesblock and run these assertions against that block.Proposed test fix
+research_runner_block=$(awk ' + /^ research-runner-binaries:/ { found=1; next } + found && /^ [a-z0-9-]+:/ { exit } + found { print } +' "$workflow") -grep -Fqx ' RUSTC_WRAPPER: sccache' "$workflow" -grep -Fqx ' SCCACHE_GHA_ENABLED: "false"' "$workflow" +grep -Fqx ' RUSTC_WRAPPER: sccache' <<<"$research_runner_block" +grep -Fqx ' SCCACHE_GHA_ENABLED: "false"' <<<"$research_runner_block" -grep -Fqx ' uses: mozilla-actions/sccache-action@v0.0.10' "$workflow" -grep -Fqx ' continue-on-error: true' "$workflow" +grep -Fqx ' uses: mozilla-actions/sccache-action@v0.0.10' <<<"$research_runner_block" +grep -Fqx ' continue-on-error: true' <<<"$research_runner_block"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/scripts/test-acr-publish-workflow.sh around lines 198 - 201, Update the assertions in test-acr-publish-workflow.sh to first extract the research-runner-binaries job block from the workflow, then run all four grep -Fqx cache-policy checks against that extracted block rather than the entire workflow. Preserve the existing assertions for RUSTC_WRAPPER, SCCACHE_GHA_ENABLED, mozilla-actions/sccache-action, and continue-on-error.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/scripts/test-acr-publish-workflow.sh:
- Around line 198-201: Update the assertions in test-acr-publish-workflow.sh to
first extract the research-runner-binaries job block from the workflow, then run
all four grep -Fqx cache-policy checks against that extracted block rather than
the entire workflow. Preserve the existing assertions for RUSTC_WRAPPER,
SCCACHE_GHA_ENABLED, mozilla-actions/sccache-action, and continue-on-error.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 6f264aaa-c734-4351-90c4-29f3a15dc9ab
📒 Files selected for processing (6)
.github/scripts/test-acr-publish-workflow.sh.github/scripts/test-select-rust-ci-scope.sh.github/workflows/acr-publish.yml.github/workflows/ci.yml.github/workflows/ploy-ci.yml.github/workflows/release-rust.yml
b5741b4 to
6e96770
Compare
Summary
Root cause
The repository was writing thousands of sccache objects into the same GitHub Actions cache quota as the large Rust target archive. The research target key (1.39 GiB) was evicted, so the main build restored no target cache and fell back to a cold compile.
Validation
bash .github/scripts/test-select-rust-ci-scope.shbash .github/scripts/test-acr-publish-workflow.shbash -n .github/scripts/test-select-rust-ci-scope.sh .github/scripts/test-acr-publish-workflow.shgit diff --checkOut of scope
The tag-only release workflow remains unchanged because it has a pre-existing
macos-15-intelactionlint runner-label failure; no production services, collectors, uploaders, OSS objects, or runtime state changed.Issue relationship
None