Skip to content

Commit db324bf

Browse files
committed
chore: Merge branch 'main' into chore/add-crd-versioning
2 parents a1c5a52 + a6d8db5 commit db324bf

File tree

25 files changed

+347
-295
lines changed

25 files changed

+347
-295
lines changed

Cargo.lock

Lines changed: 260 additions & 250 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ insta = { version= "1.40", features = ["glob"] }
3030
hyper = { version = "1.4.1", features = ["full"] }
3131
hyper-util = "0.1.8"
3232
itertools = "0.14.0"
33-
json-patch = "3.0.1"
33+
json-patch = "4.0.0"
3434
k8s-openapi = { version = "0.24.0", default-features = false, features = ["schemars", "v1_32"] }
3535
# We use rustls instead of openssl for easier portability, e.g. so that we can build stackablectl without the need to vendor (build from source) openssl
36-
kube = { version = "0.98.0", default-features = false, features = ["client", "jsonpatch", "runtime", "derive", "rustls-tls"] }
36+
kube = { version = "0.99.0", default-features = false, features = ["client", "jsonpatch", "runtime", "derive", "rustls-tls"] }
3737
opentelemetry = "0.23.0"
3838
opentelemetry_sdk = { version = "0.23.0", features = ["rt-tokio"] }
3939
opentelemetry-appender-tracing = "0.4.0"

crates/stackable-certs/src/ca/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ where
380380
key_certificate: &str,
381381
key_private_key: &str,
382382
) -> Result<Self, SecretError<S::Error>> {
383-
if !secret.type_.as_ref().is_some_and(|s| s == TLS_SECRET_TYPE) {
383+
if secret.type_.as_ref().is_none_or(|s| s != TLS_SECRET_TYPE) {
384384
return InvalidSecretTypeSnafu.fail();
385385
}
386386

crates/stackable-operator/CHANGELOG.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,32 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
## [0.87.4] - 2025-03-17
8+
9+
## [0.87.3] - 2025-03-14
10+
11+
### Added
12+
13+
- Add a `Region::is_default_config` function to determine if a region sticks to the default config ([#983]).
14+
15+
[#983]: https://github.com/stackabletech/operator-rs/pull/983
16+
17+
## [0.87.2] - 2025-03-10
18+
19+
### Changed
20+
21+
- Make `region.name` field in in S3ConnectionSpec public ([#980]).
22+
23+
[#980]: https://github.com/stackabletech/operator-rs/pull/980
24+
25+
## [0.87.1] - 2025-03-10
26+
27+
### Changed
28+
29+
- Refactor `region` field in S3ConnectionSpec ([#976]).
30+
31+
[#976]: https://github.com/stackabletech/operator-rs/pull/976
32+
733
## [0.87.0] - 2025-02-28
834

935
### Changed
@@ -24,7 +50,7 @@ All notable changes to this project will be documented in this file.
2450

2551
### Added
2652

27-
- Add `region` field to S3ConnectionSpec ([#959]).
53+
- BREAKING: Add `region` field to S3ConnectionSpec (defaults to `us-east-1`) ([#959]).
2854

2955
[#959]: https://github.com/stackabletech/operator-rs/pull/959
3056

crates/stackable-operator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "stackable-operator"
33
description = "Stackable Operator Framework"
4-
version = "0.87.0"
4+
version = "0.87.4"
55
authors.workspace = true
66
license.workspace = true
77
edition.workspace = true

crates/stackable-operator/src/commons/rbac.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ pub enum Error {
3030
/// Build RBAC objects for the product workloads.
3131
/// The `product_name` is meant to be the product name, for example: zookeeper, airflow, etc.
3232
/// and it is a assumed that a ClusterRole named `{product_name}-clusterrole` exists.
33-
3433
pub fn build_rbac_resources<T: Clone + Resource<DynamicType = ()>>(
3534
resource: &T,
3635
// 'product_name' is not used to build the names of the serviceAccount and roleBinding objects,

crates/stackable-operator/src/config/fragment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub struct Validator<'a> {
2626
parent: Option<&'a Validator<'a>>,
2727
}
2828

29-
impl<'a> Validator<'a> {
29+
impl Validator<'_> {
3030
/// Creates a `Validator` for a subfield of the current object
3131
pub fn field<'b>(&'b self, ident: &'b dyn Display) -> Validator<'b> {
3232
Validator {

crates/stackable-operator/src/config/merge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl Atomic for bool {}
146146
impl Atomic for String {}
147147
impl Atomic for Quantity {}
148148
impl Atomic for Duration {}
149-
impl<'a> Atomic for &'a str {}
149+
impl Atomic for &str {}
150150
impl Atomic for LabelSelector {}
151151
impl Atomic for PodAffinity {}
152152
impl Atomic for PodAntiAffinity {}

crates/stackable-operator/src/cpu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl<'de> Deserialize<'de> for CpuQuantity {
7070
{
7171
struct CpuQuantityVisitor;
7272

73-
impl<'de> Visitor<'de> for CpuQuantityVisitor {
73+
impl Visitor<'_> for CpuQuantityVisitor {
7474
type Value = CpuQuantity;
7575

7676
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {

crates/stackable-operator/src/memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ impl<'de> Deserialize<'de> for MemoryQuantity {
347347
{
348348
struct MemoryQuantityVisitor;
349349

350-
impl<'de> Visitor<'de> for MemoryQuantityVisitor {
350+
impl Visitor<'_> for MemoryQuantityVisitor {
351351
type Value = MemoryQuantity;
352352

353353
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {

crates/stackable-operator/src/status/condition/operations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub struct ClusterOperationsConditionBuilder<'a> {
1313
cluster_operation: &'a ClusterOperation,
1414
}
1515

16-
impl<'a> ConditionBuilder for ClusterOperationsConditionBuilder<'a> {
16+
impl ConditionBuilder for ClusterOperationsConditionBuilder<'_> {
1717
fn build_conditions(&self) -> ClusterConditionSet {
1818
vec![self.reconciliation_paused(), self.cluster_stopped()].into()
1919
}

crates/stackable-operator/src/time/serde_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::time::Duration;
44

55
struct DurationVisitor;
66

7-
impl<'de> Visitor<'de> for DurationVisitor {
7+
impl Visitor<'_> for DurationVisitor {
88
type Value = Duration;
99

1010
fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {

crates/stackable-telemetry/src/instrumentation/axum/extractor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use opentelemetry::{propagation::Extractor, Context};
1818
/// [4]: https://docs.rs/opentelemetry-http/latest/opentelemetry_http/struct.HeaderExtractor.html
1919
pub struct HeaderExtractor<'a>(pub(crate) &'a HeaderMap);
2020

21-
impl<'a> Extractor for HeaderExtractor<'a> {
21+
impl Extractor for HeaderExtractor<'_> {
2222
fn get(&self, key: &str) -> Option<&str> {
2323
self.0
2424
.get(key)

crates/stackable-telemetry/src/instrumentation/axum/injector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use opentelemetry::{propagation::Injector, Context};
2020
/// [5]: https://docs.rs/opentelemetry-http/latest/opentelemetry_http/struct.HeaderInjector.html
2121
pub struct HeaderInjector<'a>(pub(crate) &'a mut HeaderMap);
2222

23-
impl<'a> Injector for HeaderInjector<'a> {
23+
impl Injector for HeaderInjector<'_> {
2424
fn set(&mut self, key: &str, value: String) {
2525
if let Ok(header_name) = HeaderName::from_bytes(key.as_bytes()) {
2626
if let Ok(header_value) = HeaderValue::from_str(&value) {

crates/stackable-versioned-macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "stackable-versioned-macros"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
authors.workspace = true
55
license.workspace = true
66
edition.workspace = true

crates/stackable-versioned-macros/src/attrs/k8s.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub(crate) struct KubernetesArguments {
3030
pub(crate) namespaced: Flag,
3131
// root
3232
pub(crate) crates: Option<KubernetesCrateArguments>,
33-
pub(crate) status: Option<String>,
33+
pub(crate) status: Option<Path>,
3434
// derive
3535
// schema
3636
// scale

crates/stackable-versioned-macros/src/codegen/changes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ where
6666
where
6767
F: Fn(&V) -> bool,
6868
{
69-
self.get(key).map_or(false, f)
69+
self.get(key).is_some_and(f)
7070
}
7171

7272
fn lo_bound(&self, bound: Bound<&K>) -> Option<(&K, &V)> {

crates/stackable-versioned-macros/src/codegen/container/enum.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl Container {
3434
.common
3535
.options
3636
.skip
37-
.map_or(false, |s| s.from.is_present()),
37+
.is_some_and(|s| s.from.is_present()),
3838
};
3939

4040
let idents = ContainerIdents::from(item_enum.ident, None);
@@ -68,10 +68,7 @@ impl Container {
6868

6969
let options = ContainerOptions {
7070
kubernetes_options: None,
71-
skip_from: attributes
72-
.options
73-
.skip
74-
.map_or(false, |s| s.from.is_present()),
71+
skip_from: attributes.options.skip.is_some_and(|s| s.from.is_present()),
7572
};
7673

7774
let idents = ContainerIdents::from(item_enum.ident, None);
@@ -209,7 +206,7 @@ impl Enum {
209206
// cannot be deprecated). Then we retrieve the status of the variant and
210207
// ensure it is deprecated.
211208
self.variants.iter().any(|f| {
212-
f.changes.as_ref().map_or(false, |c| {
209+
f.changes.as_ref().is_some_and(|c| {
213210
c.value_is(&version.inner, |a| {
214211
matches!(
215212
a,

crates/stackable-versioned-macros/src/codegen/container/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ pub(crate) struct KubernetesOptions {
275275
pub(crate) namespaced: bool,
276276
// root
277277
pub(crate) crates: KubernetesCrateOptions,
278-
pub(crate) status: Option<String>,
278+
pub(crate) status: Option<Path>,
279279
// derive
280280
// schema
281281
// scale
@@ -302,7 +302,7 @@ impl From<KubernetesArguments> for KubernetesOptions {
302302
.map_or_else(KubernetesCrateOptions::default, |crates| crates.into()),
303303
status: args.status,
304304
shortnames: args.shortnames,
305-
skip_merged_crd: args.skip.map_or(false, |s| s.merged_crd.is_present()),
305+
skip_merged_crd: args.skip.is_some_and(|s| s.merged_crd.is_present()),
306306
}
307307
}
308308
}

crates/stackable-versioned-macros/src/codegen/container/struct.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl Container {
4747
.common
4848
.options
4949
.skip
50-
.map_or(false, |s| s.from.is_present()),
50+
.is_some_and(|s| s.from.is_present()),
5151
kubernetes_options,
5252
};
5353

@@ -90,10 +90,7 @@ impl Container {
9090
}
9191

9292
let options = ContainerOptions {
93-
skip_from: attributes
94-
.options
95-
.skip
96-
.map_or(false, |s| s.from.is_present()),
93+
skip_from: attributes.options.skip.is_some_and(|s| s.from.is_present()),
9794
kubernetes_options,
9895
};
9996

@@ -245,7 +242,7 @@ impl Struct {
245242
// cannot be deprecated). Then we retrieve the status of the field and
246243
// ensure it is deprecated.
247244
self.fields.iter().any(|f| {
248-
f.changes.as_ref().map_or(false, |c| {
245+
f.changes.as_ref().is_some_and(|c| {
249246
c.value_is(&version.inner, |a| {
250247
matches!(
251248
a,

crates/stackable-versioned-macros/src/codegen/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl From<&StandaloneContainerAttributes> for Vec<VersionDefinition> {
3636
.versions
3737
.iter()
3838
.map(|v| VersionDefinition {
39-
skip_from: v.skip.as_ref().map_or(false, |s| s.from.is_present()),
39+
skip_from: v.skip.as_ref().is_some_and(|s| s.from.is_present()),
4040
ident: format_ident!("{version}", version = v.name.to_string()).into(),
4141
deprecated: v.deprecated.as_ref().map(|r#override| {
4242
r#override
@@ -57,7 +57,7 @@ impl From<&ModuleAttributes> for Vec<VersionDefinition> {
5757
.versions
5858
.iter()
5959
.map(|v| VersionDefinition {
60-
skip_from: v.skip.as_ref().map_or(false, |s| s.from.is_present()),
60+
skip_from: v.skip.as_ref().is_some_and(|s| s.from.is_present()),
6161
ident: format_ident!("{version}", version = v.name.to_string()).into(),
6262
deprecated: v.deprecated.as_ref().map(|r#override| {
6363
r#override

crates/stackable-versioned-macros/src/codegen/module.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl Module {
5353
.options
5454
.skip
5555
.as_ref()
56-
.map_or(false, |opts| opts.from.is_present());
56+
.is_some_and(|opts| opts.from.is_present());
5757

5858
let mut errors = Error::accumulator();
5959
let mut submodules = HashMap::new();

crates/stackable-versioned/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
## [0.7.0] - 2025-03-17
8+
9+
### Changed
10+
11+
- Change `status` field type to `syn::Path` in `KubernetesArguments` and `KubernetesOptions` ([#982]).
12+
13+
[#982]: https://github.com/stackabletech/operator-rs/pull/982
14+
715
## [0.6.0] - 2025-02-28
816

917
### Added

crates/stackable-versioned/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "stackable-versioned"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
authors.workspace = true
55
license.workspace = true
66
edition.workspace = true

deny.toml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,37 @@ ignore = [
1717
# So we need to accept this, as of SDP 24.11 we are not using the rsa crate to create certificates used in production
1818
# setups.
1919
#
20-
# TODO: Remove after https://github.com/RustCrypto/RSA/pull/394 is merged
20+
# TODO: Remove after https://github.com/RustCrypto/RSA/pull/394 is merged and v0.10.0 is released
2121
"RUSTSEC-2023-0071",
2222

2323
# https://rustsec.org/advisories/RUSTSEC-2024-0384
2424
# "instant" is unmaintained
2525
#
2626
# The upstream "kube" crate also silenced this in https://github.com/kube-rs/kube/commit/4f1e889f265da8f19f03f60683569cae1a154fda
2727
# They/we are actively working on migrating kube from backoff to backon, which removes the transitive dependency on
28-
# instant, in https://github.com/kube-rs/kube/pull/1652.
28+
# instant, in https://github.com/kube-rs/kube/pull/1653.
2929
#
30-
# TODO: Remove after https://github.com/kube-rs/kube/pull/1652 is merged
30+
# TODO: Remove after https://github.com/kube-rs/kube/pull/1653 is released
3131
"RUSTSEC-2024-0384",
32+
33+
# Advisory: https://rustsec.org/advisories/RUSTSEC-2025-0012
34+
# The [backoff](https://crates.io/crates/backoff) crate is no longer actively maintained. For exponential backoffs/retrying, you can use the [backon](https://crates.io/crates/backon) crate.
35+
# Announcement: https://github.com/ihrwein/backoff/issues/66
36+
#
37+
# TODO: Remove after https://github.com/kube-rs/kube/pull/1653 is released
38+
"RUSTSEC-2025-0012",
39+
40+
# Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0436
41+
# The creator of the crate `paste` has stated in the [`README.md`](https://github.com/dtolnay/paste/blob/master/README.md)
42+
# that this project is not longer maintained as well as archived the repository
43+
# Announcement: https://github.com/dtolnay/paste
44+
#
45+
# This comes in via aws-lc-rs. There is a PR open to migrate from `paste` to `concat-idents`.
46+
# https://github.com/aws/aws-lc-rs/pull/723
47+
#
48+
# TODO: Remove after the migration is done and aws-lc-rs doesn't use paste anymore.
49+
"RUSTSEC-2024-0436",
50+
3251
]
3352

3453
[bans]
@@ -47,7 +66,7 @@ allow = [
4766
"LicenseRef-webpki",
4867
"MIT",
4968
"MPL-2.0",
50-
"OpenSSL", # Needed for the ring and/or aws-lc-sys crate. See https://github.com/stackabletech/operator-templating/pull/464 for details
69+
"OpenSSL", # Needed for the ring and/or aws-lc-sys crate. See https://github.com/stackabletech/operator-templating/pull/464 for details
5170
"Unicode-3.0",
5271
"Unicode-DFS-2016",
5372
"Zlib",
@@ -58,16 +77,12 @@ private = { ignore = true }
5877
[[licenses.clarify]]
5978
name = "ring"
6079
expression = "LicenseRef-ring"
61-
license-files = [
62-
{ path = "LICENSE", hash = 0xbd0eed23 },
63-
]
80+
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]
6481

6582
[[licenses.clarify]]
6683
name = "webpki"
6784
expression = "LicenseRef-webpki"
68-
license-files = [
69-
{ path = "LICENSE", hash = 0x001c7e6c },
70-
]
85+
license-files = [{ path = "LICENSE", hash = 0x001c7e6c }]
7186

7287
[sources]
7388
unknown-registry = "deny"

0 commit comments

Comments
 (0)