fix: remove warning message#214
Conversation
Signed-off-by: Amber Xue <ambermingxin@nvidia.com>
📝 WalkthroughWalkthroughThis PR introduces two independent changes: installation verification documentation now runs the version check with elevated privileges ( ChangesInstallation Verification
GPU UUID Validation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
internal/validation/outbound/validator.go (1)
323-335: 💤 Low valueAccept NVIDIA MIG UUIDs (MIG-*) in validateGPUUUID
validateGPUUUIDonly strips an optionalGPU-prefix beforeuuid.Parse; it doesn’t handle NVML/nvidia-smi MIG UUIDs which use theMIG-<UUID>prefix, so MIG values will triggerinvalid GPU UUID formatwarnings (currently non-blocking). Consider also strippingMIG-(and adding tests).🤖 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 `@internal/validation/outbound/validator.go` around lines 323 - 335, validateGPUUUID currently only strips a "GPU-" prefix before parsing, so NVML/nvidia-smi MIG IDs like "MIG-<UUID>" are rejected; update validateGPUUUID to also detect and strip a "MIG-" prefix (in addition to "GPU-") before calling uuid.Parse, preserving existing behavior for empty/trimmed values and appending the same warning on parse error, and add unit tests covering MIG- prefixed UUIDs (valid and invalid) to validate the change.
🤖 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 `@docs/install-deb.md`:
- Around line 62-63: Update the docs so the version check is consistent and does
not suggest unnecessary privilege: in docs/install-deb.md (and mirror the same
change in docs/install-rpm.md) remove the leading sudo from the example command
so it reads `fleetint --version`; this reflects how the CLI is wired via
cmd/fleetint/root.go using cli.App/app.Version and cli.VersionPrinter which do
not require a Before hook or elevated privileges. If you prefer to keep sudo for
a documented reason, add an explicit rationale in both docs files referencing
the CLI behavior in cmd/fleetint/root.go instead.
---
Nitpick comments:
In `@internal/validation/outbound/validator.go`:
- Around line 323-335: validateGPUUUID currently only strips a "GPU-" prefix
before parsing, so NVML/nvidia-smi MIG IDs like "MIG-<UUID>" are rejected;
update validateGPUUUID to also detect and strip a "MIG-" prefix (in addition to
"GPU-") before calling uuid.Parse, preserving existing behavior for
empty/trimmed values and appending the same warning on parse error, and add unit
tests covering MIG- prefixed UUIDs (valid and invalid) to validate the change.
🪄 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: CHILL
Plan: Enterprise
Run ID: 459834e9-30ab-4845-8e36-4092dd2c9863
📒 Files selected for processing (4)
docs/install-deb.mddocs/install-rpm.mdinternal/validation/outbound/validator.gointernal/validation/outbound/validator_test.go
Description
Checklist
Summary by CodeRabbit
Release Notes
Documentation
Improvements