From 3cbc95392cc9b486073948238a2de45ef992054b Mon Sep 17 00:00:00 2001 From: David Pacheco Date: Wed, 13 Nov 2024 18:50:36 -0800 Subject: [PATCH] update to Dropshot 0.13.0 (minimum changes) (#7050) --- Cargo.lock | 177 ++++++++++++------ Cargo.toml | 4 +- dev-tools/openapi-manager/Cargo.toml | 1 + dev-tools/openapi-manager/src/spec.rs | 31 +-- internal-dns/resolver/Cargo.toml | 1 + internal-dns/resolver/src/resolver.rs | 2 +- .../resolver/tests/output/test-server.json | 2 +- nexus/external-api/src/lib.rs | 2 +- nexus/test-utils/src/http_testing.rs | 1 + openapi/nexus.json | 2 +- oximeter/collector/Cargo.toml | 1 + oximeter/collector/src/bin/oximeter.rs | 2 +- sled-agent/Cargo.toml | 1 + sled-agent/src/sim/http_entrypoints_pantry.rs | 5 +- workspace-hack/Cargo.toml | 8 +- 15 files changed, 159 insertions(+), 81 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7f8bdad908..d31531b977 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -906,7 +906,7 @@ dependencies = [ name = "bootstrap-agent-api" version = "0.1.0" dependencies = [ - "dropshot", + "dropshot 0.13.0", "omicron-common", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -1170,7 +1170,7 @@ version = "0.1.0" dependencies = [ "anyhow", "clap", - "dropshot", + "dropshot 0.13.0", "futures", "libc", "omicron-common", @@ -1337,7 +1337,7 @@ name = "clickhouse-admin-api" version = "0.1.0" dependencies = [ "clickhouse-admin-types", - "dropshot", + "dropshot 0.13.0", "omicron-common", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -1467,7 +1467,7 @@ name = "cockroach-admin-api" version = "0.1.0" dependencies = [ "cockroach-admin-types", - "dropshot", + "dropshot 0.13.0", "omicron-common", "omicron-uuid-kinds", "omicron-workspace-hack", @@ -1692,7 +1692,7 @@ name = "crdb-seed" version = "0.1.0" dependencies = [ "anyhow", - "dropshot", + "dropshot 0.13.0", "omicron-test-utils", "omicron-workspace-hack", "slog", @@ -1841,7 +1841,7 @@ dependencies = [ "anyhow", "atty", "crucible-workspace-hack", - "dropshot", + "dropshot 0.12.0", "nix 0.29.0", "rusqlite", "rustls-pemfile 1.0.4", @@ -2425,7 +2425,7 @@ dependencies = [ "clap", "dns-server-api", "dns-service-client", - "dropshot", + "dropshot 0.13.0", "expectorate", "hickory-client", "hickory-proto", @@ -2460,7 +2460,7 @@ name = "dns-server-api" version = "0.1.0" dependencies = [ "chrono", - "dropshot", + "dropshot 0.13.0", "internal-dns-types", "omicron-workspace-hack", "schemars", @@ -2547,7 +2547,7 @@ dependencies = [ "camino", "chrono", "debug-ignore", - "dropshot_endpoint", + "dropshot_endpoint 0.12.0", "form_urlencoded", "futures", "hostname 0.4.0", @@ -2583,6 +2583,57 @@ dependencies = [ "waitgroup", ] +[[package]] +name = "dropshot" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50976b6bac0894e689bb8ce0e2e5892dfeedb0876408bc806f0582d81824a3b5" +dependencies = [ + "async-stream", + "async-trait", + "base64 0.22.1", + "bytes", + "camino", + "chrono", + "debug-ignore", + "dropshot_endpoint 0.13.0", + "form_urlencoded", + "futures", + "hostname 0.4.0", + "http", + "http-body-util", + "hyper", + "hyper-util", + "indexmap 2.6.0", + "multer", + "openapiv3", + "paste", + "percent-encoding", + "rustls 0.22.4", + "rustls-pemfile 2.2.0", + "schemars", + "scopeguard", + "semver 1.0.23", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sha1", + "slog", + "slog-async", + "slog-bunyan", + "slog-json", + "slog-term", + "thiserror", + "tokio", + "tokio-rustls 0.25.0", + "toml 0.8.19", + "usdt", + "uuid", + "version_check", + "waitgroup", +] + [[package]] name = "dropshot_endpoint" version = "0.12.0" @@ -2597,6 +2648,21 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "dropshot_endpoint" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8371ca3d0ecdd13df8a00acb66312633fc66a5e412076ccbc414238536f8290" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "semver 1.0.23", + "serde", + "serde_tokenstream", + "syn 2.0.87", +] + [[package]] name = "dsl_auto_type" version = "0.1.2" @@ -3257,7 +3323,7 @@ dependencies = [ name = "gateway-api" version = "0.1.0" dependencies = [ - "dropshot", + "dropshot 0.13.0", "gateway-types", "omicron-common", "omicron-uuid-kinds", @@ -3362,7 +3428,7 @@ name = "gateway-test-utils" version = "0.1.0" dependencies = [ "camino", - "dropshot", + "dropshot 0.13.0", "gateway-messages", "gateway-types", "omicron-gateway", @@ -4033,9 +4099,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -4379,7 +4445,7 @@ dependencies = [ "camino-tempfile", "cfg-if", "crucible-smf", - "dropshot", + "dropshot 0.13.0", "futures", "http", "ipnetwork", @@ -4546,7 +4612,7 @@ name = "installinator-api" version = "0.1.0" dependencies = [ "anyhow", - "dropshot", + "dropshot 0.13.0", "hyper", "installinator-common", "omicron-common", @@ -4611,7 +4677,7 @@ version = "0.1.0" dependencies = [ "anyhow", "clap", - "dropshot", + "dropshot 0.13.0", "hickory-resolver", "internal-dns-resolver", "internal-dns-types", @@ -4629,7 +4695,7 @@ dependencies = [ "assert_matches", "dns-server", "dns-service-client", - "dropshot", + "dropshot 0.13.0", "expectorate", "futures", "hickory-resolver", @@ -4641,6 +4707,7 @@ dependencies = [ "progenitor", "qorb", "reqwest", + "semver 1.0.23", "serde", "serde_json", "sled", @@ -5544,7 +5611,7 @@ dependencies = [ "base64 0.22.1", "chrono", "cookie", - "dropshot", + "dropshot 0.13.0", "futures", "headers", "http", @@ -5601,7 +5668,7 @@ version = "0.1.0" dependencies = [ "anyhow", "camino", - "dropshot", + "dropshot 0.13.0", "expectorate", "libc", "omicron-common", @@ -5694,7 +5761,7 @@ dependencies = [ "db-macros", "diesel", "diesel-dtrace", - "dropshot", + "dropshot 0.13.0", "expectorate", "futures", "gateway-client", @@ -5777,7 +5844,7 @@ name = "nexus-external-api" version = "0.1.0" dependencies = [ "anyhow", - "dropshot", + "dropshot 0.13.0", "http", "hyper", "ipnetwork", @@ -5794,7 +5861,7 @@ dependencies = [ name = "nexus-internal-api" version = "0.1.0" dependencies = [ - "dropshot", + "dropshot 0.13.0", "nexus-types", "omicron-common", "omicron-uuid-kinds", @@ -6063,7 +6130,7 @@ dependencies = [ "crucible-agent-client", "dns-server", "dns-service-client", - "dropshot", + "dropshot 0.13.0", "futures", "gateway-messages", "gateway-test-utils", @@ -6124,7 +6191,7 @@ dependencies = [ "cookie", "derive-where", "derive_more", - "dropshot", + "dropshot 0.13.0", "futures", "gateway-client", "http", @@ -6466,7 +6533,7 @@ dependencies = [ "clickhouse-admin-test-utils", "clickhouse-admin-types", "clickward", - "dropshot", + "dropshot 0.13.0", "expectorate", "http", "illumos-utils", @@ -6505,7 +6572,7 @@ dependencies = [ "cockroach-admin-api", "cockroach-admin-types", "csv", - "dropshot", + "dropshot 0.13.0", "expectorate", "http", "illumos-utils", @@ -6547,7 +6614,7 @@ dependencies = [ "camino", "camino-tempfile", "chrono", - "dropshot", + "dropshot 0.13.0", "expectorate", "futures", "hex", @@ -6607,7 +6674,7 @@ version = "0.1.0" dependencies = [ "anyhow", "clap", - "dropshot", + "dropshot 0.13.0", "expectorate", "futures", "libc", @@ -6647,7 +6714,7 @@ dependencies = [ "camino", "chrono", "clap", - "dropshot", + "dropshot 0.13.0", "expectorate", "futures", "gateway-api", @@ -6691,7 +6758,7 @@ version = "0.1.0" dependencies = [ "anyhow", "assert_matches", - "dropshot", + "dropshot 0.13.0", "futures", "internal-dns-resolver", "internal-dns-types", @@ -6766,7 +6833,7 @@ dependencies = [ "dns-server", "dns-service-client", "dpd-client", - "dropshot", + "dropshot 0.13.0", "expectorate", "fatfs", "futures", @@ -6894,7 +6961,7 @@ dependencies = [ "crucible-agent-client", "csv", "diesel", - "dropshot", + "dropshot 0.13.0", "dyn-clone", "expectorate", "futures", @@ -7061,7 +7128,7 @@ dependencies = [ "dns-server", "dns-service-client", "dpd-client", - "dropshot", + "dropshot 0.13.0", "expectorate", "flate2", "flume", @@ -7155,7 +7222,7 @@ dependencies = [ "camino", "camino-tempfile", "chrono", - "dropshot", + "dropshot 0.13.0", "expectorate", "filetime", "futures", @@ -7228,7 +7295,7 @@ dependencies = [ "curve25519-dalek", "digest", "dof", - "dropshot", + "dropshot 0.12.0", "ecdsa", "ed25519-dalek", "either", @@ -7408,7 +7475,7 @@ dependencies = [ "clickhouse-admin-api", "cockroach-admin-api", "dns-server-api", - "dropshot", + "dropshot 0.13.0", "fs-err", "gateway-api", "indent_write", @@ -7422,6 +7489,7 @@ dependencies = [ "owo-colors", "oximeter-api", "repo-depot-api", + "semver 1.0.23", "serde_json", "similar", "sled-agent-api", @@ -7629,7 +7697,7 @@ name = "oximeter-api" version = "0.1.0" dependencies = [ "chrono", - "dropshot", + "dropshot 0.13.0", "omicron-common", "omicron-workspace-hack", "schemars", @@ -7661,7 +7729,7 @@ dependencies = [ "camino", "chrono", "clap", - "dropshot", + "dropshot 0.13.0", "expectorate", "futures", "httpmock", @@ -7682,6 +7750,7 @@ dependencies = [ "rand", "reqwest", "schemars", + "semver 1.0.23", "serde", "serde_json", "slog", @@ -7716,7 +7785,7 @@ dependencies = [ "crossterm", "debug-ignore", "display-error-chain", - "dropshot", + "dropshot 0.13.0", "expectorate", "futures", "gethostname", @@ -7766,7 +7835,7 @@ version = "0.1.0" dependencies = [ "cfg-if", "chrono", - "dropshot", + "dropshot 0.13.0", "futures", "http", "hyper", @@ -7802,7 +7871,7 @@ dependencies = [ "anyhow", "chrono", "clap", - "dropshot", + "dropshot 0.13.0", "internal-dns-resolver", "internal-dns-types", "nexus-client", @@ -8841,7 +8910,7 @@ dependencies = [ "atty", "base64 0.21.7", "clap", - "dropshot", + "dropshot 0.12.0", "futures", "hyper", "progenitor", @@ -8942,7 +9011,7 @@ dependencies = [ "async-trait", "debug-ignore", "derive-where", - "dropshot", + "dropshot 0.12.0", "futures", "hickory-resolver", "rand", @@ -9178,7 +9247,7 @@ dependencies = [ "camino-tempfile", "chrono", "clap", - "dropshot", + "dropshot 0.13.0", "expectorate", "humantime", "indexmap 2.6.0", @@ -9346,7 +9415,7 @@ checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" name = "repo-depot-api" version = "0.1.0" dependencies = [ - "dropshot", + "dropshot 0.13.0", "omicron-common", "omicron-workspace-hack", "schemars", @@ -10483,7 +10552,7 @@ name = "sled-agent-api" version = "0.1.0" dependencies = [ "camino", - "dropshot", + "dropshot 0.13.0", "nexus-sled-agent-shared", "omicron-common", "omicron-uuid-kinds", @@ -10844,7 +10913,7 @@ dependencies = [ "anyhow", "async-trait", "clap", - "dropshot", + "dropshot 0.13.0", "futures", "gateway-messages", "gateway-types", @@ -12327,7 +12396,7 @@ dependencies = [ "clap", "debug-ignore", "display-error-chain", - "dropshot", + "dropshot 0.13.0", "futures", "hex", "hubtools", @@ -12485,9 +12554,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "serde", @@ -12803,7 +12872,7 @@ version = "0.1.0" dependencies = [ "anyhow", "dpd-client", - "dropshot", + "dropshot 0.13.0", "gateway-client", "maplit", "omicron-common", @@ -12859,7 +12928,7 @@ dependencies = [ "debug-ignore", "display-error-chain", "dpd-client", - "dropshot", + "dropshot 0.13.0", "either", "expectorate", "flate2", @@ -12928,7 +12997,7 @@ name = "wicketd-api" version = "0.1.0" dependencies = [ "bootstrap-agent-client", - "dropshot", + "dropshot 0.13.0", "gateway-client", "omicron-common", "omicron-passwords", @@ -13524,7 +13593,7 @@ dependencies = [ "anyhow", "camino", "clap", - "dropshot", + "dropshot 0.13.0", "illumos-utils", "omicron-common", "omicron-sled-agent", diff --git a/Cargo.toml b/Cargo.toml index 7b6e62a6bb..cf8c4cf529 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -359,7 +359,7 @@ dns-server = { path = "dns-server" } dns-server-api = { path = "dns-server-api" } dns-service-client = { path = "clients/dns-service-client" } dpd-client = { path = "clients/dpd-client" } -dropshot = { version = "0.12.0", features = [ "usdt-probes" ] } +dropshot = { version = "0.13.0", features = [ "usdt-probes" ] } dyn-clone = "1.0.17" either = "1.13.0" expectorate = "1.1.0" @@ -814,7 +814,7 @@ opt-level = 3 # It's common during development to use a local copy of various complex # dependencies. If you want to use those, uncomment one of these blocks. # -#[patch."https://github.com/oxidecomputer/dropshot"] +#[patch."crates-io"] #dropshot = { path = "../dropshot/dropshot" } #[patch.crates-io] #steno = { path = "../steno" } diff --git a/dev-tools/openapi-manager/Cargo.toml b/dev-tools/openapi-manager/Cargo.toml index d32477caf3..526d8c3a7e 100644 --- a/dev-tools/openapi-manager/Cargo.toml +++ b/dev-tools/openapi-manager/Cargo.toml @@ -30,6 +30,7 @@ openapiv3.workspace = true owo-colors.workspace = true oximeter-api.workspace = true repo-depot-api.workspace = true +semver.workspace = true serde_json.workspace = true similar.workspace = true sled-agent-api.workspace = true diff --git a/dev-tools/openapi-manager/src/spec.rs b/dev-tools/openapi-manager/src/spec.rs index ff55bbeff5..81ff54f409 100644 --- a/dev-tools/openapi-manager/src/spec.rs +++ b/dev-tools/openapi-manager/src/spec.rs @@ -18,7 +18,7 @@ pub fn all_apis() -> Vec { vec![ ApiSpec { title: "Bootstrap Agent API", - version: "0.0.1", + version: semver::Version::new(0, 0, 1), description: "Per-sled API for setup and teardown", boundary: ApiBoundary::Internal, api_description: @@ -28,7 +28,7 @@ pub fn all_apis() -> Vec { }, ApiSpec { title: "ClickHouse Cluster Admin Keeper API", - version: "0.0.1", + version: semver::Version::new(0, 0, 1), description: "API for interacting with the Oxide \ control plane's ClickHouse cluster keepers", boundary: ApiBoundary::Internal, @@ -39,7 +39,7 @@ pub fn all_apis() -> Vec { }, ApiSpec { title: "ClickHouse Cluster Admin Server API", - version: "0.0.1", + version: semver::Version::new(0, 0, 1), description: "API for interacting with the Oxide \ control plane's ClickHouse cluster replica servers", boundary: ApiBoundary::Internal, @@ -50,7 +50,7 @@ pub fn all_apis() -> Vec { }, ApiSpec { title: "CockroachDB Cluster Admin API", - version: "0.0.1", + version: semver::Version::new(0, 0, 1), description: "API for interacting with the Oxide \ control plane's CockroachDB cluster", boundary: ApiBoundary::Internal, @@ -61,7 +61,7 @@ pub fn all_apis() -> Vec { }, ApiSpec { title: "Oxide Management Gateway Service API", - version: "0.0.1", + version: semver::Version::new(0, 0, 1), description: "API for interacting with the Oxide \ control plane's gateway service", boundary: ApiBoundary::Internal, @@ -72,7 +72,7 @@ pub fn all_apis() -> Vec { }, ApiSpec { title: "Internal DNS", - version: "0.0.1", + version: semver::Version::new(0, 0, 1), description: "API for the internal DNS server", boundary: ApiBoundary::Internal, api_description: @@ -82,7 +82,7 @@ pub fn all_apis() -> Vec { }, ApiSpec { title: "Installinator API", - version: "0.0.1", + version: semver::Version::new(0, 0, 1), description: "API for installinator to fetch artifacts \ and report progress", boundary: ApiBoundary::Internal, @@ -93,7 +93,7 @@ pub fn all_apis() -> Vec { }, ApiSpec { title: "Oxide Region API", - version: "20241204.0", + version: semver::Version::new(20241204, 0, 0), description: "API for interacting with the Oxide control plane", boundary: ApiBoundary::External, api_description: @@ -103,7 +103,7 @@ pub fn all_apis() -> Vec { }, ApiSpec { title: "Nexus internal API", - version: "0.0.1", + version: semver::Version::new(0, 0, 1), description: "Nexus internal API", boundary: ApiBoundary::Internal, api_description: @@ -113,7 +113,7 @@ pub fn all_apis() -> Vec { }, ApiSpec { title: "Oxide Oximeter API", - version: "0.0.1", + version: semver::Version::new(0, 0, 1), description: "API for interacting with oximeter", boundary: ApiBoundary::Internal, api_description: @@ -123,7 +123,7 @@ pub fn all_apis() -> Vec { }, ApiSpec { title: "Oxide TUF Repo Depot API", - version: "0.0.1", + version: semver::Version::new(0, 0, 1), description: "API for fetching update artifacts", boundary: ApiBoundary::Internal, api_description: repo_depot_api::repo_depot_api_mod::stub_api_description, @@ -132,7 +132,7 @@ pub fn all_apis() -> Vec { }, ApiSpec { title: "Oxide Sled Agent API", - version: "0.0.1", + version: semver::Version::new(0, 0, 1), description: "API for interacting with individual sleds", boundary: ApiBoundary::Internal, api_description: @@ -142,7 +142,7 @@ pub fn all_apis() -> Vec { }, ApiSpec { title: "Oxide Technician Port Control Service", - version: "0.0.1", + version: semver::Version::new(0, 0, 1), description: "API for use by the technician port TUI: wicket", boundary: ApiBoundary::Internal, api_description: wicketd_api::wicketd_api_mod::stub_api_description, @@ -158,7 +158,7 @@ pub struct ApiSpec { pub title: &'static str, /// The version. - pub version: &'static str, + pub version: semver::Version, /// The description string. pub description: &'static str, @@ -251,7 +251,8 @@ impl ApiSpec { // impl formats the errors appropriately. anyhow::anyhow!("{}", error) })?; - let mut openapi_def = description.openapi(&self.title, &self.version); + let mut openapi_def = + description.openapi(&self.title, self.version.clone()); openapi_def .description(&self.description) .contact_url("https://oxide.computer") diff --git a/internal-dns/resolver/Cargo.toml b/internal-dns/resolver/Cargo.toml index 7c89fe41c4..e4de05d5c9 100644 --- a/internal-dns/resolver/Cargo.toml +++ b/internal-dns/resolver/Cargo.toml @@ -28,6 +28,7 @@ expectorate.workspace = true omicron-test-utils.workspace = true omicron-uuid-kinds.workspace = true progenitor.workspace = true +semver.workspace = true serde = { workspace = true, features = ["derive"] } serde_json.workspace = true sled.workspace = true diff --git a/internal-dns/resolver/src/resolver.rs b/internal-dns/resolver/src/resolver.rs index afee118124..607588270d 100644 --- a/internal-dns/resolver/src/resolver.rs +++ b/internal-dns/resolver/src/resolver.rs @@ -799,7 +799,7 @@ mod test { // Progenitor client. fn expect_openapi_json_valid_for_test_server() { let api = api(); - let openapi = api.openapi("Test Server", "v0.1.0"); + let openapi = api.openapi("Test Server", semver::Version::new(0, 1, 0)); let mut output = std::io::Cursor::new(Vec::new()); openapi.write(&mut output).unwrap(); expectorate::assert_contents( diff --git a/internal-dns/resolver/tests/output/test-server.json b/internal-dns/resolver/tests/output/test-server.json index 5ed5d37161..0c17af69ee 100644 --- a/internal-dns/resolver/tests/output/test-server.json +++ b/internal-dns/resolver/tests/output/test-server.json @@ -2,7 +2,7 @@ "openapi": "3.0.3", "info": { "title": "Test Server", - "version": "v0.1.0" + "version": "0.1.0" }, "paths": { "/test": { diff --git a/nexus/external-api/src/lib.rs b/nexus/external-api/src/lib.rs index 48e6d3fed3..1c5c7c1d2d 100644 --- a/nexus/external-api/src/lib.rs +++ b/nexus/external-api/src/lib.rs @@ -23,7 +23,7 @@ use omicron_common::api::external::{ use openapi_manager_types::ValidationContext; use openapiv3::OpenAPI; -pub const API_VERSION: &str = "20241204.0"; +pub const API_VERSION: &str = "20241204.0.0"; // API ENDPOINT FUNCTION NAMING CONVENTIONS // diff --git a/nexus/test-utils/src/http_testing.rs b/nexus/test-utils/src/http_testing.rs index 02fb87d74d..afa0a8af03 100644 --- a/nexus/test-utils/src/http_testing.rs +++ b/nexus/test-utils/src/http_testing.rs @@ -89,6 +89,7 @@ impl<'a> RequestBuilder<'a> { body: dropshot::Body::empty(), expected_status: None, allowed_headers: Some(vec![ + http::header::CONNECTION, http::header::CONTENT_ENCODING, http::header::CONTENT_LENGTH, http::header::CONTENT_TYPE, diff --git a/openapi/nexus.json b/openapi/nexus.json index 615585c014..4221b4c411 100644 --- a/openapi/nexus.json +++ b/openapi/nexus.json @@ -7,7 +7,7 @@ "url": "https://oxide.computer", "email": "api@oxide.computer" }, - "version": "20241204.0" + "version": "20241204.0.0" }, "paths": { "/device/auth": { diff --git a/oximeter/collector/Cargo.toml b/oximeter/collector/Cargo.toml index 334b091770..87c82d1183 100644 --- a/oximeter/collector/Cargo.toml +++ b/oximeter/collector/Cargo.toml @@ -28,6 +28,7 @@ qorb.workspace = true rand.workspace = true reqwest = { workspace = true, features = [ "json" ] } schemars.workspace = true +semver.workspace = true serde.workspace = true slog.workspace = true slog-async.workspace = true diff --git a/oximeter/collector/src/bin/oximeter.rs b/oximeter/collector/src/bin/oximeter.rs index efbc53cace..16be3b69e2 100644 --- a/oximeter/collector/src/bin/oximeter.rs +++ b/oximeter/collector/src/bin/oximeter.rs @@ -24,7 +24,7 @@ use uuid::Uuid; pub fn run_standalone_openapi() -> Result<(), String> { standalone_nexus_api() - .openapi("Oxide Nexus API", "0.0.1") + .openapi("Oxide Nexus API", semver::Version::new(0, 0, 1)) .description("API for interacting with Nexus") .contact_url("https://oxide.computer") .contact_email("api@oxide.computer") diff --git a/sled-agent/Cargo.toml b/sled-agent/Cargo.toml index 557dcbcb4e..442ddef7e1 100644 --- a/sled-agent/Cargo.toml +++ b/sled-agent/Cargo.toml @@ -115,6 +115,7 @@ omicron-test-utils.workspace = true pretty_assertions.workspace = true rcgen.workspace = true reqwest = { workspace = true, features = ["blocking"] } +semver.workspace = true subprocess.workspace = true slog-async.workspace = true slog-term.workspace = true diff --git a/sled-agent/src/sim/http_entrypoints_pantry.rs b/sled-agent/src/sim/http_entrypoints_pantry.rs index 0348cc3099..c98c7db665 100644 --- a/sled-agent/src/sim/http_entrypoints_pantry.rs +++ b/sled-agent/src/sim/http_entrypoints_pantry.rs @@ -421,7 +421,10 @@ mod tests { let Value::String(ref version) = real_api["info"]["version"] else { unreachable!(); }; - let sim_api = super::api().openapi(title, version).json().unwrap(); + let sim_api = super::api() + .openapi(title, version.parse().unwrap()) + .json() + .unwrap(); // We'll assert that anything which apppears in the simulated API must // appear exactly as-is in the real API. I.e., the simulated is a subset diff --git a/workspace-hack/Cargo.toml b/workspace-hack/Cargo.toml index f702282bca..27bd0b559b 100644 --- a/workspace-hack/Cargo.toml +++ b/workspace-hack/Cargo.toml @@ -66,7 +66,7 @@ hashbrown = { version = "0.15.0" } hex = { version = "0.4.3", features = ["serde"] } hickory-proto = { version = "0.24.1", features = ["text-parsing"] } hmac = { version = "0.12.1", default-features = false, features = ["reset"] } -hyper = { version = "1.4.1", features = ["full"] } +hyper = { version = "1.5.0", features = ["full"] } indexmap = { version = "2.6.0", features = ["serde"] } inout = { version = "0.1.3", default-features = false, features = ["std"] } itertools-5ef9efb8ec2df382 = { package = "itertools", version = "0.12.1" } @@ -130,7 +130,7 @@ unicode-bidi = { version = "0.3.17" } unicode-normalization = { version = "0.1.24" } usdt = { version = "0.5.0" } usdt-impl = { version = "0.5.0", default-features = false, features = ["asm", "des"] } -uuid = { version = "1.10.0", features = ["serde", "v4"] } +uuid = { version = "1.11.0", features = ["serde", "v4"] } x509-cert = { version = "0.2.5" } zerocopy = { version = "0.7.35", features = ["derive", "simd"] } zeroize = { version = "1.8.1", features = ["std", "zeroize_derive"] } @@ -186,7 +186,7 @@ hashbrown = { version = "0.15.0" } hex = { version = "0.4.3", features = ["serde"] } hickory-proto = { version = "0.24.1", features = ["text-parsing"] } hmac = { version = "0.12.1", default-features = false, features = ["reset"] } -hyper = { version = "1.4.1", features = ["full"] } +hyper = { version = "1.5.0", features = ["full"] } indexmap = { version = "2.6.0", features = ["serde"] } inout = { version = "0.1.3", default-features = false, features = ["std"] } itertools-5ef9efb8ec2df382 = { package = "itertools", version = "0.12.1" } @@ -253,7 +253,7 @@ unicode-normalization = { version = "0.1.24" } unicode-xid = { version = "0.2.6" } usdt = { version = "0.5.0" } usdt-impl = { version = "0.5.0", default-features = false, features = ["asm", "des"] } -uuid = { version = "1.10.0", features = ["serde", "v4"] } +uuid = { version = "1.11.0", features = ["serde", "v4"] } x509-cert = { version = "0.2.5" } zerocopy = { version = "0.7.35", features = ["derive", "simd"] } zeroize = { version = "1.8.1", features = ["std", "zeroize_derive"] }