ci: adopt nextest profiles; reshape the KVM lane to its end state - #702
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>
|
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 (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughNextest gains local, CI, and VM profiles. Linux/KVM CI switches to archived harness execution, adds lifecycle and CLI e2e coverage, validates libkrun setup, and updates native workflow triggers. ChangesNextest configuration and test selection
Linux/KVM archive-based execution
Lifecycle and setup validation
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/actions/core-tests/action.yml (1)
22-24: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPin or require the validated nextest version.
The workflow installs
nextestwithout a version, so the tool can drift independently from the0.9.140version used for validation. Pin the installer (tool: nextest@0.9.140) or addnextest-version = "0.9.140"to the repository config. The installer supports explicit tool-version syntax. (github.com)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/actions/core-tests/action.yml around lines 22 - 24, Pin the nextest version used by the workflow to the validated 0.9.140 release. Update the install-action configuration to use explicit tool-version syntax, such as tool: nextest@0.9.140, or define nextest-version = "0.9.140" in the repository configuration, ensuring it matches the cargo nextest invocation in the test step.Source: MCP tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/actions/core-tests/action.yml:
- Around line 22-24: Pin the nextest version used by the workflow to the
validated 0.9.140 release. Update the install-action configuration to use
explicit tool-version syntax, such as tool: nextest@0.9.140, or define
nextest-version = "0.9.140" in the repository configuration, ensuring it matches
the cargo nextest invocation in the test step.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c04bc493-c27d-4691-b3c4-a4b26e21e59d
📒 Files selected for processing (2)
.config/nextest.toml.github/actions/core-tests/action.yml
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>
69da20d to
3633d0a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci-linux-kvm.yml:
- Around line 308-326: Move the “Reap leftover VM processes” step so it runs
immediately before the “Daemon lifecycle (run --detach → status → stop)” step.
Preserve its existing sudo pkill commands and explanatory comments, ensuring
leaked minvmd, __krun-vmm, and gvproxy processes are removed before the
lifecycle script starts a fresh daemon.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3a4c74ed-c620-4fbe-aef6-e4a1e2fb5336
📒 Files selected for processing (6)
.config/nextest.toml.github/actions/setup-libkrun-linux/action.yml.github/workflows/ci-linux-kvm.yml.github/workflows/ci-linux-native.ymlscripts/lifecycle-e2e.shscripts/session-e2e.sh
✅ Files skipped from review due to trivial changes (2)
- scripts/session-e2e.sh
- .github/workflows/ci-linux-native.yml
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>
|
CodeRabbit findings addressed in b557f46:
|
|
@CodeRabbit review |
✅ Action performedReview finished.
|
# Conflicts: # .github/workflows/ci-linux-native.yml
* ci: adopt .config/nextest.toml with a ci profile 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> * ci(linux-native): trigger the lane on nextest config changes 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> * ci(linux-kvm): reshape the lane to its end state 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> * ci(linux-kvm): reap harness leftovers before the daemon lifecycle step 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> * ci: cache discipline, slim CI debug info, and a --locked sweep 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> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* ci: adopt .config/nextest.toml with a ci profile 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> * ci(linux-native): trigger the lane on nextest config changes 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> * ci(linux-kvm): reshape the lane to its end state 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> * ci(linux-kvm): reap harness leftovers before the daemon lifecycle step 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> * ci: cache discipline, slim CI debug info, and a --locked sweep 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> * ci: flip every lane to always-trigger with in-workflow gates The last two trigger-level path filters (ci.yml's paths-ignore + ci-macos.yml/ci-shell-installer.yml's paths) become dorny/paths-filter changes jobs with if: always() aggregators, completing the lane pattern the native and KVM lanes established. This unblocks the ruleset flip: a required context a trigger filter skips stays Expected forever and wedges the PR; a skipped in-workflow job reports skipped, which the aggregators treat as pass. - ci.yml: changes job (code = everything minus md/docs/LICENSE, the old paths-ignore inverted); all six jobs gated; ci-success skip-tolerant. - ci-macos.yml: trigger paths move into a changes filter (keeping the rust-toolchain.toml entry); artifacts/e2e/unit gated (the e2e keeps the RUN_MACOS_CI kill-switch, ANDed); NEW ci-macos-success aggregator - the fifth and final required-check context. - ci-shell-installer.yml: same flip; aggregator now skip-tolerant. - ci-docs-skip.yml DELETED: the inverse-path hack (and its wedge and silent-ungate failure modes) is obsolete - docs-only changes now skip jobs inside always-running workflows. - ci-gvproxy.yml DELETED: pin verification lives at point-of-use (fetch-gvproxy.sh SHA-checks in the KVM lane and release); vendor/gvproxy/** joins the KVM changes filter so a pin bump re-runs the lane that consumes it. - workflow comments drop remaining PR/issue and R-numbers (owner direction: history belongs in commits, not YAML). The ruleset itself still requires only ci-success; flipping it to the five aggregator contexts happens after the soak. Refs: #687 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * ci: gate the new path filters to pull_request events Same fix as the lane hotfix: dorny cannot diff push events against our shallow, credential-free checkouts; pushes to main and dispatches run everything, PRs keep path economy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * ci: persist-credentials false on every checkout The changes jobs hardened their checkouts but the pre-existing job checkouts still left the token in git config; make it uniform across ci.yml and ci-shell-installer.yml. No job in either workflow needs git credentials after checkout. Addresses CodeRabbit review on #712. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
What
Two halves, one dependency chain (the KVM reshape consumes the nextest config):
1.
.config/nextest.toml+--profile ciin core-testsdefault(local runs): surface slow tests at 60s, never kill.ci(core-tests composite →ci.yml test,ci-linux-native tests,release.yml test):fail-fast = false, hung tests hard-killed at 5 min, leak visibility,--no-tests=failso an empty selection fails loudly.vm(the KVM lane's archived harnesses): one VM at a time, boots get a generous 120s slow period but a hung boot dies at 6 minutes instead of burning the 30-minute job timeout, longer leak window for the vmm children.__krun-vmm/gvproxy of the previous attempt (#588); reap +terminate-afterremain the mitigation. And the workspace suite has no recorded flakes to paper over.2. KVM lane end shape (
ci-linux-kvm.yml)testbins.json+run-testbin.sh(deleted):build-linuxshipsnextest-archive.tar.zstin the testbed;test-kvm— still toolchain-free — selects harnesses with filtersets under--profile vm.scripts/session-e2e.sh, the same proof the native and macOS lanes run), covering Deployment Model 3:minimal --minvmd activateauto-spawns minvmd, boots the microVM, round-trips a session exec over the vsock bridge, destroy/stop. The CLI is built inbuild-linuxas a separate cargo invocation (a combined build feature-unifies libkrun into the CLI — the regression class the macOS lane hit) and ships in the testbed; asudoreap precedes it (relay leftovers are root-owned);cli-e2e-boot.logjoins the log artifact.scripts/lifecycle-e2e.sh: PATH-resolved minvmd (no cargo, macOS-reusable), temp workdir, EXIT-trap teardown so a failed assert can't strand a daemon.krun_add_disk3export assert moves intosetup-libkrun-linux, mirroring the macOS composite and closing a gap: release.yml uses the composite and previously had no check. 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), and DM labels are corrected against
docs/specs/03-spec-networking(DM1 is the macOS model; this lane is DM3 —session-e2e.shheader fixed, "DM1 relay" step names now mechanism-descriptive).Part of the CI end-state migration (#687).
Verification
minimald_exec_over_bridge, relay), thendaemon lifecycle OKandsession e2e OK.ci/vmresolve); scripts shellcheck-clean.profile: ci(verified live on the earlier run of this PR: 943 tests, 9 skipped, nothing slow-flagged).🤖 Generated with Claude Code
Summary by CodeRabbit