From 1efce93f53a636a20021944f5252e7c65bd84e0c Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 7 Jul 2026 10:58:02 +0200 Subject: [PATCH 1/4] fix(v2): Don't require macro callers to have `std::str::FromStr` in scope --- crates/stackable-operator/CHANGELOG.md | 8 +++++++- crates/stackable-operator/src/v2/builder/pod/container.rs | 5 +---- .../src/v2/macros/attributed_string_type.rs | 2 +- crates/stackable-operator/src/v2/types/kubernetes.rs | 2 -- crates/stackable-operator/src/v2/types/operator.rs | 2 -- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 71c003344..2423fbd2b 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -4,11 +4,17 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Fixed + +- [v2]: Don't require the `attributed_string_type` macro caller to have `std::str::FromStr` in scope ([#XXXX]). + +[#XXXX]: https://github.com/stackabletech/operator-rs/pull/XXXX + ## [0.113.2] - 2026-07-07 ### Added -- Add `raw_object_schema` to v2 `JsonConfigOverrides` ([#1242]). +- [v2] Add `raw_object_schema` to `JsonConfigOverrides` ([#1242]). [#1242]: https://github.com/stackabletech/operator-rs/pull/1242 diff --git a/crates/stackable-operator/src/v2/builder/pod/container.rs b/crates/stackable-operator/src/v2/builder/pod/container.rs index 5698acaaf..ff2e529c8 100644 --- a/crates/stackable-operator/src/v2/builder/pod/container.rs +++ b/crates/stackable-operator/src/v2/builder/pod/container.rs @@ -1,7 +1,4 @@ -use std::{ - collections::{BTreeMap, btree_map}, - str::FromStr, -}; +use std::collections::{BTreeMap, btree_map}; use snafu::Snafu; use strum::{EnumDiscriminants, IntoStaticStr}; diff --git a/crates/stackable-operator/src/v2/macros/attributed_string_type.rs b/crates/stackable-operator/src/v2/macros/attributed_string_type.rs index b2db53d91..e3cfbd689 100644 --- a/crates/stackable-operator/src/v2/macros/attributed_string_type.rs +++ b/crates/stackable-operator/src/v2/macros/attributed_string_type.rs @@ -150,7 +150,7 @@ macro_rules! attributed_string_type { D: serde::Deserializer<'de>, { let string: String = serde::Deserialize::deserialize(deserializer)?; - $name::from_str(&string).map_err(|err| serde::de::Error::custom(&err)) + <$name as std::str::FromStr>::from_str(&string).map_err(|err| serde::de::Error::custom(&err)) } } diff --git a/crates/stackable-operator/src/v2/types/kubernetes.rs b/crates/stackable-operator/src/v2/types/kubernetes.rs index 65c0dcbab..df2f0ce4e 100644 --- a/crates/stackable-operator/src/v2/types/kubernetes.rs +++ b/crates/stackable-operator/src/v2/types/kubernetes.rs @@ -1,6 +1,4 @@ //! Kubernetes (resource) names -use std::str::FromStr; - use crate::{ attributed_string_type, validation::{RFC_1123_LABEL_MAX_LENGTH, RFC_1123_SUBDOMAIN_MAX_LENGTH}, diff --git a/crates/stackable-operator/src/v2/types/operator.rs b/crates/stackable-operator/src/v2/types/operator.rs index eb6ec22bc..e5e47ec0b 100644 --- a/crates/stackable-operator/src/v2/types/operator.rs +++ b/crates/stackable-operator/src/v2/types/operator.rs @@ -1,7 +1,5 @@ //! Names for operators -use std::str::FromStr; - use crate::attributed_string_type; attributed_string_type! { From face5daf7467eb2b60b894fe4f5f68040868ccc2 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 7 Jul 2026 11:00:22 +0200 Subject: [PATCH 2/4] changelog --- crates/stackable-operator/CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 2423fbd2b..b255f13b6 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -4,11 +4,13 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +## [0.113.3] - 2026-07-07 + ### Fixed -- [v2]: Don't require the `attributed_string_type` macro caller to have `std::str::FromStr` in scope ([#XXXX]). +- [v2]: Don't require the `attributed_string_type` macro caller to have `std::str::FromStr` in scope ([#1244]). -[#XXXX]: https://github.com/stackabletech/operator-rs/pull/XXXX +[#1244]: https://github.com/stackabletech/operator-rs/pull/1244 ## [0.113.2] - 2026-07-07 From 0e136be392967c636c7af584d2ea651d519dfdb8 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 7 Jul 2026 11:01:30 +0200 Subject: [PATCH 3/4] changelog --- crates/stackable-operator/CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index b255f13b6..6a08eff57 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -4,8 +4,6 @@ All notable changes to this project will be documented in this file. ## [Unreleased] -## [0.113.3] - 2026-07-07 - ### Fixed - [v2]: Don't require the `attributed_string_type` macro caller to have `std::str::FromStr` in scope ([#1244]). From bb54195759569c0c116879fcda66ce7a042f91fb Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 7 Jul 2026 11:04:56 +0200 Subject: [PATCH 4/4] changelog --- crates/stackable-operator/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/stackable-operator/CHANGELOG.md b/crates/stackable-operator/CHANGELOG.md index 6a08eff57..7f54726ef 100644 --- a/crates/stackable-operator/CHANGELOG.md +++ b/crates/stackable-operator/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file. ### Fixed -- [v2]: Don't require the `attributed_string_type` macro caller to have `std::str::FromStr` in scope ([#1244]). +- [v2] Don't require the `attributed_string_type` macro caller to have `std::str::FromStr` in scope ([#1244]). [#1244]: https://github.com/stackabletech/operator-rs/pull/1244