From 6f2e0f82eb8ab39edb361ce90826f04ead5ed983 Mon Sep 17 00:00:00 2001 From: Saul Beck Date: Mon, 1 Jun 2026 11:58:55 +0100 Subject: [PATCH 1/2] chore: bump Rust edition to 2024 and apply cargo fix + clippy updates - Apply `cargo fix --edition` changes - Use `&& let` chaining instead of nested `if let` (Clippy suggested) - Fix Rust 2024 drop order warning by dropping unused binding --- Cargo.nix | 2 +- Cargo.toml | 2 +- rust/operator-binary/src/controller.rs | 5 ++--- rust/operator-binary/src/webhooks/conversion.rs | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Cargo.nix b/Cargo.nix index 628be318..4ae83878 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -9996,7 +9996,7 @@ rec { "stackable-trino-operator" = rec { crateName = "stackable-trino-operator"; version = "0.0.0-dev"; - edition = "2021"; + edition = "2024"; crateBin = [ { name = "stackable-trino-operator"; diff --git a/Cargo.toml b/Cargo.toml index acced5f7..853f9ab8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ resolver = "2" version = "0.0.0-dev" authors = ["Stackable GmbH "] license = "OSL-3.0" -edition = "2021" +edition = "2024" repository = "https://github.com/stackabletech/trino-operator" [workspace.dependencies] diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index 623b914b..ffa08d76 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -526,8 +526,8 @@ pub async fn reconcile_trino( ); } - if let Some(listener_class) = trino_role.listener_class_name(trino) { - if let Some(listener_group_name) = group_listener_name(trino, &trino_role) { + if let Some(listener_class) = trino_role.listener_class_name(trino) + && let Some(listener_group_name) = group_listener_name(trino, &trino_role) { let role_group_listener = build_group_listener( trino, build_recommended_labels( @@ -546,7 +546,6 @@ pub async fn reconcile_trino( .await .context(ApplyGroupListenerSnafu)?; } - } let role_config = trino.generic_role_config(&trino_role); if let Some(GenericRoleConfig { diff --git a/rust/operator-binary/src/webhooks/conversion.rs b/rust/operator-binary/src/webhooks/conversion.rs index 29dcc5ad..ad34f93f 100644 --- a/rust/operator-binary/src/webhooks/conversion.rs +++ b/rust/operator-binary/src/webhooks/conversion.rs @@ -46,7 +46,7 @@ pub async fn create_webhook_server( field_manager: FIELD_MANAGER.to_owned(), }; - let (conversion_webhook, _initial_reconcile_rx) = + let (conversion_webhook, _) = ConversionWebhook::new(crds_and_handlers, client, conversion_webhook_options); let webhook_server_options = WebhookServerOptions { From cfc542a04d645fba54b8b810e62c50c32193bae6 Mon Sep 17 00:00:00 2001 From: Saul Beck Date: Wed, 3 Jun 2026 10:11:20 +0100 Subject: [PATCH 2/2] Chore: Fix rustfmt errors --- rust/operator-binary/src/controller.rs | 35 +++++++++++++------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index ffa08d76..7176a265 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -527,25 +527,26 @@ pub async fn reconcile_trino( } if let Some(listener_class) = trino_role.listener_class_name(trino) - && let Some(listener_group_name) = group_listener_name(trino, &trino_role) { - let role_group_listener = build_group_listener( + && let Some(listener_group_name) = group_listener_name(trino, &trino_role) + { + let role_group_listener = build_group_listener( + trino, + build_recommended_labels( trino, - build_recommended_labels( - trino, - &validated.image.app_version_label_value, - &trino_role_str, - "none", - ), - listener_class.to_string(), - listener_group_name, - ) - .context(ListenerConfigurationSnafu)?; + &validated.image.app_version_label_value, + &trino_role_str, + "none", + ), + listener_class.to_string(), + listener_group_name, + ) + .context(ListenerConfigurationSnafu)?; - cluster_resources - .add(client, role_group_listener) - .await - .context(ApplyGroupListenerSnafu)?; - } + cluster_resources + .add(client, role_group_listener) + .await + .context(ApplyGroupListenerSnafu)?; + } let role_config = trino.generic_role_config(&trino_role); if let Some(GenericRoleConfig {