stackabletech / nifi-operator

A kubernetes operator for Apache NiFi
Other
28 stars 3 forks source link

chore: bump operator rs 0.67 #614

Closed fhennig closed 3 months ago

fhennig commented 3 months ago

Description

Please add a description here. This will become the commit message of the merge request later.

Definition of Done Checklist

# Author
- [x] Changes are OpenShift compatible
- [ ] Helm chart can be installed and deployed operator works
- [ ] Integration tests passed (for non trivial changes)
# Reviewer
- [ ] Code contains useful comments
- [ ] Code contains useful logging statements
- [ ] (Integration-)Test cases added
- [ ] Documentation added or updated. Follows the [style guide](https://docs.stackable.tech/home/nightly/contributor/docs-style-guide).
- [ ] Changelog updated
- [ ] Cargo.toml only contains references to git tags (not specific commits or branches)
# Acceptance
- [ ] Feature Tracker has been updated
- [ ] Proper release label has been added
- [ ] [Roadmap](https://github.com/orgs/stackabletech/projects/25/views/1) has been updated
sbernauer commented 3 months ago

When you open up the files in your IDE they show up as yellow, I would be very happy if we would put the big variants behind a Box (also should improve the performance) I don't want to dictate the effort on you, I already have a patch below (it also fixes a typo) :)

diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs
index 808d69a..de1f580 100644
--- a/rust/operator-binary/src/controller.rs
+++ b/rust/operator-binary/src/controller.rs
@@ -182,8 +182,11 @@ pub enum Error {
         source: stackable_operator::builder::meta::Error,
     },

-    #[snafu(display("Failed to load Product Config"))]
-    ProductConfigLoadFailed { source: config::Error },
+    #[snafu(display("Failed to load Product config"))]
+    ProductConfigLoadFailed {
+        #[snafu(source(from(config::Error, Box::new)))]
+        source: Box<config::Error>,
+    },

     #[snafu(display("Failed to find information about file [{}] in product config", kind))]
     ProductConfigKindNotSpecified { kind: String },
@@ -207,11 +210,15 @@ pub enum Error {
     NoRoleServiceFqdn,

     #[snafu(display("Bootstrap configuration error"))]
-    BoostrapConfig { source: crate::config::Error },
+    BootstrapConfig {
+        #[snafu(source(from(config::Error, Box::new)))]
+        source: Box<config::Error>,
+    },

     #[snafu(display("failed to prepare NiFi configuration for rolegroup {rolegroup}"))]
     BuildProductConfig {
-        source: crate::config::Error,
+        #[snafu(source(from(config::Error, Box::new)))]
+        source: Box<config::Error>,
         rolegroup: RoleGroupRef<NifiCluster>,
     },

@@ -731,7 +738,7 @@ async fn build_node_rolegroup_config_map(
                     })?
                     .clone(),
             )
-            .context(BoostrapConfigSnafu)?,
+            .context(BootstrapConfigSnafu)?,
         )
         .add_data(
             NIFI_PROPERTIES,