Skip to content

Add a stable re-export surface and tests for external rack-init tooling - #11033

Open
sion42x wants to merge 2 commits into
mainfrom
skaram/rack-init-config
Open

Add a stable re-export surface and tests for external rack-init tooling#11033
sion42x wants to merge 2 commits into
mainfrom
skaram/rack-init-config

Conversation

@sion42x

@sion42x sion42x commented Aug 8, 2026

Copy link
Copy Markdown

External testing tools have either hand-maintained config-rss.toml or duplicated the request types, and both break silently when the format moves. This (tiny) crate re-exports everything a RackInitializeRequest is built from and renders the config-rss.toml sled-agent parses.

The tests round-trip constructed requests and the in-tree non-gimlet example through sled-agent's rack_initialize_request_from_file, giving us a CI-side test to catch breaking changes in different scenarios:

  1. Wire-only rename via #[serde(rename)] won't fail on CI or in external tools
  2. Rust-visible rename will fail on CI, the dev will need to rename the field in the literal and nothing happens in external tools until we bump the rev
  3. Shape change, like string -> struct or Vec -> named pool objects (prior breaking issues). In omicron there will be a type mismatch in the literal, so a new shape needs to be constructed, and we will need to update external tools as well to handle the new non-derivable data.

@sion42x
sion42x requested a review from andrewjstone August 8, 2026 20:39
@sion42x sion42x added Testing & Analysis Tests & Analyzers Sled Agent Related to the Per-Sled Configuration and Management development Bugs, paper cuts, feature requests, or other thoughts on making omicron development better labels Aug 8, 2026

@andrewjstone andrewjstone left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Comment thread dev-tools/rack-init-config/src/lib.rs Outdated
(0..3)
.map(|index| BaseboardId {
part_number: "913-0000019".to_string(),
serial_number: format!("BRM4222000{index}"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use the "2FAKE00{index}" format for consistency with everything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development Bugs, paper cuts, feature requests, or other thoughts on making omicron development better Sled Agent Related to the Per-Sled Configuration and Management Testing & Analysis Tests & Analyzers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants