-
Notifications
You must be signed in to change notification settings - Fork 40
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] switch nexus internal API to a trait, add scaffolding to manage it #5844
[nexus] switch nexus internal API to a trait, add scaffolding to manage it #5844
Conversation
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1 [skip ci]
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
// License, v. 2.0. If a copy of the MPL was not distributed with this | ||
// file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
use std::{io::Write, process::ExitCode}; |
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.
A lot of this code is quite generic, and I think can live separately so it can be used by other projects. What do you think about moving this out to the dropshot repo or its own repo?
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.
In a meeting yesterday we decided to wait and see -- leave it in omicron for now but be open to the possibility of putting this code in a central location later.
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1 [skip ci]
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
@@ -3955,6 +3947,14 @@ | |||
"last_port" | |||
] | |||
}, | |||
"ProbeExternalIpKind": { |
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.
was this renamed on purpose?
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.
Yeah -- there's already an ExternalIp
type at
omicron/nexus/types/src/external_api/views.rs
Line 428 in 468e699
pub enum ExternalIp { |
ExternalIp
that are mostly but not entirely isomorphic (e.g. some of them carry around database UUIDs). We should probably revisit this at some point.
bstr-6f8ce4dd05d13bba = { package = "bstr", version = "0.2.17" } | ||
bstr-dff4ba8e3ae991db = { package = "bstr", version = "1.9.1" } |
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.
is this intentional or do we want a single bstr?
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.
hah good question -- this happened because I pulled in the similar
library to do diffs, which depends on bstr 0.2. I filed mitsuhiko/similar#66 about this.
Will fix the test failures and rebase the PR onto main once #6056 lands. |
Created using spr 1.3.6-beta.1
Part of the work on RFD 479 Dropshot API traits.
As a first, impactful example, this PR switches over the Nexus internal API to being defined by a trait. Some minor refactoring was required but overall it took me around half an hour to do this.
Included also is a tool,
cargo xtask openapi
, which is used to manage this and future documents, as well as instructions that folks can hopefully follow.