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
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ default-members = [
]
resolver = "3"

[workspace.package]
edition = "2024"

#
# Tree-wide lint configuration.
# https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-lints-section
Expand Down
2 changes: 1 addition & 1 deletion api_identity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "api_identity"
description = "macro used for Oxide control plane resources with an identity"
version = "0.1.0"
authors = ["David Pacheco <[email protected]>"]
edition = "2021"
edition.workspace = true
repository = "https://github.com/oxidecomputer/omicron/"
license = "MPL-2.0"

Expand Down
2 changes: 1 addition & 1 deletion bootstore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "bootstore"
description = "Storage required for rack unlock"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion certificates/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "omicron-certificates"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion certificates/src/openssl_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::ffi::c_int;
use std::ffi::c_uint;
use std::ptr;

extern "C" {
unsafe extern "C" {
// `X509_check_host()` is only exported by `openssl-sys` if the `bindgen`
// feature is enabled
// (https://github.com/sfackler/rust-openssl/issues/2041). For now, we'll
Expand Down
2 changes: 1 addition & 1 deletion clickhouse-admin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "omicron-clickhouse-admin"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion clickhouse-admin/api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "clickhouse-admin-api"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
12 changes: 6 additions & 6 deletions clickhouse-admin/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ impl KeeperServerContext {

// If there is already a configuration file with a generation number we'll
// use that. Otherwise, we set the generation number to None.
let gen = read_generation_from_file(config_path)?;
let (generation_tx, generation_rx) = watch::channel(gen);
let generation = read_generation_from_file(config_path)?;
let (generation_tx, generation_rx) = watch::channel(generation);

// We only want to handle one in flight request at a time. Reconfigurator execution will retry
// again later anyway. We use flume bounded channels with a size of 0 to act as a rendezvous channel.
Expand Down Expand Up @@ -137,8 +137,8 @@ impl ServerContext {

// If there is already a configuration file with a generation number we'll
// use that. Otherwise, we set the generation number to None.
let gen = read_generation_from_file(config_path)?;
let (generation_tx, generation_rx) = watch::channel(gen);
let generation = read_generation_from_file(config_path)?;
let (generation_tx, generation_rx) = watch::channel(generation);

// We only want to handle one in flight request at a time. Reconfigurator execution will retry
// again later anyway. We use flume bounded channels with a size of 0 to act as a rendezvous channel.
Expand Down Expand Up @@ -499,9 +499,9 @@ fn read_generation_from_file(path: Utf8PathBuf) -> Result<Option<Generation>> {
)
})?;

let gen = Generation::try_from(gen_u64)?;
let generation = Generation::try_from(gen_u64)?;

Ok(Some(gen))
Ok(Some(generation))
}

#[cfg(test)]
Expand Down
8 changes: 4 additions & 4 deletions clickhouse-admin/src/http_entrypoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl ClickhouseAdminServerApi for ClickhouseAdminServerImpl {
rqctx: RequestContext<Self::Context>,
) -> Result<HttpResponseOk<Generation>, HttpError> {
let ctx = rqctx.context();
let gen = match ctx.generation() {
let generation = match ctx.generation() {
Some(g) => g,
None => {
return Err(HttpError::for_client_error(
Expand All @@ -64,7 +64,7 @@ impl ClickhouseAdminServerApi for ClickhouseAdminServerImpl {
));
}
};
Ok(HttpResponseOk(gen))
Ok(HttpResponseOk(generation))
}

async fn distributed_ddl_queue(
Expand Down Expand Up @@ -120,7 +120,7 @@ impl ClickhouseAdminKeeperApi for ClickhouseAdminKeeperImpl {
rqctx: RequestContext<Self::Context>,
) -> Result<HttpResponseOk<Generation>, HttpError> {
let ctx = rqctx.context();
let gen = match ctx.generation() {
let generation = match ctx.generation() {
Some(g) => g,
None => {
return Err(HttpError::for_client_error(
Expand All @@ -130,7 +130,7 @@ impl ClickhouseAdminKeeperApi for ClickhouseAdminKeeperImpl {
));
}
};
Ok(HttpResponseOk(gen))
Ok(HttpResponseOk(generation))
}

async fn lgif(
Expand Down
2 changes: 1 addition & 1 deletion clickhouse-admin/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "clickhouse-admin-test-utils"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion clickhouse-admin/types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "clickhouse-admin-types"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
6 changes: 3 additions & 3 deletions clickhouse-admin/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use itertools::Itertools;
use omicron_common::api::external::Generation;
use schemars::{
JsonSchema,
gen::SchemaGenerator,
r#gen::SchemaGenerator,
schema::{Schema, SchemaObject},
};
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -41,8 +41,8 @@ pub const OXIMETER_CLUSTER: &str = "oximeter_cluster";

// Used for schemars to be able to be used with camino:
// See https://github.com/camino-rs/camino/issues/91#issuecomment-2027908513
pub fn path_schema(gen: &mut SchemaGenerator) -> Schema {
let mut schema: SchemaObject = <String>::json_schema(gen).into();
pub fn path_schema(generator: &mut SchemaGenerator) -> Schema {
let mut schema: SchemaObject = <String>::json_schema(generator).into();
schema.format = Some("Utf8PathBuf".to_owned());
schema.into()
}
Expand Down
2 changes: 1 addition & 1 deletion clients/bootstrap-agent-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "bootstrap-agent-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion clients/clickhouse-admin-keeper-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "clickhouse-admin-keeper-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true

[dependencies]
chrono.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion clients/clickhouse-admin-server-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "clickhouse-admin-server-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true

[dependencies]
chrono.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion clients/clickhouse-admin-single-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "clickhouse-admin-single-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true

[dependencies]
chrono.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion clients/cockroach-admin-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cockroach-admin-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion clients/ddm-admin-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "omicron-ddm-admin-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion clients/ddm-admin-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl Client {
pub async fn derive_bootstrap_addrs_from_prefixes<'a>(
&self,
interfaces: &'a [BootstrapInterface],
) -> Result<impl Iterator<Item = Ipv6Addr> + 'a, DdmError> {
) -> Result<impl Iterator<Item = Ipv6Addr> + 'a + use<'a>, DdmError> {
let prefixes = self.inner.get_prefixes().await?.into_inner();
Ok(prefixes.into_iter().flat_map(|(_, prefixes)| {
prefixes.into_iter().flat_map(|prefix| {
Expand Down
2 changes: 1 addition & 1 deletion clients/dns-service-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dns-service-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion clients/gateway-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "gateway-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion clients/installinator-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "installinator-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion clients/nexus-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "nexus-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
10 changes: 7 additions & 3 deletions clients/nexus-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ impl From<omicron_common::api::internal::nexus::VmmRuntimeState>
for types::VmmRuntimeState
{
fn from(s: omicron_common::api::internal::nexus::VmmRuntimeState) -> Self {
Self { gen: s.gen, state: s.state.into(), time_updated: s.time_updated }
Self {
r#gen: s.generation,
state: s.state.into(),
time_updated: s.time_updated,
}
}
}

Expand All @@ -133,7 +137,7 @@ impl From<omicron_common::api::internal::nexus::MigrationRuntimeState>
Self {
migration_id: s.migration_id,
state: s.state.into(),
gen: s.gen,
r#gen: s.generation,
time_updated: s.time_updated,
}
}
Expand All @@ -159,7 +163,7 @@ impl From<omicron_common::api::internal::nexus::DiskRuntimeState>
fn from(s: omicron_common::api::internal::nexus::DiskRuntimeState) -> Self {
Self {
disk_state: s.disk_state.into(),
gen: s.gen,
r#gen: s.generation,
time_updated: s.time_updated,
}
}
Expand Down
2 changes: 1 addition & 1 deletion clients/nexus-lockstep-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "nexus-lockstep-client"
version = "0.1.0"
edition = "2024"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion clients/ntp-admin-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ntp-admin-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion clients/oxide-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "oxide-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion clients/oximeter-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "oximeter-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion clients/repo-depot-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "repo-depot-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
2 changes: 1 addition & 1 deletion clients/sled-agent-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sled-agent-client"
version = "0.1.0"
edition = "2021"
edition.workspace = true
license = "MPL-2.0"

[lints]
Expand Down
12 changes: 8 additions & 4 deletions clients/sled-agent-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ impl From<types::VmmRuntimeState>
for omicron_common::api::internal::nexus::VmmRuntimeState
{
fn from(s: types::VmmRuntimeState) -> Self {
Self { state: s.state.into(), gen: s.gen, time_updated: s.time_updated }
Self {
state: s.state.into(),
generation: s.r#gen,
time_updated: s.time_updated,
}
}
}

Expand All @@ -157,7 +161,7 @@ impl From<types::MigrationRuntimeState>
Self {
migration_id: s.migration_id,
state: s.state.into(),
gen: s.gen,
generation: s.r#gen,
time_updated: s.time_updated,
}
}
Expand All @@ -183,7 +187,7 @@ impl From<omicron_common::api::internal::nexus::DiskRuntimeState>
fn from(s: omicron_common::api::internal::nexus::DiskRuntimeState) -> Self {
Self {
disk_state: s.disk_state.into(),
gen: s.gen,
r#gen: s.generation,
time_updated: s.time_updated,
}
}
Expand Down Expand Up @@ -215,7 +219,7 @@ impl From<types::DiskRuntimeState>
fn from(s: types::DiskRuntimeState) -> Self {
Self {
disk_state: s.disk_state.into(),
gen: s.gen,
generation: s.r#gen,
time_updated: s.time_updated,
}
}
Expand Down
Loading
Loading