fix(onboard): repair journaled rebuild image retirement - #8655
Conversation
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughSandbox recreation now passes lifecycle generation directly, delays source-image cleanup until replacement identity is registered, validates cleanup authority, reports skip reasons, and records validated replacement lifecycle receipts in rebuild artifacts. ChangesSandbox recreation lifecycle and cleanup
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Onboard
participant SandboxGpuCreateFlow
participant LifecycleInstaller
participant Registry
Onboard->>SandboxGpuCreateFlow: pass recreation lifecycleGeneration
SandboxGpuCreateFlow->>LifecycleInstaller: install lifecycle
LifecycleInstaller-->>SandboxGpuCreateFlow: return registryGeneration
SandboxGpuCreateFlow-->>Onboard: return lifecycle registration
Onboard->>Registry: register replacement sandbox
Registry-->>Onboard: persist replacement identity
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@src/lib/onboard/sandbox-gpu-create-flow.test.ts`:
- Around line 683-691: The test mock for installPortableDemoLifecycle in
runSandboxGpuCreateFlow must return the received registryGeneration option
instead of input.lifecycleGeneration. Keep the existing
lifecycleRegistrationFields assertion so the test verifies registryGeneration is
forwarded through the portable lifecycle installer.
In `@test/e2e/support/rebuild-hermes-image-state.test.ts`:
- Around line 43-59: Extend the test for
requireRebuildHermesReplacementLifecycleReceipt with a receipt whose
lifecycleGeneration is a syntactically valid non-version-4 UUID, while retaining
the valid receipt and missing-generation cases. Assert that this receipt is
rejected for lifecycle generation validation.
🪄 Autofix
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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 9005fd02-2ac2-4a1c-806f-15eab0bbb196
📒 Files selected for processing (11)
src/lib/onboard.tssrc/lib/onboard/machine/handlers/sandbox-recreate-journal.test.tssrc/lib/onboard/machine/handlers/sandbox.tssrc/lib/onboard/runtime-provider/replaced-workload.test.tssrc/lib/onboard/sandbox-gpu-create-flow.test.tssrc/lib/onboard/sandbox-gpu-create-flow.tssrc/lib/onboard/sandbox-recreate-transaction.tstest/e2e/live/rebuild-hermes-image-state.tstest/e2e/live/rebuild-hermes.test.tstest/e2e/support/rebuild-hermes-image-state.test.tstest/onboard-sandbox-recreation.test.ts
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
Second-opinion terminology and E2E selections are advisory. Live E2E does not run automatically for pull requests. 2 semantic terminology decisionsTerminology decisions are advisory. They affect the assessment only when a separate finding identifies concrete semantic impact.
E2E guidanceAdvisory only. A maintainer can dispatch the default E2E suite against this exact revision. Recommended E2E: This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge. |
Signed-off-by: Apurv Kumaria <akumaria@nvidia.com>
Summary
Journaled same-name rebuilds now register the replacement's live lifecycle identity after creation and retire an obsolete owned Docker image only after exact replacement and ownership proof. Skipped retirements emit bounded reason codes, and the Hermes rebuild fixture records exact provider, workload, and replacement lifecycle evidence.
Related Issue
Related: #8590
Changes
Type of Change
Quality Gates
1c296f8d6354658bb2317087dbdaf49516d8ac6db44d102c172ee7f9ab24cca5; final commit-object/tree rebind passed for9d85c318882ff4c88a5b12f3205732b725593b02.Documentation Writer Review
no-docs-neededdocs/manage-sandboxes/recover-rebuild-sandboxes.mdx; its existing identity, generation, owned-image retirement, retention, and fail-closed contract remains accurate.DGX Station Hardware Evidence
scripts/prepare-dgx-station-host.shis unchanged.Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailabletest/onboard-sandbox-recreation.test.tspassed 11/11; E2E support tests passed 5/5.npm run typecheck:cli,npm run checks:repository, title/project/size/source-shape checks, changed-path Biome checks, andgit diff --checkalso passed.npm testfor broad runtime/test-harness changes;npm run checkfor repo-wide validation/coverage changes — command/result:npm run docsbuilds without warnings (doc changes only)Signed-off-by: Apurv Kumaria akumaria@nvidia.com
Summary by CodeRabbit
Bug Fixes
Tests