Skip to content

Conversation

@sunshowers
Copy link
Contributor

@sunshowers sunshowers commented Jan 21, 2026

Mostly one-shot with Claude Code with the following prompt:

Fetch https://raw.githubusercontent.com/oxidecomputer/dropshot-api-manager/refs/heads/main/guides/new-version.md using curl (do not summarize) and follow it to add a new version to the Propolis API which makes the following changes:

1. Add a `model_number` field to NvmeDisk which is a [u8; 40]. Annotate it with `#[serde(with = "serde_human_bytes::HexArray::<40>")], where serde_human_bytes is a git dependency https://github.com/oxidecomputer/serde_human_bytes, branch main. (A local copy of the dep is at ../serde_human_bytes.)
2. Update the `serial_number` field to also have a serde(with) with `HexArray::<20>`.
3. Update all types that depend on this as needed.

I've left the actual implementation as a TODO (search for TODO in the docs) but hopefully this is a good place to get started.

TODO:

  • Fill in implementation
  • Ensure phd-tests changes are correct

Created using spr 1.3.6-beta.1
@sunshowers sunshowers marked this pull request as draft January 21, 2026 23:31
Created using spr 1.3.6-beta.1
backend_id: old.backend_id,
pci_path: old.pci_path,
serial_number: old.serial_number,
model_number: [0u8; 40],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note this -- not sure what to do here.

Comment on lines +1628 to +1649
"model_number": {
"description": "The model number to return in response to an NVMe Identify Controller command.",
"type": "string",
"pattern": "^[0-9a-fA-F]{80}$",
"minLength": 80,
"maxLength": 80
},
"pci_path": {
"description": "The PCI bus/device/function at which this disk should be attached.",
"allOf": [
{
"$ref": "#/components/schemas/PciPath"
}
]
},
"serial_number": {
"description": "The serial number to return in response to an NVMe Identify Controller command.",
"type": "string",
"pattern": "^[0-9a-fA-F]{40}$",
"minLength": 40,
"maxLength": 40
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note model_number and serial_number here

Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants