From 6132506de73d19f94b5af9b526a8265f34d38dec Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Tue, 10 Mar 2026 12:19:29 +0100 Subject: [PATCH 1/4] ci(pre-commit): Don't doc-test dependencies --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5ee923b6d..7c79212aa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,7 +58,7 @@ repos: - id: cargo-doc-no-default-features name: cargo-doc-no-default-features language: system - entry: cargo doc --no-default-features --document-private-items + entry: cargo doc --no-deps --no-default-features --document-private-items stages: [pre-commit, pre-merge-commit] pass_filenames: false files: \.rs$|Cargo\.(toml|lock) @@ -66,7 +66,7 @@ repos: - id: cargo-doc-all-features name: cargo-doc-all-features language: system - entry: cargo doc --all-features --document-private-items + entry: cargo doc --no-deps --all-features --document-private-items stages: [pre-commit, pre-merge-commit] pass_filenames: false files: \.rs$|Cargo\.(toml|lock) From 29bb7318d96e0ecad41cdb79110e4fdcc9728155 Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Tue, 10 Mar 2026 12:19:36 +0100 Subject: [PATCH 2/4] refactor(stackable-operator): Move report_controller_error logic into the caller --- .../src/logging/controller.rs | 26 ++++++------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/crates/stackable-operator/src/logging/controller.rs b/crates/stackable-operator/src/logging/controller.rs index 31a3d4d19..a32deaec4 100644 --- a/crates/stackable-operator/src/logging/controller.rs +++ b/crates/stackable-operator/src/logging/controller.rs @@ -61,23 +61,13 @@ pub async fn report_controller_reconciled( "Reconciled object" ); } - Err(err) => report_controller_error(recorder, controller_name, err).await, + Err(error) => { + tracing::error!( + controller.name = controller_name, + error = error as &dyn std::error::Error, + "Failed to reconcile object", + ); + publish_controller_error_as_k8s_event(recorder, error).await; + } } } - -/// Reports an error to the operator administrator and, if relevant, the end user -async fn report_controller_error( - recorder: &Recorder, - controller_name: &str, - error: &controller::Error, -) where - ReconcileErr: ReconcilerError, - QueueErr: std::error::Error, -{ - tracing::error!( - controller.name = controller_name, - error = error as &dyn std::error::Error, - "Failed to reconcile object", - ); - publish_controller_error_as_k8s_event(recorder, error).await; -} From 137cef51b3feb3de6f5adc710dbdefe31c42ee05 Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Tue, 10 Mar 2026 12:33:51 +0100 Subject: [PATCH 3/4] chore(stackable-operator): Demote kube_runtime::controller::Error::QueueError to warning Note: This is because _everything_ was appearing as an error even when it was non-actionable. For example, when the crd maintainer updates the CA bundle on the CRD, the `metadata.resourceVersion changes` as expected. That leads to a controller error. Unfortunately there is currently no good way to discriminate error types. Something might need to be done upstream. --- .../src/logging/controller.rs | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/crates/stackable-operator/src/logging/controller.rs b/crates/stackable-operator/src/logging/controller.rs index a32deaec4..a41b73879 100644 --- a/crates/stackable-operator/src/logging/controller.rs +++ b/crates/stackable-operator/src/logging/controller.rs @@ -61,13 +61,26 @@ pub async fn report_controller_reconciled( "Reconciled object" ); } - Err(error) => { - tracing::error!( - controller.name = controller_name, - error = error as &dyn std::error::Error, - "Failed to reconcile object", - ); - publish_controller_error_as_k8s_event(recorder, error).await; + Err(controller_error) => { + match controller_error { + // Errors raised from queued stuff we will mark as _warning_. + // We can't easily discriminate any further. + controller::Error::QueueError(queue_error) => tracing::warn!( + controller.name = controller_name, + error = queue_error as &dyn std::error::Error, + "Queued reconcile resulted in an error" + ), + // Assume others are _error_ level. + // NOTE (@NickLarsenNZ): Keeping the same error message as before, + // but am not sure if it is correct + _ => tracing::error!( + controller.name = controller_name, + error = controller_error as &dyn std::error::Error, + "Failed to reconcile object" + ), + }; + + publish_controller_error_as_k8s_event(recorder, controller_error).await; } } } From 3006845e1f35a3515856589dd9aa812aedbd16bb Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Tue, 10 Mar 2026 12:50:52 +0100 Subject: [PATCH 4/4] chore: Update changelog --- crates/stackable-operator/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 7d7346a6b..a12c566c0 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +## Changed + +- Demote `kube_runtime::controller::Error::QueueError` to warning ([#1168]). + +[#1168]: https://github.com/stackabletech/operator-rs/pull/1168 + ## [0.107.0] - 2026-03-09 ### Added