Skip to content

Commit b50f462

Browse files
chore: Update templated files (9001281) (#330)
* 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 dcb3e9f commit b50f462

File tree

4 files changed

+43
-34
lines changed

4 files changed

+43
-34
lines changed

.github/workflows/pr_pre-commit.yaml

Lines changed: 1 addition & 1 deletion
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

Lines changed: 7 additions & 4 deletions
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/main.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
mod restart_controller;
22

33
use built_info::PKG_VERSION;
4-
use futures::pin_mut;
5-
use stackable_operator::cli::{Command, ProductOperatorRun};
6-
74
use clap::{crate_description, crate_version, Parser};
8-
use stackable_operator::commons::{
9-
authentication::AuthenticationClass,
10-
s3::{S3Bucket, S3Connection},
5+
use futures::pin_mut;
6+
use stackable_operator::{
7+
cli::{Command, ProductOperatorRun},
8+
commons::{
9+
authentication::AuthenticationClass,
10+
s3::{S3Bucket, S3Connection},
11+
},
12+
CustomResourceExt,
1113
};
12-
use stackable_operator::CustomResourceExt;
1314

1415
mod built_info {
1516
include!(concat!(env!("OUT_DIR"), "/built.rs"));

rust/operator-binary/src/restart_controller/statefulset.rs

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
1-
use std::collections::BTreeMap;
2-
use std::sync::atomic::AtomicBool;
3-
use std::sync::Arc;
4-
use std::time::Duration;
1+
use std::{
2+
collections::BTreeMap,
3+
sync::{atomic::AtomicBool, Arc},
4+
time::Duration,
5+
};
56

67
use futures::{stream, Stream, StreamExt, TryStream};
78
use serde_json::json;
89
use snafu::{ResultExt, Snafu};
9-
use stackable_operator::client::Client;
10-
use stackable_operator::k8s_openapi::api::apps::v1::StatefulSet;
11-
use stackable_operator::k8s_openapi::api::core::v1::{
12-
ConfigMap, EnvFromSource, EnvVar, PodSpec, Secret, Volume,
13-
};
14-
use stackable_operator::kube;
15-
use stackable_operator::kube::api::{PartialObjectMeta, Patch, PatchParams};
16-
use stackable_operator::kube::core::{error_boundary, DeserializeGuard, DynamicObject};
17-
use stackable_operator::kube::runtime::controller::{
18-
trigger_self, trigger_with, Action, ReconcileRequest,
19-
};
20-
use stackable_operator::kube::runtime::events::{Recorder, Reporter};
21-
use stackable_operator::kube::runtime::reflector::{ObjectRef, Store};
22-
use stackable_operator::kube::runtime::{
23-
applier, metadata_watcher, reflector, watcher, Config, WatchStreamExt,
10+
use stackable_operator::{
11+
client::Client,
12+
k8s_openapi::api::{
13+
apps::v1::StatefulSet,
14+
core::v1::{ConfigMap, EnvFromSource, EnvVar, PodSpec, Secret, Volume},
15+
},
16+
kube,
17+
kube::{
18+
api::{PartialObjectMeta, Patch, PatchParams},
19+
core::{error_boundary, DeserializeGuard, DynamicObject},
20+
runtime::{
21+
applier,
22+
controller::{trigger_self, trigger_with, Action, ReconcileRequest},
23+
events::{Recorder, Reporter},
24+
metadata_watcher, reflector,
25+
reflector::{ObjectRef, Store},
26+
watcher, Config, WatchStreamExt,
27+
},
28+
Resource, ResourceExt,
29+
},
30+
logging::controller::{report_controller_reconciled, ReconcilerError},
31+
namespace::WatchNamespace,
2432
};
25-
use stackable_operator::kube::{Resource, ResourceExt};
26-
use stackable_operator::logging::controller::{report_controller_reconciled, ReconcilerError};
27-
use stackable_operator::namespace::WatchNamespace;
2833
use strum::{EnumDiscriminants, IntoStaticStr};
2934

3035
const FULL_CONTROLLER_NAME: &str = "statefulset.restarter.commons.stackable.tech";

0 commit comments

Comments
 (0)