Breaking `postcard` version updates cause unclear version mismatch error

Aperta
#414 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
api, networking

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

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.
Lingua principale
Rust
Stelle
82
Fork
16
Merge medio
3g 6h
PR unite (30g)
11

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di oxidecomputer/opte

Tutte le issue di oxidecomputer/opte

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.