feat: Adding VR hardware type to BMC explorer#2910
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. |
|
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Summary by CodeRabbit
WalkthroughAdds Vera Rubin hardware support to ChangesVera Rubin Hardware Platform
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
martinraumann
left a comment
There was a problem hiding this comment.
Can we add a VR scrape-backed mock/test, or link the source for the VR Redfish assumptions this PR relies on?
The new behavior depends on VR-specific details that are not otherwise verifiable in this diff: NVIDIA / VR NVL72 detection, HGX_GPU_ chassis IDs for PCIe discovery, /MAC(...)/IPv4(...)/Uri() boot-option paths, the expected BIOS attrs, and the EmbeddedUefiShell = Disabled infinite-boot polarity.
Without that fixture/source, a wrong chassis prefix or boot path shape could make VR setup validation silently incomplete.
I tested this change with running bmc-explorer-cli on a VR host BMC and added some of the output in the PR description. This test proves the set of changes in this PR work as expected. As for additional tests with BMC mocks, I think it can be done outside of this PR. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/bmc-explorer/src/lib.rs (1)
194-199: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftAdd a scrape-backed regression test for the VR contract.
This change hard-codes the Vera Rubin Redfish signature in three places: product detection (
"VR NVL72"), PCIe chassis selection ("HGX_GPU_"), and setup validation (UEFI path/BIOS keys). Without a fixture-backed test, a later refactor can silently reclassify VR asNone/Gb200or drop GPU PCIe discovery without CI catching it. Please add a canned scrape or mock that exerciseshw_type(), the PCIe chassis filter, andmachine_setup_status()against the VR shape. As per coding guidelines, "Add or update focused tests for bug fixes, shared behavior, API contracts, migrations, and cross-module changes." Based on path instructions, "Prefer findings about behavior, concurrency, resource lifetimes, and missing tests over style-only comments."Also applies to: 315-319, 877-898
🤖 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 `@crates/bmc-explorer/src/lib.rs` around lines 194 - 199, Add a scrape-backed regression test for the Vera Rubin contract so future refactors can’t silently change behavior. Create a canned scrape/mock that exercises hw_type(), the PCIe chassis selection logic using the chassis.id() prefix check, and machine_setup_status() against a VR-shaped system. Verify the test covers the VR-specific detection path, GPU PCIe discovery, and setup validation using the existing hard-coded VR Redfish signatures.Sources: Coding guidelines, Path instructions
🤖 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.
Nitpick comments:
In `@crates/bmc-explorer/src/lib.rs`:
- Around line 194-199: Add a scrape-backed regression test for the Vera Rubin
contract so future refactors can’t silently change behavior. Create a canned
scrape/mock that exercises hw_type(), the PCIe chassis selection logic using the
chassis.id() prefix check, and machine_setup_status() against a VR-shaped
system. Verify the test covers the VR-specific detection path, GPU PCIe
discovery, and setup validation using the existing hard-coded VR Redfish
signatures.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 409c3836-b223-4d45-93e5-375525980df4
📒 Files selected for processing (3)
crates/bmc-explorer/src/hw/mod.rscrates/bmc-explorer/src/hw/vera_rubin.rscrates/bmc-explorer/src/lib.rs
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
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 `@crates/bmc-explorer/src/lib.rs`:
- Around line 891-901: The UEFI boot option matching in the boot validation
logic is too strict because it only looks for "/MAC(" inside the device path,
which misses valid paths that start with "MAC(...)/IPv4(...)/Uri()". Update the
predicate in the boot order check around boot_order_first_option and
option.uefi_device_path() so it matches MAC without requiring a leading slash,
and normalize the path and MAC string to a consistent case before comparing.
Keep the existing IPv4 and Uri() checks intact while making the MAC comparison
tolerant of start-of-path device paths.
🪄 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: 6475596f-80a5-4da0-b5cd-cff969dbe425
📒 Files selected for processing (2)
crates/bmc-explorer/src/hw/mod.rscrates/bmc-explorer/src/lib.rs
💤 Files with no reviewable changes (1)
- crates/bmc-explorer/src/hw/mod.rs
Adds Vera Rubin (VR) hardware type to bmc explorer. We will need further changes to libredfish and nvredfish for end to end VR compute tray ingestion.
Related issues
(https://jirasw.nvidia.com/browse/FORGE-8111)
Type of Change
Testing:
I used
bmc-explorer-cli --mode nv-redfishon a Vera Rubin host BMC and the exploration was successful. Here are some details from the output: