Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ dns-server-api = { path = "dns-server-api" }
dns-service-client = { path = "clients/dns-service-client" }
dpd-client = { git = "https://github.com/oxidecomputer/dendrite", rev = "ab30fa91227fd478bfe0e023310ca83dec0bc22b" }
dropshot = { version = "0.16.6", features = [ "usdt-probes" ] }
dropshot-api-manager = "0.2.4"
dropshot-api-manager-types = "0.2.4"
dropshot-api-manager = "0.3.0"
dropshot-api-manager-types = "0.3.0"
dyn-clone = "1.0.20"
either = "1.15.0"
ereport-types = { path = "ereport/types" }
Expand Down
2 changes: 1 addition & 1 deletion clickhouse-admin/types/versions/src/initial/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub struct ReplicaConfig {
pub tcp_port: u16,
/// Port for interserver HTTP connections
pub interserver_http_port: u16,
/// Configuration of clusters used by the Distributed table engine and by the cluster
/// Configuration of clusters used by the Distributed table engine and bythe cluster
/// table function
pub remote_servers: RemoteServers,
/// Contains settings that allow ClickHouse servers to interact with a Keeper cluster
Expand Down
97 changes: 48 additions & 49 deletions dev-tools/dropshot-apis/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ use clap::Parser;
use clickhouse_admin_api::*;
use cockroach_admin_api::*;
use dns_server_api::*;
use dropshot_api_manager::{Environment, ManagedApiConfig, ManagedApis};
use dropshot_api_manager::{
Environment, ManagedApi, ManagedApiConfig, ManagedApis,
};
use dropshot_api_manager_types::{
ManagedApiMetadata, ValidationContext, Versions,
};
Expand Down Expand Up @@ -51,7 +53,7 @@ fn environment() -> anyhow::Result<Environment> {
// TODO The metadata here overlaps with metadata in api-manifest.toml.
fn all_apis() -> anyhow::Result<ManagedApis> {
let apis = vec![
ManagedApiConfig {
ManagedApi::from(ManagedApiConfig {
title: "Bootstrap Agent API",
versions: Versions::new_versioned(
bootstrap_agent_api::supported_versions(),
Expand All @@ -64,9 +66,11 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
},
api_description: bootstrap_agent_api_mod::stub_api_description,
ident: "bootstrap-agent",
extra_validation: None,
},
ManagedApiConfig {
})
// The bootstrap-agent API is client-side-versioned and currently frozen,
// so we allow trivial changes to go through.
.allow_trivial_changes_for_latest(),
ManagedApi::from(ManagedApiConfig {
title: "ClickHouse Cluster Admin Keeper API",
versions: Versions::new_versioned(
clickhouse_admin_api::supported_versions(),
Expand All @@ -83,9 +87,8 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
api_description:
clickhouse_admin_keeper_api_mod::stub_api_description,
ident: "clickhouse-admin-keeper",
extra_validation: None,
},
ManagedApiConfig {
}),
ManagedApi::from(ManagedApiConfig {
title: "ClickHouse Cluster Admin Server API",
versions: Versions::new_versioned(
clickhouse_admin_api::supported_versions(),
Expand All @@ -102,9 +105,8 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
api_description:
clickhouse_admin_server_api_mod::stub_api_description,
ident: "clickhouse-admin-server",
extra_validation: None,
},
ManagedApiConfig {
}),
ManagedApi::from(ManagedApiConfig {
title: "ClickHouse Single-Node Admin Server API",
versions: Versions::new_versioned(
clickhouse_admin_api::supported_versions(),
Expand All @@ -121,9 +123,8 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
api_description:
clickhouse_admin_single_api_mod::stub_api_description,
ident: "clickhouse-admin-single",
extra_validation: None,
},
ManagedApiConfig {
}),
ManagedApi::from(ManagedApiConfig {
title: "CockroachDB Cluster Admin API",
versions: Versions::new_versioned(
cockroach_admin_api::supported_versions(),
Expand All @@ -139,9 +140,8 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
},
api_description: cockroach_admin_api_mod::stub_api_description,
ident: "cockroach-admin",
extra_validation: None,
},
ManagedApiConfig {
}),
ManagedApi::from(ManagedApiConfig {
title: "Internal DNS",
versions: Versions::new_versioned(
dns_server_api::supported_versions(),
Expand All @@ -154,9 +154,8 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
},
api_description: dns_server_api_mod::stub_api_description,
ident: "dns-server",
extra_validation: None,
},
ManagedApiConfig {
}),
ManagedApi::from(ManagedApiConfig {
title: "Oxide Management Gateway Service API",
versions: Versions::new_versioned(gateway_api::supported_versions()),
metadata: ManagedApiMetadata {
Expand All @@ -170,9 +169,8 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
},
api_description: gateway_api_mod::stub_api_description,
ident: "gateway",
extra_validation: None,
},
ManagedApiConfig {
}),
ManagedApi::from(ManagedApiConfig {
title: "Installinator API",
versions: Versions::new_versioned(
installinator_api::supported_versions(),
Expand All @@ -188,9 +186,11 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
},
api_description: installinator_api_mod::stub_api_description,
ident: "installinator",
extra_validation: None,
},
ManagedApiConfig {
})
// The installinator API is client-side-versioned and currently frozen,
// so we allow trivial changes to go through.
.allow_trivial_changes_for_latest(),
ManagedApi::from(ManagedApiConfig {
title: "Oxide Region API",
versions: Versions::new_versioned(
nexus_external_api::supported_versions(),
Expand All @@ -205,9 +205,9 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
},
api_description: nexus_external_api_mod::stub_api_description,
ident: "nexus",
extra_validation: Some(nexus_external_api::validate_api),
},
ManagedApiConfig {
})
.with_extra_validation(nexus_external_api::validate_api),
ManagedApi::from(ManagedApiConfig {
title: "Nexus internal API",
versions: Versions::new_versioned(
nexus_internal_api::supported_versions(),
Expand All @@ -220,9 +220,11 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
},
api_description: nexus_internal_api_mod::stub_api_description,
ident: "nexus-internal",
extra_validation: None,
},
ManagedApiConfig {
})
// The Nexus internal API is client-side-versioned and currently frozen,
// so we allow trivial changes to go through.
.allow_trivial_changes_for_latest(),
ManagedApi::from(ManagedApiConfig {
title: "Nexus lockstep API",
versions: Versions::new_lockstep(semver::Version::new(0, 0, 1)),
metadata: ManagedApiMetadata {
Expand All @@ -233,9 +235,8 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
},
api_description: nexus_lockstep_api_mod::stub_api_description,
ident: "nexus-lockstep",
extra_validation: None,
},
ManagedApiConfig {
}),
ManagedApi::from(ManagedApiConfig {
title: "NTP Admin API",
versions: Versions::new_versioned(
ntp_admin_api::supported_versions(),
Expand All @@ -248,9 +249,8 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
},
api_description: ntp_admin_api_mod::stub_api_description,
ident: "ntp-admin",
extra_validation: None,
},
ManagedApiConfig {
}),
ManagedApi::from(ManagedApiConfig {
title: "Oxide Oximeter API",
versions: Versions::new_versioned(
oximeter_api::supported_versions(),
Expand All @@ -263,9 +263,8 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
},
api_description: oximeter_api_mod::stub_api_description,
ident: "oximeter",
extra_validation: None,
},
ManagedApiConfig {
}),
ManagedApi::from(ManagedApiConfig {
title: "Oxide TUF Repo Depot API",
versions: Versions::new_versioned(
repo_depot_api::supported_versions(),
Expand All @@ -278,9 +277,11 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
},
api_description: repo_depot_api_mod::stub_api_description,
ident: "repo-depot",
extra_validation: None,
},
ManagedApiConfig {
})
// The Repo Depot API is client-side-versioned and currently frozen,
// so we allow trivial changes to go through.
.allow_trivial_changes_for_latest(),
ManagedApi::from(ManagedApiConfig {
title: "Oxide Sled Agent API",
versions: Versions::new_versioned(
sled_agent_api::supported_versions(),
Expand All @@ -293,9 +294,8 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
},
api_description: sled_agent_api_mod::stub_api_description,
ident: "sled-agent",
extra_validation: None,
},
ManagedApiConfig {
}),
ManagedApi::from(ManagedApiConfig {
title: "Oxide Technician Port Control Service",
versions: Versions::new_lockstep(semver::Version::new(0, 0, 1)),
metadata: ManagedApiMetadata {
Expand All @@ -308,8 +308,7 @@ fn all_apis() -> anyhow::Result<ManagedApis> {
},
api_description: wicketd_api_mod::stub_api_description,
ident: "wicketd",
extra_validation: None,
},
}),
];

let apis = ManagedApis::new(apis)
Expand Down
Loading
Loading