Skip to content

Commit 7f66b1d

Browse files
chore: Update templated files (9001281) (#278)
* chore: Generated commit to update templated files since the last template run up to stackabletech/operator-templating@9001281 Reference-to: stackabletech/operator-templating@9001281 (Fix pre-commit hook) * chore: Apply formatting --------- Co-authored-by: Techassi <git@techassi.dev>
1 parent d6fb476 commit 7f66b1d

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

.github/workflows/pr_pre-commit.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
env:
88
CARGO_TERM_COLOR: always
9-
RUST_TOOLCHAIN_VERSION: "1.82.0"
9+
RUST_TOOLCHAIN_VERSION: "nightly-2025-01-15"
1010
HADOLINT_VERSION: "v2.12.0"
1111
PYTHON_VERSION: "3.12"
1212

.pre-commit-config.yaml

+7-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ repos:
1717
- repo: https://github.com/doublify/pre-commit-rust
1818
rev: eeee35a89e69d5772bdee97db1a6a898467b686e # 1.0
1919
hooks:
20-
- id: fmt
21-
# Pinning to a specific rustc version, so that we get consistent formatting
22-
entry: RUSTUP_TOOLCHAIN=nightly-2025-01-15 cargo fmt
23-
args: ["--all", "--", "--check"]
2420
- id: clippy
2521
args: ["--all-targets", "--", "-D", "warnings"]
2622

@@ -78,3 +74,10 @@ repos:
7874
entry: cargo test
7975
stages: [pre-commit, pre-merge-commit, manual]
8076
pass_filenames: false
77+
78+
- id: cargo-rustfmt
79+
name: cargo-rustfmt
80+
language: system
81+
entry: cargo +nightly-2025-01-15 fmt --all -- --check
82+
stages: [pre-commit]
83+
pass_filenames: false

rust/operator-binary/src/csi_server/controller.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ use stackable_operator::{
88
};
99
use tonic::{Request, Response, Status};
1010

11-
use crate::utils::error::error_full_message;
12-
1311
use super::{tonic_unimplemented, ListenerSelector, ListenerVolumeContext};
12+
use crate::utils::error::error_full_message;
1413

1514
pub struct ListenerOperatorController {
1615
pub client: stackable_operator::client::Client,

rust/operator-binary/src/csi_server/node.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::{fmt::Debug, path::PathBuf};
2+
13
use csi_grpc::{self as csi, v1::Topology};
24
use serde::{de::IntoDeserializer, Deserialize};
35
use snafu::{OptionExt, ResultExt, Snafu};
@@ -13,9 +15,9 @@ use stackable_operator::{
1315
runtime::reflector::ObjectRef,
1416
},
1517
};
16-
use std::{fmt::Debug, path::PathBuf};
1718
use tonic::{Request, Response, Status};
1819

20+
use super::{tonic_unimplemented, ListenerSelector, ListenerVolumeContext};
1921
use crate::{
2022
listener_controller::{
2123
listener_mounted_pod_label, listener_persistent_volume_label, ListenerMountedPodLabelError,
@@ -24,8 +26,6 @@ use crate::{
2426
utils::{address::node_primary_addresses, error::error_full_message},
2527
};
2628

27-
use super::{tonic_unimplemented, ListenerSelector, ListenerVolumeContext};
28-
2929
const FIELD_MANAGER_SCOPE: &str = "volume";
3030

3131
pub const NODE_TOPOLOGY_LABEL_HOSTNAME: &str = "listeners.stackable.tech/hostname";

rust/operator-binary/src/listener_controller.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ use futures::{
99
StreamExt,
1010
};
1111
use snafu::{OptionExt, ResultExt, Snafu};
12+
#[cfg(doc)]
13+
use stackable_operator::k8s_openapi::api::core::v1::Pod;
1214
use stackable_operator::{
1315
builder::meta::ObjectMetaBuilder,
1416
cluster_resources::{ClusterResourceApplyStrategy, ClusterResources},
@@ -44,9 +46,6 @@ use crate::{
4446
APP_NAME, OPERATOR_KEY,
4547
};
4648

47-
#[cfg(doc)]
48-
use stackable_operator::k8s_openapi::api::core::v1::Pod;
49-
5049
const OPERATOR_NAME: &str = "listeners.stackable.tech";
5150
const CONTROLLER_NAME: &str = "listener";
5251
pub const FULL_CONTROLLER_NAME: &str = concatcp!(CONTROLLER_NAME, '.', OPERATOR_NAME);

0 commit comments

Comments
 (0)