From f6a790a875501976fb61609479855c326b163501 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 21 Aug 2025 14:28:20 +0200 Subject: [PATCH 1/4] fix: Derive Clone for ProbeBuilder --- Cargo.lock | 2 +- crates/stackable-operator/CHANGELOG.md | 6 ++++++ crates/stackable-operator/Cargo.toml | 2 +- crates/stackable-operator/src/builder/pod/probe.rs | 6 +++++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a486f7a7d..8243a175e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3012,7 +3012,7 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.95.0" +version = "0.95.1" dependencies = [ "chrono", "clap", diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index a9ba07d55..08e610b10 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] +## [0.95.1] - 2025-08-21 + +### Fixed + +- Derive `Clone` for `ProbeBuilder` ([#XXXX]). + ## [0.95.0] - 2025-08-21 ### Added diff --git a/crates/stackable-operator/Cargo.toml b/crates/stackable-operator/Cargo.toml index e90854b91..5dec6e0a1 100644 --- a/crates/stackable-operator/Cargo.toml +++ b/crates/stackable-operator/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "stackable-operator" description = "Stackable Operator Framework" -version = "0.95.0" +version = "0.95.1" authors.workspace = true license.workspace = true edition.workspace = true diff --git a/crates/stackable-operator/src/builder/pod/probe.rs b/crates/stackable-operator/src/builder/pod/probe.rs index cf569b55c..411d65cff 100644 --- a/crates/stackable-operator/src/builder/pod/probe.rs +++ b/crates/stackable-operator/src/builder/pod/probe.rs @@ -53,7 +53,7 @@ pub enum Error { PeriodIsZero {}, } -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct ProbeBuilder { // Mandatory field action: Action, @@ -238,6 +238,10 @@ impl ProbeBuilder { Ok(self.with_failure_threshold(failure_threshold.ceil() as i32)) } + /// Build the [`Probe`] using the specified contents. + /// + /// Returns an [`Error::DurationTooLongSnafu`] error in case the involved [`Duration`]s are too + /// long. pub fn build(self) -> Result { let mut probe = Probe { exec: None, From e964efdb1d6c47600c1577b05076ba6568bd25bb Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 21 Aug 2025 14:30:48 +0200 Subject: [PATCH 2/4] Also for ProbeAction --- crates/stackable-operator/CHANGELOG.md | 2 +- crates/stackable-operator/src/builder/pod/probe.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 08e610b10..1748a60ec 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. ### Fixed -- Derive `Clone` for `ProbeBuilder` ([#XXXX]). +- Derive `Clone` for `ProbeBuilder` and `ProbeAction` ([#XXXX]). ## [0.95.0] - 2025-08-21 diff --git a/crates/stackable-operator/src/builder/pod/probe.rs b/crates/stackable-operator/src/builder/pod/probe.rs index 411d65cff..efe97e7fa 100644 --- a/crates/stackable-operator/src/builder/pod/probe.rs +++ b/crates/stackable-operator/src/builder/pod/probe.rs @@ -73,6 +73,7 @@ pub struct ProbeBuilder { /// type, see [container-probes] documentation. /// /// [container-probes]: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes +#[derive(Clone, Debug)] pub enum ProbeAction { Exec(ExecAction), Grpc(GRPCAction), From 4bb8662f53aebb96524f6e9d9859cbf44fde3800 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 21 Aug 2025 14:34:26 +0200 Subject: [PATCH 3/4] changelog --- crates/stackable-operator/CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 1748a60ec..06ec6728a 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -8,7 +8,9 @@ All notable changes to this project will be documented in this file. ### Fixed -- Derive `Clone` for `ProbeBuilder` and `ProbeAction` ([#XXXX]). +- Derive `Clone` for `ProbeBuilder` and `ProbeAction` ([#1082]). + +[#1082]: https://github.com/stackabletech/operator-rs/pull/1082 ## [0.95.0] - 2025-08-21 From 426a44abdfb4baa5a860208e57969f45d8dd483f Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 21 Aug 2025 14:36:07 +0200 Subject: [PATCH 4/4] typo --- crates/stackable-operator/src/builder/pod/probe.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/stackable-operator/src/builder/pod/probe.rs b/crates/stackable-operator/src/builder/pod/probe.rs index efe97e7fa..7c647e523 100644 --- a/crates/stackable-operator/src/builder/pod/probe.rs +++ b/crates/stackable-operator/src/builder/pod/probe.rs @@ -241,7 +241,7 @@ impl ProbeBuilder { /// Build the [`Probe`] using the specified contents. /// - /// Returns an [`Error::DurationTooLongSnafu`] error in case the involved [`Duration`]s are too + /// Returns an [`Error::DurationTooLong`] error in case the involved [`Duration`]s are too /// long. pub fn build(self) -> Result { let mut probe = Probe {