[propolis-server] pass in api-version header to migrate requests#958
Conversation
Created using spr 1.3.6-beta.1
| req.headers_mut().insert( | ||
| omicron_common::api::VERSION_HEADER, | ||
| HeaderValue::from_str( | ||
| &propolis_server_api::VERSION_INITIAL.to_string(), |
There was a problem hiding this comment.
the tension here is that we don't want to always pick the latest version here, because that might be across a change to the HTTP API, but we probably don't want to always use VERSION_INITIAL here so that we can drop support for ancient propolis-server HTTP APIs over time, right?
does it make sense to suggest bumping this header if we've bumped the propolis-server API version without changing this endpoint? (am I off-base in thinking we'll probably want to keep code for the last like.. one or two API versions in-tree, but not beyond that?)
There was a problem hiding this comment.
does it make sense to suggest bumping this header if we've bumped the propolis-server API version without changing this endpoint?
Ah no, the issue is if a new propolis-server with a newer version hits an old propolis-server without that version, the request will get rejected. So we'll always have to use a version that overlaps with the newest as well as the oldest propolis-server currently deployed.
The exact process of deprecation and removal of old versions is a TBD, but we'll have to consider circumstances like this. Wouldn't worry about it too much for now.
There was a problem hiding this comment.
oh, right, so we'd move this version forward as we deprecate the oldest versions of the API. or something along those lines.
Split out of #955 -- for the
phd-run-migrate-from-basetests to work, this has to be in its own PR that's landed first.