You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This originally came up in the last few days before cutting R18 on #9570 (comment), where we needed to make changes to types stored in the bootstore and got extremely lucky that the changes we needed to make were all wire-compatible with the old types (specifically: changing Ipv4Addr-like types to IpAddr-like types, and changing required fields to Options). But this highlighted that we need a coherent story about how to make non-backwards-compatible changes. We discussed this during the update watercooler on Feb 3, and came up with this tentative plan:
Pull the bootstore types out of omicron-common and into their own RFD 619-style crate. The exact organization here is TBD, because these types are pretty varied: some - like RackNetworkConfig - are only used in the bootstore and the lockstep-as-of-ipv6 e2e integration #9570 bootstrap-agent-api, but contain types that are used in the sled-agent API or the Nexus external API or both. (This is why they've been in omicron-common this whole time.)
Change the deserialization of EarlyNetworkConfig to be two-pass, where the first pass reads the schema_version and the second pass reads the body as the appropriate version of EarlyNetworkConfigBody (based on schema_version).
Add tests that ensure if a new version is made to the bootstore types crate, we update the parsing of EarlyNetworkConfig. (We do something similar for the on-disk-serialized OmicronSledConfigs inside sled-agent-config-reconciler, although there we don't have the schema_version envelope and really should.) This relies on the existing dropshot / OpenAPI tooling keeping us honest w.r.t. only making changes to the bootstore types by adding new versions; this may require creating a "dummy" server API to cover any types that aren't covered by existing versioned APIs.
The urgency on this is pretty high; as noted above we got quite lucky that we didn't need to do this work for R18, and we really want to have all of this in place before we need to make any more changes to any of the types kept in the bootstore.
This originally came up in the last few days before cutting R18 on #9570 (comment), where we needed to make changes to types stored in the bootstore and got extremely lucky that the changes we needed to make were all wire-compatible with the old types (specifically: changing
Ipv4Addr-like types toIpAddr-like types, and changing required fields toOptions). But this highlighted that we need a coherent story about how to make non-backwards-compatible changes. We discussed this during the update watercooler on Feb 3, and came up with this tentative plan:omicron-commonand into their own RFD 619-style crate. The exact organization here is TBD, because these types are pretty varied: some - likeRackNetworkConfig- are only used in the bootstore and the lockstep-as-of-ipv6 e2e integration #9570 bootstrap-agent-api, but contain types that are used in the sled-agent API or the Nexus external API or both. (This is why they've been inomicron-commonthis whole time.)EarlyNetworkConfigto be two-pass, where the first pass reads theschema_versionand the second pass reads the body as the appropriate version ofEarlyNetworkConfigBody(based onschema_version).EarlyNetworkConfig. (We do something similar for the on-disk-serializedOmicronSledConfigs inside sled-agent-config-reconciler, although there we don't have theschema_versionenvelope and really should.) This relies on the existing dropshot / OpenAPI tooling keeping us honest w.r.t. only making changes to the bootstore types by adding new versions; this may require creating a "dummy" server API to cover any types that aren't covered by existing versioned APIs.The urgency on this is pretty high; as noted above we got quite lucky that we didn't need to do this work for R18, and we really want to have all of this in place before we need to make any more changes to any of the types kept in the bootstore.