fix(machine-validation): skip reboot when disabled#2488
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis PR refactors machine validation skip behavior when disabled: introduces a reusable skip helper that marks validations as skipped and transitions hosts appropriately, integrates it into the validation state handler, updates test infrastructure to handle the new terminal state, and verifies via regression tests that reboot invariance is preserved. ChangesMachine Validation Skip Behavior
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes The PR exhibits moderate-to-high complexity due to: (1) dense state-machine logic in handler and fixture refactoring, (2) heterogeneous changes across three files with interdependencies, (3) new test infrastructure requiring careful inspection of state branching and assertions, and (4) the need to verify that skip semantics correctly suppress reboot behavior and mark validation status without regression. The implementation is clean and avoids duplication, but the state transitions and test harness updates warrant thorough verification. Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
77f0979 to
3793d9f
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
3793d9f to
958d9bd
Compare
958d9bd to
aad6829
Compare
|
@sunilkumar-nvidia please review |
|
/ok to test aad6829 |
|
fyi @iExalt GitHub can't verify your signed commits belong to you, they show as unverified. |
|
🌿 Preview your docs: https://nvidia-preview-pull-request-2488.docs.buildwithfern.com/infra-controller |
|
Thanks for the PR, this avoids unnecessary reboots when machine validation is disabled and should save time in skipped-validation flows. |
this is a problem when using GH to rebase, let me rebase locally |
dd34735 to
0321659
Compare
489aa00 to
81bc0e4
Compare
Signed-off-by: Clement Liaw <clliaw@nvidia.com>
81bc0e4 to
7a21474
Compare
Description
NICO currently enters the machine-validation reboot path even when machine validation is disabled, issuing an unnecessary host restart and increasing startup latency.
This change:
RebootHost, before issuing a host rebootRebootHostandMachineValidatingType of Change
Related Issues (Optional)
Related to #2486 feat: skip machine validation reboot when validation is disabled
Breaking Changes
Testing
Validation performed against current
NVIDIA/infra-controller:main:git diff --checkcargo fmt --all -- --checkcargo test -p carbide-machine-controller(19 passed)cargo test -p carbide-api-core --no-default-features --no-runAdditional Notes