From b6cd5ef454b7525f89f236d0bb5fc4b102d6e8f4 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 11:38:25 +0200 Subject: [PATCH 01/14] chore: Bump Rust toolchains to 1.89.0 and nightly-2025-05-26 --- .vscode/settings.json | 2 +- rust-toolchain.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 2571fe27f..35c56cb0d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,7 +3,7 @@ "rust-analyzer.imports.granularity.group": "crate", "rust-analyzer.rustfmt.overrideCommand": [ "rustfmt", - "+nightly-2025-05-26", + "+nightly-2025-10-23", "--edition", "2024", "--" diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 291696d0e..65c0d610c 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.87.0" +channel = "1.89.0" profile = "default" From dc8953ddb64512ac2a03dc755db673e69dce1c1d Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 11:39:13 +0200 Subject: [PATCH 02/14] ci: Bump Rust toolchains to 1.89.0 and nightly-2025-05-26 --- .github/workflows/build.yml | 2 +- .github/workflows/pr_pre-commit.yaml | 2 +- .github/workflows/publish-docs.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b89455e99..d1c9bc3e0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ env: CARGO_TERM_COLOR: always CARGO_INCREMENTAL: '0' CARGO_PROFILE_DEV_DEBUG: '0' - RUST_TOOLCHAIN_VERSION: "1.87.0" + RUST_TOOLCHAIN_VERSION: "1.89.0" RUSTFLAGS: "-D warnings" RUSTDOCFLAGS: "-D warnings" RUST_LOG: "info" diff --git a/.github/workflows/pr_pre-commit.yaml b/.github/workflows/pr_pre-commit.yaml index ec65d12ae..6b2ee1ab6 100644 --- a/.github/workflows/pr_pre-commit.yaml +++ b/.github/workflows/pr_pre-commit.yaml @@ -7,7 +7,7 @@ on: env: CARGO_TERM_COLOR: always - RUST_TOOLCHAIN_VERSION: "nightly-2025-05-26" + RUST_TOOLCHAIN_VERSION: "nightly-2025-10-23" permissions: {} diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 78c33ad5a..cdffd2f79 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -13,7 +13,7 @@ on: - crates/** env: - RUST_TOOLCHAIN_VERSION: "1.87.0" + RUST_TOOLCHAIN_VERSION: "1.89.0" permissions: {} From 3f4d533ce0b79b3d503e9c60fe780484d3489e70 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 11:41:08 +0200 Subject: [PATCH 03/14] ci: Bump actions/checkout to v5.0.0 --- .github/workflows/build.yml | 8 ++++---- .github/workflows/daily_security.yml | 2 +- .github/workflows/pr_pre-commit.yaml | 2 +- .github/workflows/publish-docs.yml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d1c9bc3e0..597a3cc79 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: env: RUSTC_BOOTSTRAP: 1 steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: persist-credentials: false - uses: dtolnay/rust-toolchain@master @@ -57,7 +57,7 @@ jobs: continue-on-error: ${{ matrix.checks == 'advisories' }} steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: persist-credentials: false - uses: dtolnay/rust-toolchain@master @@ -71,7 +71,7 @@ jobs: name: Run RustDoc runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: persist-credentials: false - uses: dtolnay/rust-toolchain@master @@ -89,7 +89,7 @@ jobs: - run_rustdoc runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: persist-credentials: false - uses: dtolnay/rust-toolchain@master diff --git a/.github/workflows/daily_security.yml b/.github/workflows/daily_security.yml index e071feea7..8b4e2b0dd 100644 --- a/.github/workflows/daily_security.yml +++ b/.github/workflows/daily_security.yml @@ -12,7 +12,7 @@ jobs: audit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: persist-credentials: false - uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0 diff --git a/.github/workflows/pr_pre-commit.yaml b/.github/workflows/pr_pre-commit.yaml index 6b2ee1ab6..7d53be152 100644 --- a/.github/workflows/pr_pre-commit.yaml +++ b/.github/workflows/pr_pre-commit.yaml @@ -15,7 +15,7 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: persist-credentials: false fetch-depth: 0 diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index cdffd2f79..5b4f76155 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: persist-credentials: false From b2614fe5025a30d3af154eadacca00f07d319031 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 11:42:21 +0200 Subject: [PATCH 04/14] ci: Bump Swatinem/rust-cache to v2.8.1 --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 597a3cc79..3c8c20eca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} - - uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0 + - uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1 with: key: udeps - run: cargo install --locked cargo-udeps@0.1.57 @@ -78,7 +78,7 @@ jobs: with: toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} components: rustfmt - - uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0 + - uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1 with: key: doc - run: cargo doc --document-private-items @@ -99,7 +99,7 @@ jobs: # for our cases. # See: https://github.com/dtolnay/trybuild/issues/236#issuecomment-1620950759 components: rust-src - - uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0 + - uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1 with: key: test - run: cargo test --no-default-features --workspace From 9c3a604677a94e21f6b4be16e6936856af8e1c56 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 11:43:15 +0200 Subject: [PATCH 05/14] ci: Bump EmbarkStudios/cargo-deny-action to v2.0.13 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c8c20eca..d814fe08e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,7 +63,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }} - - uses: EmbarkStudios/cargo-deny-action@30f817c6f72275c6d54dc744fbca09ebc958599f # v2.0.12 + - uses: EmbarkStudios/cargo-deny-action@f2ba7abc2abebaf185c833c3961145a3c275caad # v2.0.13 with: command: check ${{ matrix.checks }} From aa2b598ac8b224e43d67ff772189f2c0b17bf878 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 11:43:55 +0200 Subject: [PATCH 06/14] ci: Bump stackabletech/actions to v0.10.3 --- .github/workflows/pr_pre-commit.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_pre-commit.yaml b/.github/workflows/pr_pre-commit.yaml index 7d53be152..105733ddf 100644 --- a/.github/workflows/pr_pre-commit.yaml +++ b/.github/workflows/pr_pre-commit.yaml @@ -19,7 +19,7 @@ jobs: with: persist-credentials: false fetch-depth: 0 - - uses: stackabletech/actions/run-pre-commit@4483641a7e24057bd2ba51cb4c3f2f0010ad21b7 # v0.8.4 + - uses: stackabletech/actions/run-pre-commit@75e0756966dea229d697165bfd06ba79abcda72c # v0.10.3 with: rust: ${{ env.RUST_TOOLCHAIN_VERSION }} # rust-src is required for trybuild stderr output comparison to work From 688635387ac60d718834a19b5d4e90c6c2899a8a Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 11:44:22 +0200 Subject: [PATCH 07/14] ci: Bump actions/upload-pages-artifact to v4.0.0 --- .github/workflows/publish-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 5b4f76155..c2b1bd082 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -37,7 +37,7 @@ jobs: run: echo '' > target/doc/index.html - name: Upload Documentation Artifacts - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 + uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 with: path: target/doc From e919735dce2b95274934d6dc1c99c633e460dc0c Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 11:44:49 +0200 Subject: [PATCH 08/14] ci: Bump cargo-udeps to 0.1.59 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d814fe08e..47c8124d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,7 @@ jobs: - uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1 with: key: udeps - - run: cargo install --locked cargo-udeps@0.1.57 + - run: cargo install --locked cargo-udeps@0.1.59 - run: cargo udeps --all-targets --all-features run_cargodeny: From c6577b6d0c9f0241ecb1de4e95bcb24ec122539c Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 11:45:17 +0200 Subject: [PATCH 09/14] chore(ci): Make quoted YAML values consistent --- .github/workflows/build.yml | 4 ++-- .github/workflows/daily_security.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47c8124d6..e8e4993b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,8 +15,8 @@ on: env: CARGO_TERM_COLOR: always - CARGO_INCREMENTAL: '0' - CARGO_PROFILE_DEV_DEBUG: '0' + CARGO_INCREMENTAL: "0" + CARGO_PROFILE_DEV_DEBUG: "0" RUST_TOOLCHAIN_VERSION: "1.89.0" RUSTFLAGS: "-D warnings" RUSTDOCFLAGS: "-D warnings" diff --git a/.github/workflows/daily_security.yml b/.github/workflows/daily_security.yml index 8b4e2b0dd..d9ba37ed2 100644 --- a/.github/workflows/daily_security.yml +++ b/.github/workflows/daily_security.yml @@ -3,7 +3,7 @@ name: Security audit on: schedule: - - cron: '15 4 * * *' + - cron: "15 4 * * *" workflow_dispatch: permissions: {} From 8db99a6f8561f3a000b16cd25d8b976761384f5f Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 11:59:08 +0200 Subject: [PATCH 10/14] chore: Fix Clippy's mismatched_lifetime_syntaxes lint --- crates/stackable-operator/src/product_logging/spec.rs | 2 +- crates/stackable-operator/src/utils/option.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/stackable-operator/src/product_logging/spec.rs b/crates/stackable-operator/src/product_logging/spec.rs index 50977ecb6..67e65ab04 100644 --- a/crates/stackable-operator/src/product_logging/spec.rs +++ b/crates/stackable-operator/src/product_logging/spec.rs @@ -85,7 +85,7 @@ where T: Clone + Display + Ord, { /// Get the logging configuration for `container`, falling back to the default. - pub fn for_container(&self, container: &T) -> Cow { + pub fn for_container(&'_ self, container: &T) -> Cow<'_, ContainerLogConfig> { self.containers .get(container) .map(Cow::Borrowed) diff --git a/crates/stackable-operator/src/utils/option.rs b/crates/stackable-operator/src/utils/option.rs index fccefdb8b..cd03cb557 100644 --- a/crates/stackable-operator/src/utils/option.rs +++ b/crates/stackable-operator/src/utils/option.rs @@ -9,7 +9,7 @@ pub trait OptionExt { /// Compared to [`Option::unwrap_or_else`], this saves having to [`Clone::clone`] the value to make the types line up. /// /// Consider using [`Self::as_deref_or_else`] instead if the type implements [`Deref`] (such as [`String`] or [`PathBuf`]). - fn as_ref_or_else(&self, default: impl FnOnce() -> T) -> Cow + fn as_ref_or_else(&'_ self, default: impl FnOnce() -> T) -> Cow<'_, T> where T: Clone; @@ -18,14 +18,14 @@ pub trait OptionExt { /// Compared to [`Option::unwrap_or_else`], this saves having to [`Clone::clone`] the value to make the types line up. /// /// Consider using [`Self::as_ref_or_else`] instead if the type does not implement [`Deref`]. - fn as_deref_or_else(&self, default: impl FnOnce() -> T) -> Cow + fn as_deref_or_else(&'_ self, default: impl FnOnce() -> T) -> Cow<'_, T::Target> where T: Deref, T::Target: ToOwned; } impl OptionExt for Option { - fn as_ref_or_else(&self, default: impl FnOnce() -> T) -> Cow + fn as_ref_or_else(&'_ self, default: impl FnOnce() -> T) -> Cow<'_, T> where T: Clone, { @@ -33,7 +33,7 @@ impl OptionExt for Option { .map_or_else(|| Cow::Owned(default()), Cow::Borrowed) } - fn as_deref_or_else(&self, default: impl FnOnce() -> T) -> Cow<::Target> + fn as_deref_or_else(&'_ self, default: impl FnOnce() -> T) -> Cow<'_, ::Target> where T: Deref, ::Target: ToOwned, From d4d5ca17484a21aa8b9d0419b9e4ad46b860d85b Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 12:03:29 +0200 Subject: [PATCH 11/14] chore: Fix Clippy's collapsible_if lint --- .../src/instrumentation/axum/injector.rs | 8 ++-- crates/stackable-telemetry/src/tracing/mod.rs | 16 +++---- .../src/attrs/item/mod.rs | 46 +++++++++---------- .../src/attrs/item/variant.rs | 14 +++--- 4 files changed, 41 insertions(+), 43 deletions(-) diff --git a/crates/stackable-telemetry/src/instrumentation/axum/injector.rs b/crates/stackable-telemetry/src/instrumentation/axum/injector.rs index 71bccfdf3..a42cfa231 100644 --- a/crates/stackable-telemetry/src/instrumentation/axum/injector.rs +++ b/crates/stackable-telemetry/src/instrumentation/axum/injector.rs @@ -22,10 +22,10 @@ pub struct HeaderInjector<'a>(pub(crate) &'a mut HeaderMap); impl Injector for HeaderInjector<'_> { fn set(&mut self, key: &str, value: String) { - if let Ok(header_name) = HeaderName::from_bytes(key.as_bytes()) { - if let Ok(header_value) = HeaderValue::from_str(&value) { - self.0.insert(header_name, header_value); - } + if let Ok(header_name) = HeaderName::from_bytes(key.as_bytes()) + && let Ok(header_value) = HeaderValue::from_str(&value) + { + self.0.insert(header_name, header_value); } } } diff --git a/crates/stackable-telemetry/src/tracing/mod.rs b/crates/stackable-telemetry/src/tracing/mod.rs index 96016ecf1..3d3878903 100644 --- a/crates/stackable-telemetry/src/tracing/mod.rs +++ b/crates/stackable-telemetry/src/tracing/mod.rs @@ -570,16 +570,16 @@ impl Drop for Tracing { "shutting down opentelemetry OTLP providers" ); - if let Some(tracer_provider) = &self.tracer_provider { - if let Err(error) = tracer_provider.shutdown() { - tracing::error!(%error, "unable to shutdown TracerProvider") - } + if let Some(tracer_provider) = &self.tracer_provider + && let Err(error) = tracer_provider.shutdown() + { + tracing::error!(%error, "unable to shutdown TracerProvider") } - if let Some(logger_provider) = &self.logger_provider { - if let Err(error) = logger_provider.shutdown() { - tracing::error!(%error, "unable to shutdown LoggerProvider"); - } + if let Some(logger_provider) = &self.logger_provider + && let Err(error) = logger_provider.shutdown() + { + tracing::error!(%error, "unable to shutdown LoggerProvider"); } } } diff --git a/crates/stackable-versioned-macros/src/attrs/item/mod.rs b/crates/stackable-versioned-macros/src/attrs/item/mod.rs index d6124f627..b09f6cb89 100644 --- a/crates/stackable-versioned-macros/src/attrs/item/mod.rs +++ b/crates/stackable-versioned-macros/src/attrs/item/mod.rs @@ -66,12 +66,12 @@ impl CommonItemAttributes { pub fn validate_versions(&self, versions: &[VersionDefinition]) -> Result<()> { let mut errors = Error::accumulator(); - if let Some(added) = &self.added { - if !versions.iter().any(|v| v.inner == *added.since) { - errors.push(Error::custom( + if let Some(added) = &self.added + && !versions.iter().any(|v| v.inner == *added.since) + { + errors.push(Error::custom( "the `added` action uses a version which is not declared via `#[versioned(version)]`", ).with_span(&added.since.span())); - } } for change in &self.changes { @@ -82,12 +82,12 @@ impl CommonItemAttributes { } } - if let Some(deprecated) = &self.deprecated { - if !versions.iter().any(|v| v.inner == *deprecated.since) { - errors.push(Error::custom( + if let Some(deprecated) = &self.deprecated + && !versions.iter().any(|v| v.inner == *deprecated.since) + { + errors.push(Error::custom( "the `deprecated` action uses a version which is not declared via `#[versioned(version)]`", ).with_span(&deprecated.since.span())); - } } errors.finish() @@ -148,12 +148,11 @@ impl CommonItemAttributes { // version. // NOTE (@Techassi): Is this already covered by the code below? if let (Some(added_version), Some(deprecated_version)) = (added_version, deprecated_version) + && added_version > deprecated_version { - if added_version > deprecated_version { - return Err(Error::custom(format!( + return Err(Error::custom(format!( "cannot marked as `added` in version `{added_version}` while being marked as `deprecated` in an earlier version `{deprecated_version}`" )).with_span(item_idents.original())); - } } // Now, iterate over all changes and ensure that their versions are @@ -206,11 +205,12 @@ impl CommonItemAttributes { /// valid. fn validate_added_action(&self) -> Result<()> { // NOTE (@Techassi): Can the path actually be empty? - if let Some(added) = &self.added { - if added.default_fn.segments.is_empty() { - return Err(Error::custom("`default_fn` cannot be empty") - .with_span(&added.default_fn.span())); - } + if let Some(added) = &self.added + && added.default_fn.segments.is_empty() + { + return Err( + Error::custom("`default_fn` cannot be empty").with_span(&added.default_fn.span()) + ); } Ok(()) @@ -230,15 +230,13 @@ impl CommonItemAttributes { } // This ensures that `from_name` doesn't include the deprecation prefix. - if let Some(from_name) = change.from_name.as_ref() { - if from_name.starts_with(item_ident.deprecation_prefix()) { - errors.push( - Error::custom( - "the previous name must not start with the deprecation prefix", - ) + if let Some(from_name) = change.from_name.as_ref() + && from_name.starts_with(item_ident.deprecation_prefix()) + { + errors.push( + Error::custom("the previous name must not start with the deprecation prefix") .with_span(&from_name.span()), - ); - } + ); } if change.from_type.is_none() { diff --git a/crates/stackable-versioned-macros/src/attrs/item/variant.rs b/crates/stackable-versioned-macros/src/attrs/item/variant.rs index a0642b0d3..39a2681ba 100644 --- a/crates/stackable-versioned-macros/src/attrs/item/variant.rs +++ b/crates/stackable-versioned-macros/src/attrs/item/variant.rs @@ -59,13 +59,13 @@ impl VariantAttributes { // Validate names of renames for change in &self.common.changes { - if let Some(from_name) = &change.from_name { - if !from_name.is_case(Case::Pascal) { - errors.push( - Error::custom("renamed variant must use PascalCase") - .with_span(&from_name.span()), - ) - } + if let Some(from_name) = &change.from_name + && !from_name.is_case(Case::Pascal) + { + errors.push( + Error::custom("renamed variant must use PascalCase") + .with_span(&from_name.span()), + ) } } From 7ddff4cc924f8132d06698426ef5471c9b7057b2 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 12:05:40 +0200 Subject: [PATCH 12/14] chore: Remove unused test code --- crates/stackable-operator/src/config/fragment.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/crates/stackable-operator/src/config/fragment.rs b/crates/stackable-operator/src/config/fragment.rs index 5d08520f1..291e4d6f5 100644 --- a/crates/stackable-operator/src/config/fragment.rs +++ b/crates/stackable-operator/src/config/fragment.rs @@ -246,13 +246,6 @@ mod tests { optional: Option, } - #[derive(Fragment, Debug, PartialEq, Eq)] - #[fragment(path_overrides(fragment = "super"))] - struct GenericNested { - required: T, - optional: Option, - } - #[test] fn validate_empty() { assert_eq!(validate::(EmptyFragment {}).unwrap(), Empty {}); From 0e3a83247e9cc1bd1d9bbfc54b159424bd0e6ae5 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 12:20:26 +0200 Subject: [PATCH 13/14] chore: Update Rust toolchain in pre-commit config --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a77bef2c4..b652872c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,7 +51,7 @@ repos: name: cargo-rustfmt language: system # Pinning to a specific rustc version, so that we get consistent formatting - entry: cargo +nightly-2025-05-26 fmt --all -- --check + entry: cargo +nightly-2025-10-23 fmt --all -- --check stages: [pre-commit, pre-merge-commit] pass_filenames: false files: \.rs$ From f18c8639cb40a15217e362926413cd47da791e50 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 23 Oct 2025 12:20:49 +0200 Subject: [PATCH 14/14] chore(issue-template): Add nightly Rust toolchain task --- .github/ISSUE_TEMPLATE/release-workspace-members.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/release-workspace-members.md b/.github/ISSUE_TEMPLATE/release-workspace-members.md index 66ae6b0fc..2256ac5cb 100644 --- a/.github/ISSUE_TEMPLATE/release-workspace-members.md +++ b/.github/ISSUE_TEMPLATE/release-workspace-members.md @@ -39,6 +39,7 @@ Replace the items in the task lists below with the applicable Pull Requests - [ ] Also adjust the nightly Rust toolchain version used for formatting (this should be kept in sync across here, operator-templating and docker-images). - `.github/workflows/pre_commit.yaml` + - `.pre-commit-config.yaml` - `.vscode/settings.json` - [ ] Add a changelog entry. - [ ] Update any actions (using the Git commit hash) in the workflows. Hint: Also make sure that the