From ca6301b4e0cf77861ad7c4523eb206515967bc99 Mon Sep 17 00:00:00 2001 From: Adam Leventhal Date: Tue, 13 Feb 2024 22:30:55 -0800 Subject: [PATCH 1/3] bump external API version number (#5004) This is a semi-cowardly approach. Rather than actually implementing the non-integer we [determined](https://rfd.shared.oxide.computer/rfd/0299#_determinations), this moves us from 0.0.1 to 0.0.6 (6 for release 6). This is to dry run the oxide.rs [versioned release process](https://github.com/oxidecomputer/oxide.rs?tab=readme-ov-file#determine-the-version-number). --- nexus/src/lib.rs | 2 +- nexus/tests/integration_tests/commands.rs | 2 +- openapi/nexus.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nexus/src/lib.rs b/nexus/src/lib.rs index cb08bfcdc0..1b80bc4c3c 100644 --- a/nexus/src/lib.rs +++ b/nexus/src/lib.rs @@ -47,7 +47,7 @@ extern crate slog; /// to stdout. pub fn run_openapi_external() -> Result<(), String> { external_api() - .openapi("Oxide Region API", "0.0.1") + .openapi("Oxide Region API", "0.0.6") .description("API for interacting with the Oxide control plane") .contact_url("https://oxide.computer") .contact_email("api@oxide.computer") diff --git a/nexus/tests/integration_tests/commands.rs b/nexus/tests/integration_tests/commands.rs index 02d938b2ac..bc79a7d5a2 100644 --- a/nexus/tests/integration_tests/commands.rs +++ b/nexus/tests/integration_tests/commands.rs @@ -109,7 +109,7 @@ fn test_nexus_openapi() { .expect("stdout was not valid OpenAPI"); assert_eq!(spec.openapi, "3.0.3"); assert_eq!(spec.info.title, "Oxide Region API"); - assert_eq!(spec.info.version, "0.0.1"); + assert_eq!(spec.info.version, "0.0.6"); // Spot check a couple of items. assert!(!spec.paths.paths.is_empty()); diff --git a/openapi/nexus.json b/openapi/nexus.json index d27261b179..f42841dcf6 100644 --- a/openapi/nexus.json +++ b/openapi/nexus.json @@ -7,7 +7,7 @@ "url": "https://oxide.computer", "email": "api@oxide.computer" }, - "version": "0.0.1" + "version": "0.0.6" }, "paths": { "/device/auth": { From a93462f2ac27085d070350732ca7f4cddbc2107f Mon Sep 17 00:00:00 2001 From: Ryan Goodfellow Date: Wed, 14 Feb 2024 01:40:51 -0800 Subject: [PATCH 2/3] add route stage to saga dag, fix destination property (#5062) --- nexus/src/app/sagas/switch_port_settings_apply.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nexus/src/app/sagas/switch_port_settings_apply.rs b/nexus/src/app/sagas/switch_port_settings_apply.rs index 9d0573f6b0..9e2331f416 100644 --- a/nexus/src/app/sagas/switch_port_settings_apply.rs +++ b/nexus/src/app/sagas/switch_port_settings_apply.rs @@ -56,14 +56,14 @@ declare_saga_actions! { + spa_ensure_switch_port_settings - spa_undo_ensure_switch_port_settings } - ENSURE_SWITCH_ROUTES -> "ensure_switch_routes" { - + spa_ensure_switch_routes - - spa_undo_ensure_switch_routes - } ENSURE_SWITCH_PORT_UPLINK -> "ensure_switch_port_uplink" { + spa_ensure_switch_port_uplink - spa_undo_ensure_switch_port_uplink } + ENSURE_SWITCH_ROUTES -> "ensure_switch_routes" { + + spa_ensure_switch_routes + - spa_undo_ensure_switch_routes + } ENSURE_SWITCH_PORT_BGP_SETTINGS -> "ensure_switch_port_bgp_settings" { + spa_ensure_switch_port_bgp_settings - spa_undo_ensure_switch_port_bgp_settings @@ -95,6 +95,7 @@ impl NexusSaga for SagaSwitchPortSettingsApply { builder.append(get_switch_port_settings_action()); builder.append(ensure_switch_port_settings_action()); builder.append(ensure_switch_port_uplink_action()); + builder.append(ensure_switch_routes_action()); builder.append(ensure_switch_port_bgp_settings_action()); builder.append(ensure_switch_port_bootstore_network_settings_action()); Ok(builder.build()?) @@ -238,8 +239,8 @@ async fn spa_ensure_switch_routes( IpAddr::V4(v4) => v4, IpAddr::V6(_) => continue, }; - let prefix = match r.gw.ip() { - IpAddr::V4(v4) => Prefix4 { value: v4, length: r.gw.prefix() }, + let prefix = match r.dst.ip() { + IpAddr::V4(v4) => Prefix4 { value: v4, length: r.dst.prefix() }, IpAddr::V6(_) => continue, }; let sr = StaticRoute4 { nexthop, prefix }; From d313f7f7f3faba5477bc009e386f8815a74f41e7 Mon Sep 17 00:00:00 2001 From: "oxide-renovate[bot]" <146848827+oxide-renovate[bot]@users.noreply.github.com> Date: Wed, 14 Feb 2024 21:25:57 +0000 Subject: [PATCH 3/3] Update Rust crate strum to 0.26 (#4915) --- Cargo.lock | 23 ++++++++++++----------- Cargo.toml | 2 +- workspace-hack/Cargo.toml | 2 ++ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index caddb6d8ea..708447b644 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4341,7 +4341,7 @@ dependencies = [ "serde_json", "sled-agent-client", "steno", - "strum 0.25.0", + "strum 0.26.1", "thiserror", "uuid", ] @@ -4413,7 +4413,7 @@ dependencies = [ "slog", "static_assertions", "steno", - "strum 0.25.0", + "strum 0.26.1", "subprocess", "swrite", "term", @@ -4476,7 +4476,7 @@ dependencies = [ "serde_json", "sled-agent-client", "slog", - "strum 0.25.0", + "strum 0.26.1", "thiserror", "tokio", "uuid", @@ -4565,7 +4565,7 @@ dependencies = [ "serde_json", "sled-agent-client", "steno", - "strum 0.25.0", + "strum 0.26.1", "thiserror", "uuid", ] @@ -4882,7 +4882,7 @@ dependencies = [ "serde_urlencoded", "serde_with", "slog", - "strum 0.25.0", + "strum 0.26.1", "test-strategy", "thiserror", "tokio", @@ -5070,7 +5070,7 @@ dependencies = [ "slog-term", "sp-sim", "steno", - "strum 0.25.0", + "strum 0.26.1", "subprocess", "tempfile", "term", @@ -5128,7 +5128,7 @@ dependencies = [ "sled-agent-client", "slog", "slog-error-chain", - "strum 0.25.0", + "strum 0.26.1", "subprocess", "tabled", "textwrap 0.16.0", @@ -5163,7 +5163,7 @@ dependencies = [ "slog-bunyan", "slog-term", "smf", - "strum 0.25.0", + "strum 0.26.1", "swrite", "tar", "thiserror", @@ -5412,6 +5412,7 @@ dependencies = [ "socket2 0.5.5", "spin 0.9.8", "string_cache", + "strum 0.25.0", "subtle", "syn 1.0.109", "syn 2.0.48", @@ -5687,7 +5688,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "strum 0.25.0", + "strum 0.26.1", "thiserror", "trybuild", "uuid", @@ -5740,7 +5741,7 @@ dependencies = [ "slog-async", "slog-dtrace", "slog-term", - "strum 0.25.0", + "strum 0.26.1", "subprocess", "thiserror", "tokio", @@ -5782,7 +5783,7 @@ dependencies = [ "slog-term", "sqlformat", "sqlparser", - "strum 0.25.0", + "strum 0.26.1", "tabled", "tempfile", "thiserror", diff --git a/Cargo.toml b/Cargo.toml index d33758fc06..66fbbc018d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -370,7 +370,7 @@ static_assertions = "1.1.0" # harder than expected to make breaking changes (even if you specify a specific # SHA). Cut a new Steno release instead. See omicron#2117. steno = "0.4.0" -strum = { version = "0.25", features = [ "derive" ] } +strum = { version = "0.26", features = [ "derive" ] } subprocess = "0.2.9" supports-color = "2.1.0" swrite = "0.1.0" diff --git a/workspace-hack/Cargo.toml b/workspace-hack/Cargo.toml index 7038f9c038..686cc3f218 100644 --- a/workspace-hack/Cargo.toml +++ b/workspace-hack/Cargo.toml @@ -98,6 +98,7 @@ slog = { version = "2.7.0", features = ["dynamic-keys", "max_level_trace", "rele socket2 = { version = "0.5.5", default-features = false, features = ["all"] } spin = { version = "0.9.8" } string_cache = { version = "0.8.7" } +strum = { version = "0.25.0", features = ["derive"] } subtle = { version = "2.5.0" } syn-dff4ba8e3ae991db = { package = "syn", version = "1.0.109", features = ["extra-traits", "fold", "full", "visit"] } syn-f595c2ba2a3f28df = { package = "syn", version = "2.0.48", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } @@ -205,6 +206,7 @@ slog = { version = "2.7.0", features = ["dynamic-keys", "max_level_trace", "rele socket2 = { version = "0.5.5", default-features = false, features = ["all"] } spin = { version = "0.9.8" } string_cache = { version = "0.8.7" } +strum = { version = "0.25.0", features = ["derive"] } subtle = { version = "2.5.0" } syn-dff4ba8e3ae991db = { package = "syn", version = "1.0.109", features = ["extra-traits", "fold", "full", "visit"] } syn-f595c2ba2a3f28df = { package = "syn", version = "2.0.48", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }