oxidecomputer / oxidecomputer/opte
Breaking `postcard` version updates cause unclear version mismatch error
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 77
- Forks
- 11
- Avg merge
- 9d 20h
- Merged PRs (30d)
- 8
Description
As seen in omicron#4414, upgrading the version of postcard from 0.x -> 1.x leads to mutual unintelligibility between OPTE 0.25 and 0.26. There is every possibility this could happen again in future: either via postcard 2.0, or we might choose another wire format.
We can probably:
- make this error clearer in the API surface (i.e., indicate in our
Errorimpl that aDeserCmdErrmay well be an API version mismatch). The two main consumers here are opteadm and sled-agent, most likely. - move one or more fields outside of the
OpteCmdIoctlstruct:api_versionbeing the obvious one, or we could prepend a separate wire-format version. This would still cause another messy break in parse behaviour, so we'd need to combine it with some clarifiaction of the failure mode.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the OpteCmdIoctl structure, the DeserCmdErr and Error implementations, and how opteadm and sled-agent consume these errors. Determine how version mismatches currently fail and define a clearer API failure mode, with tests or consumer behavior demonstrating that the mismatch is identifiable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100