fix(ci): per-PR cargo-test link-OOM — serialize fast-path links + skip zero-unit-test crates#5413
Conversation
…p zero-unit-test crates The #5411 fast per-PR path built every affected crate's unit-test binary in one unbounded-parallel invocation. Each links the whole runtime statically, so a wide diff (~50 crates for a perry-runtime change) OOMed the runner at link ('linking with cc failed') — the failure the FULL path avoids via CARGO_BUILD_JOBS=1. Surfaced on #5402. Fast path now: CARGO_BUILD_JOBS=1 (serialize heavy links) + filter scope through ci_test_scope.py --with-tests (drop crates with no src/ unit tests, whose lib test binary links the runtime for zero tests).
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
📝 WalkthroughWalkthroughAdds a ChangesCI Test Scope Filter and Workflow Serialization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Hotfix for #5411's fast per-PR path. It built every affected crate's unit-test binary in one unbounded-parallel
cargo test --lib --bins -p ...invocation; each statically links the whole runtime, so a wide diff (a perry-runtime change → ~50 crates) linked ~50 huge binaries at once and the runner OOMed (linking with cc failed) — exactly what the FULL path avoids viaCARGO_BUILD_JOBS=1. Surfaced on #5402.CARGO_BUILD_JOBS=1(serialize the heavy links, no OOM) and filters scope throughci_test_scope.py --with-tests(drops crates with nosrc/unit tests — ~13 zero-test FFI shims in the wide case).--with-testsmode validated locally; serial unit-only run for the wide perry-runtime fan-out = 37 test-bearing crates.Validated locally: scope/has-lib/with-tests modes, and the per-crate unit tests pass (perry/perry-hir/perry-codegen/perry-runtime). The OOM was parallel-only; serial links each succeed.
Summary by CodeRabbit