chore: Remove deprecated flat fields from Vpc object - #4382
Conversation
Summary by CodeRabbit
WalkthroughVPC protobuf contracts now reserve deprecated flat fields. RPC mappings, fixtures, CLI output, and web rendering use structured ChangesStructured VPC Migration
BMC Rotation Device Targeting
Estimated code review effort: 3 (Moderate) | ~30 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
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. |
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-07-30 17:22:05 UTC | Commit: 3328713 |
|
/ok to test b23ac64 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
🌿 Preview your docs: https://nvidia-preview-pull-request-4382.docs.buildwithfern.com/infra-controller |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
crates/rpc/proto/forge.proto (2)
1692-1693: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winReserve
dpa_vniby name in both schemas.Both definitions reserve field number
12but omit the legacy field name. Addreserved "dpa_vni";in each message.
crates/rpc/proto/forge.proto#L1692-L1693: add the reserved name alongsidereserved 12.rest-api/proto/core/src/v1/nico_nico.proto#L1671-L1672: add the reserved name alongsidereserved 12.As per path instructions, protobuf field numbers and names must preserve compatibility.
🤖 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/rpc/proto/forge.proto` around lines 1692 - 1693, Reserve the legacy dpa_vni field name alongside field number 12 in both schemas: update crates/rpc/proto/forge.proto lines 1692-1693 and rest-api/proto/core/src/v1/nico_nico.proto lines 1671-1672 with the named reservation, preserving both number and name compatibility.Source: Path instructions
5892-5905: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winPreserve the original
bmc_macfield number in both schemas.Reusing tag
3forswitch_idwhile movingbmc_macto tag4breaks protobuf wire compatibility for rolling upgrades and previously serialized requests.
crates/rpc/proto/forge.proto#L5892-L5905: retainbmc_mac = 3and assignswitch_idan unused tag.rest-api/proto/core/src/v1/nico_nico.proto#L5893-L5905: retainbmc_mac = 3and assignswitch_idan unused tag.As per path instructions, protobuf field numbers must preserve wire compatibility. The supplied change details identify the previous
bmc_mactag as3.🤖 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/rpc/proto/forge.proto` around lines 5892 - 5905, Preserve the original bmc_mac field number in both schemas: in crates/rpc/proto/forge.proto lines 5892-5905 and rest-api/proto/core/src/v1/nico_nico.proto lines 5893-5905, keep bmc_mac as field 3 and assign switch_id an unused field number instead; update the device_id oneof consistently in both files.Source: 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.
Outside diff comments:
In `@crates/rpc/proto/forge.proto`:
- Around line 1692-1693: Reserve the legacy dpa_vni field name alongside field
number 12 in both schemas: update crates/rpc/proto/forge.proto lines 1692-1693
and rest-api/proto/core/src/v1/nico_nico.proto lines 1671-1672 with the named
reservation, preserving both number and name compatibility.
- Around line 5892-5905: Preserve the original bmc_mac field number in both
schemas: in crates/rpc/proto/forge.proto lines 5892-5905 and
rest-api/proto/core/src/v1/nico_nico.proto lines 5893-5905, keep bmc_mac as
field 3 and assign switch_id an unused field number instead; update the
device_id oneof consistently in both files.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d49c4a46-24b0-4753-b987-72f003addbb8
⛔ Files ignored due to path filters (1)
rest-api/proto/core/gen/v1/nico_nico.pb.gois excluded by!**/*.pb.go,!**/gen/**,!rest-api/**/*.pb.go
📒 Files selected for processing (2)
crates/rpc/proto/forge.protorest-api/proto/core/src/v1/nico_nico.proto
Since the REST API no longer relies on the deprecated Vpc fields that were relocated to the
Metadata,VpcConfigandVpcStatus, we can now go ahead and remove those fields. This work removes fallback logic to those deprecated fields that was present in the admin cli and admin ui logic and updates tests as necessary.Related issues
#2794
Type of Change
Breaking Changes
Direct clients of the gRPC API for VPCs will be forced to migrate to the structured fields, but we do not guarantee that the gRPC API is backward-compatible (https://github.com/NVIDIA/infra-controller/blob/main/docs/development/release_and_qa_process.md#what-is-explicitly-not-guaranteed)
Testing
Additional Notes