fix(runner): make managed resource gc reference-safe - #30093
Conversation
|
API preview: https://pr-30093-api.vm6.ai |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Code Review: PR #30093Reviewed head: SummaryThe current head replaces inferred version/name ownership with an explicit, fail-closed deployment inventory, preserves mixed-version rollout safety, and keeps directory, config, service, and image authorities separate. Self-review fixes for partial mutation failures and target inventory completeness are present and covered. FindingsNo findings. TestingRust formatting, Clippy, docs, the scoped GC suite (167 passed, 4 ignored), and production promotion/rollback contract tests passed locally. The Ruby-backed Turbo workflow contract test could not run in this container because VerdictLGTM |
d98136c to
fcaf3fe
Compare
Code Review: PR #30093Reviewed head: SummaryThe current head removes name/version-based deployment ownership, discovers persistent installed services internally, keeps service/bin/Runner identities independent, and preserves rollout compatibility. It also distinguishes immutable activation snapshots, exact managed source configs, externally managed configs, and source-unknown legacy snapshots without inferring deletion authority. FindingsNo findings. TestingRust formatting, Clippy, documentation, full Runner tests (3343 passed, 27 ignored, plus guest inventory), focused deployment/parser scenarios, file-size validation, and production/dev/CI shell contract tests passed locally. Required hosted checks and metal behavior lanes are still running on this head. VerdictLGTM |
5e0f5d5 to
5e1b5d2
Compare
5c6e2f4 to
707a129
Compare
Code Review: PR #30093Reviewed head: SummaryThe current head makes managed FindingsNo findings. Self-review findings around external executables and symlinks, managed-path grammar, TestingAfter rebasing onto VerdictLGTM |
Code Review: PR #30093Reviewed head: SummaryThe current head uses managed FindingsNo findings. The self-review finding around an apparently successful uninstall leaving a persistent unit file, and the stale host selector documentation, are fixed and covered on this head. TestingRust formatting, Clippy, documentation, the managed-resource GC suite (32 passed, 1 ignored child harness), the complete Runner suite (3365 passed, 26 ignored, plus guest inventory), Markdown formatting, and the relevant dev/promotion/attribution/Runner-image shell tests passed locally. The first full-suite attempt reproduced the known unrelated heartbeat timing race in #30179; its exact rerun and the second complete suite passed. Hosted CI remains authoritative for metal behavior. VerdictLGTM |
Summary
bin/andrunners/roots as an independent GC candidate, with path validation independent of Runner/service creation grammar, while discovering persistent Runner services separately--protect-versionand old-Runner capability probe only for rollout compatibilityExplicit exclusions
systemd-runservices; they are reference-only inventoryCompatibility
--protect-versionmaps one opaque value into the three independent keep sets.Existing direct-config and activation-snapshot units remain readable without migration metadata. The stable
/var/lib/vm0-runner/locks/deployment-gc.lockordering remains the cross-version serialization boundary.Validation
cargo fmt --all -- --checkcargo clippy -p runner --all-targets --all-features -- -D warningscargo doc -p runner --all-features --no-depscargo test -p runner --bin runner cmd::gc::deployments::tests:: -- --nocapture(32 passed, 1 ignored child harness)cargo test -p runner --all-targets --all-features --quiet(3365 passed, 26 ignored; guest inventory integration passed)pnpm prettier --check --ignore-unknown ../docs/runner-host-configuration.mdbash -n scripts/dev-runner.sh .github/scripts/tests/dev-runner-test.sh .github/scripts/tests/runner-promotion-ansible-test.sh .github/scripts/prepare-runner-image.sh .github/scripts/tests/prepare-runner-image-test.sh .github/scripts/tests/runner-attribution-ansible-test.shbash .github/scripts/tests/dev-runner-test.shbash .github/scripts/tests/runner-promotion-ansible-test.shbash .github/scripts/tests/runner-attribution-ansible-test.shbash .github/scripts/tests/prepare-runner-image-test.sh./scripts/check-file-size.shThe first full-suite attempt reproduced the known unrelated heartbeat timing race tracked by #30179. Its exact test passed immediately afterward, and the second complete suite passed with the results above.
Closes #29907
Relates to #30043
Follow-up: #30102