Repository navigation
ci(soldr): publish cache hit rate and S3 bucket size - #3806
Merged
Merged
Conversation
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.
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]>
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.
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-remoteon 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 -grepover.githubforsoldr cache report/hit_ratereturns nothing. So "is caching working and are we getting hits" is currently unanswerable from CI.What this adds
Report soldr cache(all platforms,if: always()): runssoldr cache report --jsonand 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.Report S3 cache size(master + linux only):aws s3 ls s3://forge-ci --recursive --summarize --endpoint-url https://nyc3.digitaloceanspaces.comusing the sameSOLDR_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)
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_loadparses the modified workflow.|| true/ guarded, so a cache problem cannot red a build.