oxidecomputer / oxidecomputer/opte

Breaking `postcard` version updates cause unclear version mismatch error

Open
#414 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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 Error impl that a DeserCmdErr may 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 OpteCmdIoctl struct: api_version being 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.