Skip to content

Commit

Permalink
chore: Apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Techassi committed Feb 4, 2025
1 parent a756be7 commit d27dd52
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
8 changes: 4 additions & 4 deletions rust/crd/src/affinity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ pub fn get_affinity(cluster_name: &str, role: &HiveRole) -> StackableAffinityFra

#[cfg(test)]
mod tests {
use super::*;

use rstest::rstest;
use std::collections::BTreeMap;

use crate::HiveCluster;
use rstest::rstest;
use stackable_operator::{
commons::affinity::StackableAffinity,
k8s_openapi::{
Expand All @@ -35,6 +32,9 @@ mod tests {
},
};

use super::*;
use crate::HiveCluster;

#[rstest]
#[case(HiveRole::MetaStore)]
fn test_affinity_defaults(#[case] role: HiveRole) {
Expand Down
11 changes: 4 additions & 7 deletions rust/operator-binary/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,16 @@ use stackable_operator::{
commons::{
product_image_selection::ResolvedProductImage,
rbac::build_rbac_resources,
s3::{S3AccessStyle, S3ConnectionSpec},
s3::{S3AccessStyle, S3ConnectionSpec, S3Error},
tls_verification::TlsClientDetailsError,
},
k8s_openapi::{
api::{
apps::v1::{StatefulSet, StatefulSetSpec},
core::v1::{
ConfigMap, ConfigMapVolumeSource, EmptyDirVolumeSource, Probe, Service,
ServicePort, ServiceSpec, TCPSocketAction, Volume,
ConfigMap, ConfigMapVolumeSource, EmptyDirVolumeSource, EnvVar, EnvVarSource,
Probe, SecretKeySelector, Service, ServicePort, ServiceSpec, TCPSocketAction,
Volume,
},
},
apimachinery::pkg::{
Expand Down Expand Up @@ -80,10 +81,6 @@ use stackable_operator::{
time::Duration,
utils::{cluster_info::KubernetesClusterInfo, COMMON_BASH_TRAP_FUNCTIONS},
};
use stackable_operator::{
commons::s3::S3Error,
k8s_openapi::api::core::v1::{EnvVar, EnvVarSource, SecretKeySelector},
};
use strum::EnumDiscriminants;
use tracing::warn;

Expand Down
11 changes: 5 additions & 6 deletions rust/operator-binary/src/discovery.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
use crate::controller::build_recommended_labels;
use std::{collections::BTreeSet, num::TryFromIntError};

use snafu::{OptionExt, ResultExt, Snafu};
use stackable_hive_crd::{HiveCluster, HiveRole, ServiceType, HIVE_PORT, HIVE_PORT_NAME};
use stackable_operator::commons::product_image_selection::ResolvedProductImage;
use stackable_operator::{
builder::{configmap::ConfigMapBuilder, meta::ObjectMetaBuilder},
k8s_openapi::api::core::v1::ConfigMap,
k8s_openapi::api::core::v1::{Endpoints, Service, ServiceSpec},
commons::product_image_selection::ResolvedProductImage,
k8s_openapi::api::core::v1::{ConfigMap, Endpoints, Service, ServiceSpec},
kube::{runtime::reflector::ObjectRef, Resource},
};
use std::collections::BTreeSet;
use std::num::TryFromIntError;

use crate::controller::build_recommended_labels;

#[derive(Snafu, Debug)]
pub enum Error {
Expand Down
3 changes: 2 additions & 1 deletion rust/operator-binary/src/kerberos.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::collections::BTreeMap;

use indoc::formatdoc;
use snafu::{ResultExt, Snafu};
use stackable_hive_crd::{HiveCluster, HiveRole, HIVE_SITE_XML, STACKABLE_CONFIG_DIR};
Expand All @@ -16,7 +18,6 @@ use stackable_operator::{
kube::ResourceExt,
utils::cluster_info::KubernetesClusterInfo,
};
use std::collections::BTreeMap;

#[derive(Snafu, Debug)]
#[allow(clippy::enum_variant_names)] // all variants have the same prefix: `Add`
Expand Down
4 changes: 2 additions & 2 deletions rust/operator-binary/src/product_logging.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use crate::controller::MAX_HIVE_LOG_FILES_SIZE;

use snafu::{OptionExt, ResultExt, Snafu};
use stackable_hive_crd::{
Container, HiveCluster, HIVE_METASTORE_LOG4J2_PROPERTIES, STACKABLE_LOG_DIR,
Expand All @@ -17,6 +15,8 @@ use stackable_operator::{
role_utils::RoleGroupRef,
};

use crate::controller::MAX_HIVE_LOG_FILES_SIZE;

#[derive(Snafu, Debug)]
pub enum Error {
#[snafu(display("object has no namespace"))]
Expand Down

0 comments on commit d27dd52

Please sign in to comment.