From ab361bab0198faf0be132381aecab51aef8eded5 Mon Sep 17 00:00:00 2001 From: karencfv Date: Thu, 15 Aug 2024 16:52:17 +1200 Subject: [PATCH] fmt --- package-manifest.toml | 3 --- package/src/bin/omicron-package.rs | 12 ++++++++++-- package/src/lib.rs | 2 +- package/src/target.rs | 5 ++++- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/package-manifest.toml b/package-manifest.toml index 1e449f864a..f364d73845 100644 --- a/package-manifest.toml +++ b/package-manifest.toml @@ -140,11 +140,8 @@ source.type = "local" source.rust.binary_names = ["oximeter", "clickhouse-schema-updater"] source.rust.release = true source.paths = [ - #{ from = "smf/oximeter", to = "/var/svc/manifest/site/oximeter" }, { from = "oximeter/db/schema", to = "/opt/oxide/oximeter/schema" }, { from = "smf/oximeter/config.toml", to = "/var/svc/manifest/site/oximeter/config.toml" }, - # TODO: Add something like rack-topology (slingle-sled vs multi-sled) to add `--replicated`? - # Example: { from = "smf/oximeter/{{clickhouse-topology}}/manifest.xml", to = "/var/svc/manifest/site/oximeter/manifest.xml" }, ] output.type = "zone" diff --git a/package/src/bin/omicron-package.rs b/package/src/bin/omicron-package.rs index d66c990743..c6a3e21c77 100644 --- a/package/src/bin/omicron-package.rs +++ b/package/src/bin/omicron-package.rs @@ -265,13 +265,21 @@ async fn do_target( format!("failed to create directory {}", target_dir) })?; match subcommand { - TargetCommand::Create { image, machine, switch, rack_topology, clickhouse_topology } => { + TargetCommand::Create { + image, + machine, + switch, + rack_topology, + clickhouse_topology, + } => { let target = KnownTarget::new( image.clone(), machine.clone(), switch.clone(), rack_topology.clone(), - clickhouse_topology.clone().expect("clickhouse topology should never be NONE") + clickhouse_topology + .clone() + .expect("clickhouse topology should never be NONE"), )?; let path = get_single_target(&target_dir, name).await?; diff --git a/package/src/lib.rs b/package/src/lib.rs index 8c6dabfceb..47996dc781 100644 --- a/package/src/lib.rs +++ b/package/src/lib.rs @@ -77,7 +77,7 @@ pub enum TargetCommand { )] /// Specify whether clickhouse will be deployed as a replicated cluster /// or single-node configuration. - /// + /// /// Replicated cluster configuration is an experimental feature to be /// used only for testing. clickhouse_topology: Option, diff --git a/package/src/target.rs b/package/src/target.rs index 484c75451a..35a7bf30ca 100644 --- a/package/src/target.rs +++ b/package/src/target.rs @@ -134,7 +134,10 @@ impl From for Target { map.insert("switch".to_string(), switch.to_string()); } map.insert("rack-topology".to_string(), kt.rack_topology.to_string()); - map.insert("clickhouse-topology".to_string(), kt.clickhouse_topology.to_string()); + map.insert( + "clickhouse-topology".to_string(), + kt.clickhouse_topology.to_string(), + ); Target(map) } }