refactor: split BmcInfo into BmcEndpoint (ingestion) and BmcStatus (observed)#3969
Open
RajMandaliya wants to merge 10 commits into
Open
refactor: split BmcInfo into BmcEndpoint (ingestion) and BmcStatus (observed)#3969RajMandaliya wants to merge 10 commits into
RajMandaliya wants to merge 10 commits into
Conversation
Keeping Pace with original repo
…bserved) Mirrors the pattern established in NVIDIA#2847 (Machine config/status split): add new, more precisely-scoped messages, populate them alongside the existing flat field, and mark the old field deprecated rather than removing it, so existing consumers are unaffected until a follow-up migration. - Add BmcEndpoint (ip, mac, port, machine_interface_id) on Machine -- ingestion-time connection details, not operator-mutable. - Add BmcStatus (version, firmware_version) on MachineStatus -- observed/runtime state. - Deprecate BmcInfo/Machine.bmc_info, kept fully populated for compatibility. - Regenerated the rest-api Go mirror (nico_nico.proto, nico_nico.pb.go) via make core-proto, matching the same sync step NVIDIA#2847 performed. Verified: clean build across every crate that touches BmcInfo (api-model, api-db, api-web, health, site-explorer, machine-controller, spdm-controller, admin-cli, rpc-utils) and the full rest-api Go module. Addresses NVIDIA#3516. Signed-off-by: RajMandaliya <rajmandaliya2249@gmail.com>
Contributor
|
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 ignored due to path filters (1)
📒 Files selected for processing (5)
Summary by CodeRabbit
WalkthroughThe RPC and REST protobuf schemas separate BMC connection details from observed runtime state, deprecate legacy BMC fields, derive serialization for new RPC types, and map local BMC data into machine responses. ChangesBMC model split
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.44.1)crates/rpc/build.rsast-grep timed out on this file Comment |
RajMandaliya
marked this pull request as ready for review
July 23, 2026 09:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #3516.
Problem
BmcInfocurrently bundles two conceptually different kinds of data into one message: connection details established once at ingestion (ip,mac,port,machine_interface_id) and observed/runtime state (version,firmware_version). Per the design discussion referenced in the issue, these should live in separate messages that match where they actually belong onMachine/MachineStatus.Approach
Mirrors the pattern already established and merged in #2847 (the
Machineconfig/status split): add new, more precisely-scoped messages, populate them alongside the existing flat field, and mark the old field deprecated rather than removing it — so existing consumers are unaffected until a follow-up PR migrates them.BmcEndpoint(ip,mac,port,machine_interface_id) onMachine— ingestion-time connection details, not operator-mutable.BmcStatus(version,firmware_version) onMachineStatus- observed/runtime state.BmcInfo/Machine.bmc_info, kept fully populated for backward compatibility.rest-apiGo mirror (nico_nico.proto,nico_nico.pb.go) viamake core-proto, matching the same syncstep refactor(machine): separate Machine fields into config/status #2847 performed.
Scope
This PR is intentionally limited to the schema/conversion layer - adding the new messages and populating them - without migrating the 25 existing call sites that currently read the deprecated flat
bmc_infofield. That migration is a separate, follow-up piece of work, exactly mirroring how #2847's own consumer migration was tracked as a distinct follow-up (#2798) rather than done in the same PR.Testing
Verified clean build across every crate that touches
BmcInfo(api-model,api-db,api-web,health,site-explorer,machine-controller,spdm-controller,admin-cli,rpc-utils) and the fullrest-apiGo module. Confirmed the field numbers used (52 onMachine, 25 onMachineStatus) were genuinely free before adding them.