Skip to content

Commit

Permalink
chore: Update templated files (9001281) (#278)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
stackable-bot and Techassi authored Feb 4, 2025
1 parent d6fb476 commit 7f66b1d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr_pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
11 changes: 7 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down Expand Up @@ -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
3 changes: 1 addition & 2 deletions rust/operator-binary/src/csi_server/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ use stackable_operator::{
};
use tonic::{Request, Response, Status};

use crate::utils::error::error_full_message;

use super::{tonic_unimplemented, ListenerSelector, ListenerVolumeContext};
use crate::utils::error::error_full_message;

pub struct ListenerOperatorController {
pub client: stackable_operator::client::Client,
Expand Down
6 changes: 3 additions & 3 deletions rust/operator-binary/src/csi_server/node.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::{fmt::Debug, path::PathBuf};

use csi_grpc::{self as csi, v1::Topology};
use serde::{de::IntoDeserializer, Deserialize};
use snafu::{OptionExt, ResultExt, Snafu};
Expand All @@ -13,9 +15,9 @@ use stackable_operator::{
runtime::reflector::ObjectRef,
},
};
use std::{fmt::Debug, path::PathBuf};
use tonic::{Request, Response, Status};

use super::{tonic_unimplemented, ListenerSelector, ListenerVolumeContext};
use crate::{
listener_controller::{
listener_mounted_pod_label, listener_persistent_volume_label, ListenerMountedPodLabelError,
Expand All @@ -24,8 +26,6 @@ use crate::{
utils::{address::node_primary_addresses, error::error_full_message},
};

use super::{tonic_unimplemented, ListenerSelector, ListenerVolumeContext};

const FIELD_MANAGER_SCOPE: &str = "volume";

pub const NODE_TOPOLOGY_LABEL_HOSTNAME: &str = "listeners.stackable.tech/hostname";
Expand Down
5 changes: 2 additions & 3 deletions rust/operator-binary/src/listener_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ use futures::{
StreamExt,
};
use snafu::{OptionExt, ResultExt, Snafu};
#[cfg(doc)]
use stackable_operator::k8s_openapi::api::core::v1::Pod;
use stackable_operator::{
builder::meta::ObjectMetaBuilder,
cluster_resources::{ClusterResourceApplyStrategy, ClusterResources},
Expand Down Expand Up @@ -44,9 +46,6 @@ use crate::{
APP_NAME, OPERATOR_KEY,
};

#[cfg(doc)]
use stackable_operator::k8s_openapi::api::core::v1::Pod;

const OPERATOR_NAME: &str = "listeners.stackable.tech";
const CONTROLLER_NAME: &str = "listener";
pub const FULL_CONTROLLER_NAME: &str = concatcp!(CONTROLLER_NAME, '.', OPERATOR_NAME);
Expand Down

0 comments on commit 7f66b1d

Please sign in to comment.