Skip to content

Commit d27dd52

Browse files
committed
chore: Apply formatting
1 parent a756be7 commit d27dd52

File tree

5 files changed

+17
-20
lines changed

5 files changed

+17
-20
lines changed

rust/crd/src/affinity.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@ pub fn get_affinity(cluster_name: &str, role: &HiveRole) -> StackableAffinityFra
2121

2222
#[cfg(test)]
2323
mod tests {
24-
use super::*;
25-
26-
use rstest::rstest;
2724
use std::collections::BTreeMap;
2825

29-
use crate::HiveCluster;
26+
use rstest::rstest;
3027
use stackable_operator::{
3128
commons::affinity::StackableAffinity,
3229
k8s_openapi::{
@@ -35,6 +32,9 @@ mod tests {
3532
},
3633
};
3734

35+
use super::*;
36+
use crate::HiveCluster;
37+
3838
#[rstest]
3939
#[case(HiveRole::MetaStore)]
4040
fn test_affinity_defaults(#[case] role: HiveRole) {

rust/operator-binary/src/controller.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,16 @@ use stackable_operator::{
3737
commons::{
3838
product_image_selection::ResolvedProductImage,
3939
rbac::build_rbac_resources,
40-
s3::{S3AccessStyle, S3ConnectionSpec},
40+
s3::{S3AccessStyle, S3ConnectionSpec, S3Error},
4141
tls_verification::TlsClientDetailsError,
4242
},
4343
k8s_openapi::{
4444
api::{
4545
apps::v1::{StatefulSet, StatefulSetSpec},
4646
core::v1::{
47-
ConfigMap, ConfigMapVolumeSource, EmptyDirVolumeSource, Probe, Service,
48-
ServicePort, ServiceSpec, TCPSocketAction, Volume,
47+
ConfigMap, ConfigMapVolumeSource, EmptyDirVolumeSource, EnvVar, EnvVarSource,
48+
Probe, SecretKeySelector, Service, ServicePort, ServiceSpec, TCPSocketAction,
49+
Volume,
4950
},
5051
},
5152
apimachinery::pkg::{
@@ -80,10 +81,6 @@ use stackable_operator::{
8081
time::Duration,
8182
utils::{cluster_info::KubernetesClusterInfo, COMMON_BASH_TRAP_FUNCTIONS},
8283
};
83-
use stackable_operator::{
84-
commons::s3::S3Error,
85-
k8s_openapi::api::core::v1::{EnvVar, EnvVarSource, SecretKeySelector},
86-
};
8784
use strum::EnumDiscriminants;
8885
use tracing::warn;
8986

rust/operator-binary/src/discovery.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
use crate::controller::build_recommended_labels;
1+
use std::{collections::BTreeSet, num::TryFromIntError};
22

33
use snafu::{OptionExt, ResultExt, Snafu};
44
use stackable_hive_crd::{HiveCluster, HiveRole, ServiceType, HIVE_PORT, HIVE_PORT_NAME};
5-
use stackable_operator::commons::product_image_selection::ResolvedProductImage;
65
use stackable_operator::{
76
builder::{configmap::ConfigMapBuilder, meta::ObjectMetaBuilder},
8-
k8s_openapi::api::core::v1::ConfigMap,
9-
k8s_openapi::api::core::v1::{Endpoints, Service, ServiceSpec},
7+
commons::product_image_selection::ResolvedProductImage,
8+
k8s_openapi::api::core::v1::{ConfigMap, Endpoints, Service, ServiceSpec},
109
kube::{runtime::reflector::ObjectRef, Resource},
1110
};
12-
use std::collections::BTreeSet;
13-
use std::num::TryFromIntError;
11+
12+
use crate::controller::build_recommended_labels;
1413

1514
#[derive(Snafu, Debug)]
1615
pub enum Error {

rust/operator-binary/src/kerberos.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::collections::BTreeMap;
2+
13
use indoc::formatdoc;
24
use snafu::{ResultExt, Snafu};
35
use stackable_hive_crd::{HiveCluster, HiveRole, HIVE_SITE_XML, STACKABLE_CONFIG_DIR};
@@ -16,7 +18,6 @@ use stackable_operator::{
1618
kube::ResourceExt,
1719
utils::cluster_info::KubernetesClusterInfo,
1820
};
19-
use std::collections::BTreeMap;
2021

2122
#[derive(Snafu, Debug)]
2223
#[allow(clippy::enum_variant_names)] // all variants have the same prefix: `Add`

rust/operator-binary/src/product_logging.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use crate::controller::MAX_HIVE_LOG_FILES_SIZE;
2-
31
use snafu::{OptionExt, ResultExt, Snafu};
42
use stackable_hive_crd::{
53
Container, HiveCluster, HIVE_METASTORE_LOG4J2_PROPERTIES, STACKABLE_LOG_DIR,
@@ -17,6 +15,8 @@ use stackable_operator::{
1715
role_utils::RoleGroupRef,
1816
};
1917

18+
use crate::controller::MAX_HIVE_LOG_FILES_SIZE;
19+
2020
#[derive(Snafu, Debug)]
2121
pub enum Error {
2222
#[snafu(display("object has no namespace"))]

0 commit comments

Comments
 (0)