Skip to content

ci: one sccache writer, all-features Build, default-features check - #4448

Closed
BrianBland wants to merge 3 commits into
mainfrom
ci/sccache-writer-all-features
Closed

ci: one sccache writer, all-features Build, default-features check#4448
BrianBland wants to merge 3 commits into
mainfrom
ci/sccache-writer-all-features

Conversation

@BrianBland

Copy link
Copy Markdown
Contributor

Summary

  • Make Test (PR/MQ) and the main cache warmer the only sccache writers; every other setup job is SCCACHE_GHA_RW_MODE=READ_ONLY so we stop seven compile jobs racing the GHA 200 uploads/min limit.
  • Switch just build::ci / build::affected-ci to --all-features so Build shares rustc cache keys with Test/Clippy instead of writing a parallel default-features graph.
  • Add a concurrent Check (default features) job (cargo check --workspace --all-targets, no --all-features) as the cheap default-feature gate.
  • Publish classified sccache stats to each compile job summary (hit rate, write errors, rate-limit / quota / auth / timeout) so we can see why writes fail.

What to look for in this PR's CI

  • Test job summary: Mode: READ_WRITE, write-error count and classification (empty log + nonzero writes ≈ GHA rate limit).
  • Build / Clippy / Action Tests / Check: Mode: READ_ONLY, write errors should be 0.
  • Build wall clock vs recent MQ (~12 min) now that it is all-features (may be a bit slower individually; should hit more of Test's keys on later runs).
  • Check (default features) duration and whether default-feature typecheck stays off the critical path.

Test plan

  • Confirm Test is the only READ_WRITE job on this PR
  • Compare sccache write-error counts on Test vs Build/Clippy
  • Confirm Check (default features) is green and not the wall-clock ceiling
  • Confirm Build still compiles (--all-features --all-targets)

Made with Cursor

Stop seven compile jobs from racing the GHA 200 uploads/min cache limit, and compile Build with the same feature set as Test so cache keys can actually hit. A parallel default-features cargo check keeps the old gate without a second codegen graph.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

local lower
lower="$(printf '%s' "$1" | tr '[:upper:]' '[:lower:]')"
classified_lines=$((classified_lines + 1))
if [[ "$lower" == *429* || "$lower" == *ratelimit* || "$lower" == *"rate limit"* || "$lower" == *"too many requests"* ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: The numeric pattern matching (*429*, *401*, *403*) matches against the full line content, so any incidental occurrence of these strings in paths, hashes, or cache keys would cause misclassification. Consider anchoring these to HTTP-status-like contexts (e.g., *"status: 429"* or *"HTTP 429"*) or at least noting in the output that classifications are heuristic.

The first PR run persisted 215 cache objects but left SCCACHE_ERROR_LOG empty, so we still cannot tell whether write errors are GHA 429s or read-only skips. Enable SCCACHE_LOG=info on the writer and one reader for the next run.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
writes_stuck=$((misses - write_errors))
if (( writes_stuck < 0 )); then
writes_stuck=0
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This metric assumes every cache miss leads to a write attempt, but that's not always true (e.g., compilation errors, cancelled builds, or --no-run without actual test execution). The label "Writes that stuck" could be misleading — it might report a large positive value even when writes are working correctly, just because some misses never attempted a write.

Consider renaming to something like "Misses without write errors" or adding a note in the summary output that this is an upper bound.

Keep Check as a correctness gate on affected crates instead of a second
PR writer, and warm that graph on main so it can hit cache without
competing for the 200 uploads/min budget.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

Review Summary

CI-only PR — no Rust source code changes, no block-production-sensitive paths affected.

Changes reviewed:

  • .github/actions/setup/action.yml — new sccache-write input, SCCACHE_GHA_RW_MODE / SCCACHE_ERROR_LOG configuration
  • .github/actions/sccache-report/action.yml — new composite action wrapper
  • .github/workflows/ci-core.ymlsccache-write: "true" on Test only, new default-features-check job, sccache-report steps on all compile jobs
  • .github/workflows/ci-main-cache.ymlsccache-write: "true" on cache warmers, sccache-report steps
  • .github/workflows/ci-pr.yml / ci-merge-queue.yml — plumb check_command input
  • etc/just/build.just--all-features added to ci and affected-ci recipes
  • etc/just/check.just — new default-features, default-features-ci, default-features-affected-ci recipes
  • etc/scripts/ci/sccache-report.sh — new diagnostics script

Assessment: No new findings beyond the two inline comments already posted. The approach is sound — designating Test and the main cache warmer as the only sccache writers avoids the GHA 200 uploads/min rate-limit contention, and the new default-features-check job fills the gap left by switching Build to --all-features. The _elf_stub usage in the check recipes correctly avoids requiring SP1 toolchain installation for the lighter cargo check job.

@github-actions

Copy link
Copy Markdown
Contributor

Base Std historical fork tests

Fork Result Passed Failed Skipped base/base base-anvil base-std
Beryl pass 616 0 13 fc378108 6d744e03 4658f1b7
Cobalt pass 721 0 14 fc378108 ae7557c4 3f899009

View run

@BrianBland

Copy link
Copy Markdown
Contributor Author

Split the writer/READ_ONLY slice into #4474 so we can land that on main and measure default-branch cache persist. This PR stays the follow-up: all-features Build + default-features Check.

@BrianBland BrianBland closed this Aug 17, 2026
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