ci: free runner disk space before heavy cargo builds - #244
Conversation
The `cargo test --all-features` job started failing on main with `No space left on device (os error 28)` mid-link (compounded by the recurrent rust-lld bus-error). The DataFusion-heavy workspace plus a growing set of integration-test binaries, linked with debug info, outgrew ubuntu-latest's ~14 GiB root disk; #243 added one more test binary and tipped it over. Two post-merge re-runs hit the same wall, so this is capacity, not a flake. Reclaim the large unused preinstalled SDKs (Android ~9 GiB, dotnet, GHC, CodeQL, boost) via a shared script before building, on the two heavy whole-workspace `--all-features` jobs (`test`, `coverage`). No third-party action is added, so the SHA-pinned-actions / Scorecard posture is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughA new bash script ChangesCI Disk Space Reclamation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 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.
Pull request overview
This PR mitigates GitHub-hosted runner disk exhaustion during heavy Rust builds by reclaiming unused preinstalled SDK space before running workspace-wide --all-features compilation/link steps.
Changes:
- Add a shared
.github/scripts/free-disk-space.shthat removes large, unused SDK/tool directories and printsdfbefore/after. - Invoke the script at the start of the
testandcoveragejobs in CI to increase available disk headroom beforecargo test --all-features/cargo llvm-cov.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Runs the new disk-reclamation script early in the two heaviest jobs (test, coverage) before toolchain install/cache/build. |
.github/scripts/free-disk-space.sh |
Best-effort sudo rm -rf of large unused directories (Android, dotnet, GHC, CodeQL, boost) to recover runner disk space and avoid link-time ENOSPC failures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Problem
cargo test --all-featureson main started failing with disk exhaustion mid-link:The DataFusion-heavy workspace plus a growing set of integration-test binaries — all linked with full debug info — outgrew
ubuntu-latest's ~14 GiB root disk. #243 added one more test binary (rfc0014_ingest_write_path) and tippedtarget/over the edge. Two consecutive post-merge re-runs hit the identical wall, so this is a capacity problem, not the transient rust-lld bus-error flake (the bus error here is a symptom of the full disk).The job never reached a single test — it failed while compiling/linking. Locally the suite is green (
cargo test -p ourios-ingester --all-featurespasses; the merged code is correct).Fix
Reclaim the large preinstalled SDKs this Rust workspace never uses (Android ~9 GiB, dotnet, GHC, CodeQL, boost) via a shared
.github/scripts/free-disk-space.sh, run before the build on the two heavy whole-workspace--all-featuresjobs (test,coverage). This buys ~12 GiB of headroom — also necessary ahead of RFC 0014 part 2, which adds further test binaries.No third-party action is introduced (just
sudo rm+df), so the SHA-pinned-actions / OpenSSF Scorecard posture (#211–#213) is unchanged.Verification
ci.ymlvalidates as YAML;free-disk-space.shpassesbash -nandshellcheck.testjob on this PR exercises the fix end-to-end (this is the gate that was failing).No invariant (§3) or hazard (§4) is touched — CI infrastructure only.
🤖 Generated with Claude Code
Summary by CodeRabbit