Repository navigation
Accept renamed nvidia-smi banner fields - #1748
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthrough
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
b6ba333 to
186da9e
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 `@validators/deployment/nvidia_smi_test.go`:
- Around line 32-71: Add table-driven test cases in the existing NVIDIA-SMI log
verification tests for logs missing the NVIDIA-SMI marker and logs missing
gpuCheckSuccessMsg. Assert the expected missing-marker errors while retaining
the existing driver/CUDA validation cases.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: d73d4ad7-16bb-4568-be75-6f519bcfe38b
📒 Files selected for processing (2)
validators/deployment/nvidia_smi.govalidators/deployment/nvidia_smi_test.go
There was a problem hiding this comment.
♻️ Duplicate comments (1)
validators/deployment/nvidia_smi_test.go (1)
32-79: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winCoverage gap persists: no case for solo-missing NVIDIA-SMI or success marker.
All test cases exercise the driver/CUDA alternation groups, but
verifyNvidiaSMILogsalso treats{"NVIDIA-SMI"}and{gpuCheckSuccessMsg}as mandatory single-marker groups (nvidia_smi.go lines 173, 176). No case asserts the exact error when either of those is absent — this was already raised in a prior review pass and remains unaddressed.🤖 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 `@validators/deployment/nvidia_smi_test.go` around lines 32 - 79, The test table in the NVIDIA-SMI log verification tests lacks coverage for missing single mandatory markers. Add cases where logs omit “NVIDIA-SMI” and where logs omit gpuCheckSuccessMsg, asserting the exact verifyNvidiaSMILogs error for each missing marker while retaining the existing driver/CUDA group coverage.
🤖 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.
Duplicate comments:
In `@validators/deployment/nvidia_smi_test.go`:
- Around line 32-79: The test table in the NVIDIA-SMI log verification tests
lacks coverage for missing single mandatory markers. Add cases where logs omit
“NVIDIA-SMI” and where logs omit gpuCheckSuccessMsg, asserting the exact
verifyNvidiaSMILogs error for each missing marker while retaining the existing
driver/CUDA group coverage.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 49d5e823-cb69-403c-ad29-11c649b62767
📒 Files selected for processing (2)
validators/deployment/nvidia_smi.govalidators/deployment/nvidia_smi_test.go
2fb7b42 to
629e116
Compare
mchmarny
left a comment
There was a problem hiding this comment.
Correct fix with the right shape: any-of marker groups keep the NVIDIA-SMI and success markers mandatory while accepting either the legacy or renamed driver/CUDA fields, so the gate still fails closed when neither alternative is present. The case-insensitivity rationale is well-argued (the renamed fields' table-banner casing isn't pinned anywhere authoritative, and the verified stream is only nvidia-smi output plus the controlled success echo, so false-positive risk is negligible). Verified the banner strings aren't matched anywhere else in the repo — the DCGM Driver Version hits in gpu-operator values are metric labels, unrelated. Exact-string error assertions pin the diagnostic format, and the new test file takes verifyNvidiaSMILogs to 100%. CI green, no blockers.
njhensley
left a comment
There was a problem hiding this comment.
Multi-persona review + adversarial verification — Approve ✅
Reviewed by an independent 3-lens panel (correctness · false-positive/robustness · test-coverage), then the false-positive-safety claim was re-derived from the code by an adversarial meta-reviewer — the important axis here, since accepting an unhealthy GPU is the dangerous direction.
It's safe: verifyNvidiaSMILogs is a secondary output-shape check reachable only after the verify pod reached Succeeded (i.e. nvidia-smi already exited 0 and the &&-gated GPU_CHECK_SUCCESS echo ran). Case-insensitivity only loosens which banner spellings are accepted; it never rejects less on the exit-0 gate and introduces no new unhealthy-passes path. The any-of group logic correctly requires ≥1 member of each of the 4 groups. The CUDA Driver Version: ⊇ Driver Version: substring overlap is pre-existing (old code used the same Contains), not introduced by the restructuring. Error strings match pkg/errors output byte-for-byte; all subtests pass under -race.
Non-blocking follow-up (🟡):
- 🟡 No explicit negative test for a coincidental
version:in unrelated log noise. The group-isolation tests functionally cover it, but an explicit rejection case (e.g."libfoo version: 1.2\n" + gpuCheckSuccessMsg→ expect reject on both banner groups) would document the false-positive-guard intent. Optional.
No blockers or majors.
629e116 to
5c511dc
Compare
Signed-off-by: Yuan Chen <[email protected]>
5c511dc to
a693bf6
Compare
…ge gate Makefile excluded /validators from 'go list ./...' in make test, so regression suites added in NVIDIA#1745/NVIDIA#1748 (and the older nvidia-smi, inference-perf, nccl, conformance tests) never ran in CI. - Drop -e /validators from the make test package filter. - Exclude validators/ from the test-coverage threshold calc (its package coverage is 41-92%, pulling aggregate from 80.0% to 75.7% and breaking the 80% gate) while still running its tests. Fixes NVIDIA#1752 Signed-off-by: Mohit Yadav <[email protected]>
Summary
Accept both legacy and renamed NVIDIA driver banner fields when verifying
nvidia-smilogs. Add table-driven regression coverage for both formats and for missing driver/CUDA alternatives.Motivation / Context
Newer drivers report
KMD Version:andCUDA UMD Version:instead of the legacyDriver Version:andCUDA Version:fields. The validator currently treats healthy GPU nodes using the renamed fields as failures.Fixes: #1667
Related: N/A
Type of Change
Component(s) Affected
cmd/aicr,pkg/cli)cmd/aicrd,pkg/server)pkg/recipe)pkg/bundler,pkg/component/*)pkg/collector,pkg/snapshotter)pkg/validator)pkg/errors,pkg/k8s)docs/,examples/)Implementation Notes
verifyNvidiaSMILogsnow evaluates required markers as any-of groups. The NVIDIA-SMI and success markers remain mandatory, while either the legacy or renamed form satisfies each driver and CUDA version group. The renamed-field regression fixture uses a representative NVIDIA-SMI 610.43.02 table banner (KMD Version:/CUDA UMD Version:) modeled on the renamed-field driver output described in #1667. Matching is case-insensitive: the renamed fields' casing is otherwise documented only vianvidia-smi --versiondeprecation text (lowercase "KMD version"), so casing variants across driver branches cannot reintroduce the false negative; diagnostics keep canonical casing. Missing-marker diagnostics separate multiple unsatisfied groups with semicolons.Testing
validators/deploymentcoverage: 48.3% → 50.8% (+2.5 percentage points);verifyNvidiaSMILogs: 100%.Risk Assessment
Rollout notes: Backward compatible; existing
Driver Version:andCUDA Version:banners remain accepted. No migration or feature flag is required.Checklist
make testwith-race)make lint)git commit -S) — GPG signing info