Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ 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)

- 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)
Expand Down
5 changes: 5 additions & 0 deletions crates/stackable-operator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ All notable changes to this project will be documented in this file.

- Add CRD established signal/helper ([#1167]).

## Changed

- Demote `kube_runtime::controller::Error::QueueError` to warning ([#1168]).

[#1167]: https://github.com/stackabletech/operator-rs/pull/1167
[#1168]: https://github.com/stackabletech/operator-rs/pull/1168

## [0.107.0] - 2026-03-09

Expand Down
39 changes: 21 additions & 18 deletions crates/stackable-operator/src/logging/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,26 @@ pub async fn report_controller_reconciled<K, ReconcileErr, QueueErr>(
"Reconciled object"
);
}
Err(err) => report_controller_error(recorder, controller_name, err).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"
),
};

/// Reports an error to the operator administrator and, if relevant, the end user
async fn report_controller_error<ReconcileErr, QueueErr>(
recorder: &Recorder,
controller_name: &str,
error: &controller::Error<ReconcileErr, QueueErr>,
) 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;
publish_controller_error_as_k8s_event(recorder, controller_error).await;
}
}
}
Loading