Skip to content

ci(soldr): publish cache hit rate and S3 bucket size - #3806

Merged
zackees merged 3 commits into
masterfrom
ci/soldr-cache-report
Nov 7, 2026
Merged

zackees merged 3 commits into
masterfrom
ci/soldr-cache-report

Conversation

@zackees

@zackees zackees commented Nov 7, 2026

Copy link
Copy Markdown
Member

Makes the soldr cache observable, because right now it isn't.

Why

The S3 remote cache is configured on master (build-project.yaml: s3-bucket: forge-ci, nyc3.digitaloceanspaces.com, s3-cache-limit: 50G, save-cache-remote on master pushes) and the local store is clearly filling (14.29 GiB / 25 GiB cap, 57k files). But no workflow step emits any cache statistic - grep over .github for soldr cache report / hit_rate returns nothing. So "is caching working and are we getting hits" is currently unanswerable from CI.

What this adds

  1. Report soldr cache (all platforms, if: always()): runs soldr cache report --json and writes hit rate, hits/misses, time saved and compilation counts (incl. non-cacheable) to the job summary. Fail-open: no session → one line, exit 0.
  2. Report S3 cache size (master + linux only): aws s3 ls s3://forge-ci --recursive --summarize --endpoint-url https://nyc3.digitaloceanspaces.com using the same SOLDR_S3_CACHE_* credentials, reporting objects, bytes and GiB against the 50 GiB watermark. Fail-open on missing credentials.

Local baseline (measured on this machine, for context)

session compilations hits hit rate time saved
12989775377809617651 2753 467 17.5% 592 s
12991407570528805742 1275 3 0.25% 0 s
12991703704453557584 56 0 0% 0 s

So "a lot of hits" is not currently true locally - the best session is 17.5%, and small/incremental sessions are near zero. Whether CI differs is exactly what these steps will show.

Verified

  • yaml.safe_load parses the modified workflow.
  • Both steps are || true / guarded, so a cache problem cannot red a build.

Nothing in CI reported whether the S3 remote cache was helping, so 'are we
getting hits' had no answer. soldr already writes per-session stats; this
step rolls them up into the job summary (hit rate, hits/misses, time saved,
compilations). A second step on master/linux summarises the Spaces bucket
with the same credentials so the 50G watermark is visible, not inferred.

Both steps are fail-open: missing stats or credentials print a line and exit 0
rather than failing a build.
zackees and others added 2 commits November 6, 2026 21:27
The step's top-level parser, moved verbatim into ci/soldr_cache_report.py,
prints 0.0% (0 hits / 0 misses) for a real session with one hit, because soldr
nests every counter under last_session.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
soldr nests its counters under last_session, so the report printed 0.0% (0/0)
on every build. ci/soldr_cache_report.py now reads last_session, reports status,
errors, zccache version and session source, and says n/a instead of 0% when
SOLDR_RUSTC_WRAPPER=none bypasses the Rust cache or nothing compiled.

The steps also could not run where the PR put them: macos-build runs only on
full builds and has no matrix.os, so the S3 step's condition was never true.
Add the report to rust-tests-linux and move the S3 step there, guarded by
command -v aws. macos-build now installs uv when native reuse did not.

test_ci_proptest_regressions.py treated every summary-writing step in those
jobs as a seed step; narrow it to the proptest steps it is about.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zackees
zackees enabled auto-merge November 7, 2026 05:55
@zackees
zackees added this pull request to the merge queue Nov 7, 2026
Merged via the queue into master with commit c37566d Nov 7, 2026
38 checks passed
@zackees
zackees deleted the ci/soldr-cache-report branch November 7, 2026 07:07
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to Done in obs-rust Multiview Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants