ci: cache discipline, slim CI debug info, and a --locked sweep - #703
Conversation
Add a nextest config with two profiles: profile.default for local runs (surface slow tests, never kill), and profile.ci for the core-tests composite (fail-fast off for full failure reports, hard-kill at 5 minutes via slow-timeout terminate-after, leak detection at 1s). No retries anywhere: the workspace suite has no recorded flakes, and a same-invocation retry of a VM boot test would run against the leaked __krun-vmm/gvproxy processes of the failed attempt (#588) - the lane reap steps plus terminate-after remain the mitigation. core-tests also gains --no-tests=fail: an empty selection is a broken filter or a dropped target, not a pass. Refs: #687 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A PR touching only .config/nextest.toml (e.g. a future profile edit) must re-run the tests that consume it; this PR's own run only triggered because it also edited the core-tests composite. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Four changes, one review story (nextest archive, unified session e2e, scripts over YAML, composite verify): - nextest archive replaces the hand-rolled testbins.json + run-testbin.sh: build-linux ships testbed/nextest-archive.tar.zst and the test job selects harnesses with filtersets under the new profile.vm (one VM at a time, hung boots hard-killed at 6 min, no retries - a same-invocation retry runs against the leaked vmm/gvproxy of the failed attempt, #588). - the unified session e2e (scripts/session-e2e.sh) joins the lane, covering Deployment Model 3 (native Linux + VM): the minimal CLI is built in build-linux (separate invocation - a combined build unifies libkrun into the CLI, the #694 regression class), ships in the testbed, and drives activate/exec/destroy from PATH, with the #588 reap (sudo: relay leftovers are root-owned) before it and cli-e2e-boot.log uploaded. - the daemon-lifecycle shell blob becomes scripts/lifecycle-e2e.sh: PATH-resolved minvmd (no cargo, macOS-reusable), temp workdir, and an EXIT-trap teardown so a failed assert cannot strand a daemon. - the krun_add_disk3 export assert moves into setup-libkrun-linux, mirroring the macOS composite and covering release.yml (which uses the composite but had no check); an early actionable failure - minvmd's compile-time link is the real backstop. Also per owner direction: workflow comments drop PR/issue and R-numbers (history belongs in commits, not YAML), and the DM labels are corrected against docs/specs/03-spec-networking (DM1 is the macOS model; this lane is DM3, session-e2e.sh header fixed accordingly). Refs: #687 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The lifecycle step spawns a fresh daemon just like the CLI session e2e, so it was equally exposed to leaked __krun-vmm/gvproxy children from a failed harness run. Move the reap to run immediately after the harness e2es, ahead of both fresh-daemon steps. Addresses CodeRabbit review on #702. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Three cross-lane changes that must fork every cache exactly once: - rust-cache gains shared-key (one per job class that compiles the same artifacts: workspace/tests/clippy/native-e2e/mac-unit) and save-if restricted to main, via new setup-rust inputs forwarded from core-tests. PR branches restore but never write, so PR churn stops LRU-evicting the main caches every PR restores from (the 10 GB pool is shared repo-wide). - the two multi-GB raw actions/cache users (KVM build-linux, macOS artifacts stage2) split into cache/restore + main-only cache/save guarded on cache-hit. - CARGO_PROFILE_DEV_DEBUG=line-tables-only in CI (setup-rust env step; explicit job env on the mac and KVM jobs that bypass the composite): usable backtraces, smaller target trees and caches, faster links - without a named Cargo profile, which would move output out of target/debug and break codesign/testbed/justfile paths. - --locked on every workflow cargo invocation (build/test/clippy/ archive), so a stale Cargo.lock fails loudly instead of silently re-resolving; previously only core-tests' cargo fetch enforced it. Refs: #687 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@CodeRabbit review |
|
Stacked on #702 per owner preference (base = |
|
@CodeRabbit review |
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughReusable Rust actions and CI workflows now support lane-specific cache keys, main-branch-only cache writes, reduced debug information, and ChangesCI cache and Cargo locking
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
|
@CodeRabbit review |
✅ Action performedReview finished.
|
|
@CodeRabbit review |
✅ Action performedReview finished.
|
# Conflicts: # .github/workflows/ci-linux-native.yml
# Conflicts: # .github/actions/core-tests/action.yml # .github/workflows/ci-linux-kvm.yml
The changes jobs failed on every push to main since the lanes landed: dorny/paths-filter on a push event diffs locally against event.before, which our shallow (depth-1), credential-free (persist-credentials: false) checkout can neither resolve nor fetch - so the step exits 128 and the lane aggregators go red on main. On pull_request events dorny reads the file list via the API, which is why every PR run was green while main rotted silently (the lanes are still advisory). Gate the filter step to pull_request and flip the downstream conditions to 'not pull_request OR filter matched': pushes to main and manual dispatches now run everything, which is what main wants anyway - main runs write the main-only caches (#703) and provide the soak signal. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Stacked on #702 (base = its branch; GitHub retargets to main when it merges — the diff here is N4 only).
What
Three cross-lane changes sized to fork every cache exactly once:
setup-rustgainsshared-key+save-ifinputs (defaults:workspace, main-only writes), forwarded fromcore-tests(tests). Per-class keys:clippy,native-e2e(-pbuilds unify features differently than the workspace suite),mac-unit(inline). PR branches restore but never write — PR churn stops LRU-evicting the main-branch caches from the shared 10 GB pool (the 13m42s cold compile on ci: adopt nextest profiles; reshape the KVM lane to its end state #702's first run was this problem live).build-linux, macOSartifactsstage2):actions/cache/restore+ main-onlyactions/cache/saveat job end, guarded oncache-hit.CARGO_PROFILE_DEV_DEBUG=line-tables-onlyin CI (setup-rust env step; explicitenv:on the mac/KVM jobs that bypass the composite) — usable backtraces, smaller target trees and caches, faster links. Deliberately not a named[profile.ci]: that would move output out oftarget/debugand break codesign/testbed/justfile paths. Plus--lockedon every workflow cargo invocation — a stale Cargo.lock now fails loudly; previously onlycargo fetchenforced it.Part of the CI end-state migration (#687).
One-time landing cost + prime plan
All keys fork cold at merge (new shared-key + debug-info change together, by design). After merge:
workflow_dispatcheach lane once on main to write the new keys, then a trivial PR must show restore-from-main hits and noSaved cachelines. The mini's persistent target dir rebuilds once (new fingerprints from the debug env).Release.yml caches are deliberately untouched — they inherit these conventions in the release overhaul PR.
Verification
--lockedpasses everywhere).gh api repos/gominimal/minimal/actions/cachesshould trend down over the week; PR runs show no cache writes.🤖 Generated with Claude Code
Summary by CodeRabbit
--lockedfor Rust builds, tests, doctests, and nextest runs to ensure consistent dependency resolution.shared-keyoption for the core test action and introduced lane-specific cache keys for different CI jobs.line-tables-only) to slim build artifacts.