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
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b89455e99..e8e4993b1 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -15,9 +15,9 @@ on:
env:
CARGO_TERM_COLOR: always
- CARGO_INCREMENTAL: '0'
- CARGO_PROFILE_DEV_DEBUG: '0'
- RUST_TOOLCHAIN_VERSION: "1.87.0"
+ CARGO_INCREMENTAL: "0"
+ CARGO_PROFILE_DEV_DEBUG: "0"
+ RUST_TOOLCHAIN_VERSION: "1.89.0"
RUSTFLAGS: "-D warnings"
RUSTDOCFLAGS: "-D warnings"
RUST_LOG: "info"
@@ -32,16 +32,16 @@ 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
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
+ - run: cargo install --locked cargo-udeps@0.1.59
- run: cargo udeps --all-targets --all-features
run_cargodeny:
@@ -57,13 +57,13 @@ 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
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 }}
@@ -71,14 +71,14 @@ 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
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
@@ -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
@@ -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
diff --git a/.github/workflows/daily_security.yml b/.github/workflows/daily_security.yml
index e071feea7..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: {}
@@ -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 ec65d12ae..105733ddf 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: {}
@@ -15,11 +15,11 @@ 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
- - 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
diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml
index 78c33ad5a..c2b1bd082 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: {}
@@ -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
@@ -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
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$
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/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 {});
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,
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()),
+ )
}
}
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"