Skip to content

Commit 7262d89

Browse files
committed
remove unused error variants
1 parent bf88cc1 commit 7262d89

2 files changed

Lines changed: 1 addition & 31 deletions

File tree

rust/operator-binary/src/controller.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ use stackable_operator::{
3333
client::Client,
3434
cluster_resources::{ClusterResourceApplyStrategy, ClusterResources},
3535
commons::{product_image_selection::ResolvedProductImage, rbac::build_rbac_resources},
36-
config::fragment,
3736
crd::{
3837
authentication::oidc::v1alpha1::AuthenticationProvider,
3938
git_sync,
@@ -54,7 +53,7 @@ use stackable_operator::{
5453
kube::{
5554
Resource, ResourceExt,
5655
core::{DeserializeGuard, error_boundary},
57-
runtime::{controller::Action, reflector::ObjectRef},
56+
runtime::controller::Action,
5857
},
5958
kvp::{Label, Labels, ObjectLabels},
6059
logging::controller::ReconcilerError,
@@ -153,11 +152,6 @@ pub enum Error {
153152
source: stackable_operator::cluster_resources::Error,
154153
},
155154

156-
#[snafu(display("failed to apply global Service"))]
157-
ApplyRoleService {
158-
source: stackable_operator::cluster_resources::Error,
159-
},
160-
161155
#[snafu(display("failed to fetch deployed StatefulSets"))]
162156
FetchStatefulsets {
163157
source: stackable_operator::client::Error,
@@ -219,15 +213,6 @@ pub enum Error {
219213
#[snafu(display("Failed to find information about file [{}] in product config", kind))]
220214
ProductConfigKindNotSpecified { kind: String },
221215

222-
#[snafu(display("Failed to find service {obj_ref}"))]
223-
MissingService {
224-
source: stackable_operator::client::Error,
225-
obj_ref: ObjectRef<Service>,
226-
},
227-
228-
#[snafu(display("Could not build role service fqdn"))]
229-
NoRoleServiceFqdn,
230-
231216
#[snafu(display("Bootstrap configuration error"))]
232217
BootstrapConfig {
233218
#[snafu(source(from(config::Error, Box::new)))]
@@ -247,12 +232,6 @@ pub enum Error {
247232
container_name: String,
248233
},
249234

250-
#[snafu(display("failed to validate resources for {rolegroup}"))]
251-
ResourceValidation {
252-
source: fragment::ValidationError,
253-
rolegroup: RoleGroupRef<v1alpha1::NifiCluster>,
254-
},
255-
256235
#[snafu(display("failed to resolve and merge config for role and role group"))]
257236
FailedToResolveConfig { source: crate::crd::Error },
258237

rust/operator-binary/src/crd/mod.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,11 @@ const DEFAULT_NODE_GRACEFUL_SHUTDOWN_TIMEOUT: Duration = Duration::from_minutes_
6868

6969
#[derive(Snafu, Debug)]
7070
pub enum Error {
71-
#[snafu(display("object has no namespace associated"))]
72-
NoNamespace,
73-
7471
#[snafu(display("the NiFi role [{role}] is missing from spec"))]
7572
MissingNifiRole { role: String },
7673

77-
#[snafu(display("the NiFi node role group [{role_group}] is missing from spec"))]
78-
MissingNifiRoleGroup { role_group: String },
79-
8074
#[snafu(display("fragment validation failure"))]
8175
FragmentValidationFailure { source: ValidationError },
82-
83-
#[snafu(display("object has no nodes defined"))]
84-
NoNodesDefined,
8576
}
8677

8778
#[versioned(version(name = "v1alpha1"))]

0 commit comments

Comments
 (0)