From 9900eb338e277b13b08d064fef01b08a71b5404f Mon Sep 17 00:00:00 2001 From: Stacky McStackface Date: Tue, 4 Feb 2025 09:16:31 +0000 Subject: [PATCH 1/2] chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@90012815baf2df730635fa27cf9a7992fe676225 Reference-to: stackabletech/operator-templating@9001281 (Fix pre-commit hook) --- .github/workflows/pr_pre-commit.yaml | 2 +- .pre-commit-config.yaml | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr_pre-commit.yaml b/.github/workflows/pr_pre-commit.yaml index ec55fe78..bdc3ddfd 100644 --- a/.github/workflows/pr_pre-commit.yaml +++ b/.github/workflows/pr_pre-commit.yaml @@ -6,7 +6,7 @@ on: env: CARGO_TERM_COLOR: always - RUST_TOOLCHAIN_VERSION: "1.82.0" + RUST_TOOLCHAIN_VERSION: "nightly-2025-01-15" HADOLINT_VERSION: "v2.12.0" PYTHON_VERSION: "3.12" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a36fdcb7..c5bd8ad1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,10 +17,6 @@ repos: - repo: https://github.com/doublify/pre-commit-rust rev: eeee35a89e69d5772bdee97db1a6a898467b686e # 1.0 hooks: - - id: fmt - # Pinning to a specific rustc version, so that we get consistent formatting - entry: RUSTUP_TOOLCHAIN=nightly-2025-01-15 cargo fmt - args: ["--all", "--", "--check"] - id: clippy args: ["--all-targets", "--", "-D", "warnings"] @@ -78,3 +74,10 @@ repos: entry: cargo test stages: [pre-commit, pre-merge-commit, manual] pass_filenames: false + + - id: cargo-rustfmt + name: cargo-rustfmt + language: system + entry: cargo +nightly-2025-01-15 fmt --all -- --check + stages: [pre-commit] + pass_filenames: false From 4cd63bafd07952b86abb5e07b685e6d4b48b4f9c Mon Sep 17 00:00:00 2001 From: Techassi Date: Tue, 4 Feb 2025 11:08:54 +0100 Subject: [PATCH 2/2] chore: Apply formatting --- rust/operator-binary/src/discovery.rs | 4 ++-- rust/operator-binary/src/product_logging.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/rust/operator-binary/src/discovery.rs b/rust/operator-binary/src/discovery.rs index c87d6552..2e00fb0b 100644 --- a/rust/operator-binary/src/discovery.rs +++ b/rust/operator-binary/src/discovery.rs @@ -1,5 +1,3 @@ -use crate::controller::{build_recommended_labels, APP_PORT}; - use snafu::{OptionExt, ResultExt, Snafu}; use stackable_opa_crd::{OpaCluster, OpaRole}; use stackable_operator::{ @@ -10,6 +8,8 @@ use stackable_operator::{ utils::cluster_info::KubernetesClusterInfo, }; +use crate::controller::{build_recommended_labels, APP_PORT}; + #[derive(Snafu, Debug)] pub enum Error { #[snafu(display("object {} is missing metadata to build owner reference", opa))] diff --git a/rust/operator-binary/src/product_logging.rs b/rust/operator-binary/src/product_logging.rs index a199a676..e79dc566 100644 --- a/rust/operator-binary/src/product_logging.rs +++ b/rust/operator-binary/src/product_logging.rs @@ -1,6 +1,5 @@ use snafu::{OptionExt, ResultExt, Snafu}; use stackable_opa_crd::{Container, OpaCluster}; -use stackable_operator::product_logging::spec::LogLevel; use stackable_operator::{ builder::configmap::ConfigMapBuilder, client::Client, @@ -8,7 +7,7 @@ use stackable_operator::{ kube::ResourceExt, product_logging::{ self, - spec::{ContainerLogConfig, ContainerLogConfigChoice, Logging}, + spec::{ContainerLogConfig, ContainerLogConfigChoice, LogLevel, Logging}, }, role_utils::RoleGroupRef, };