-
Notifications
You must be signed in to change notification settings - Fork 63
[nexus] make the external API versioned #9430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[nexus] make the external API versioned #9430
Conversation
Created using spr 1.3.6-beta.1
sudomateo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! I left two comments regarding external clients, specifically the Go SDK.
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
|
|
nexus/external-api/src/lib.rs
Outdated
| } | ||
| if spec.paths.paths.get("/v1/projects").is_none() { | ||
| cx.report_error(anyhow!("Expected a path for /v1/projects")); | ||
| if !is_blessed { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no reason the checks in this if block ever wouldn't be true for blessed specs, right?
Would it make sense to skip the entire "extra" validation for blessed versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The specific thing I'm concerned about here is: what if we add checks in the future that old blessed versions fail? We want to treat blessed versions as immutable after all.
We also want to write tags out for the latest version, regardless of whether it's blessed. That's why the lint checks are guarded by !is_blessed and the tags by is_latest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed this in #oxide-control-plane, decided to split it into two functions to make this clearer. Also added a comment.
Created using spr 1.3.6-beta.1
Updated the generator binary to support versioned Nexus OpenAPI specification files, as introduced in oxidecomputer/omicron#9430. Closes SSE-129.
Updated the generator binary to support versioned Nexus OpenAPI specification files, as introduced in oxidecomputer/omicron#9430. Closes SSE-129.
Updated the generator binary to support versioned Nexus OpenAPI specification files, as introduced in oxidecomputer/omicron#9430. Closes SSE-129.
Part of #9425.
Use a YYYYMMDDNN pattern to allow for multiple API version changes in a day while keeping date-based versioning in place.
Also pull in dropshot and dropshot-api-manager updates, required to make the api-version header optional and support extra validation with versioned APIs, respectively.