Skip to content

Commit

Permalink
fix: flow file name depends on the nifi version
Browse files Browse the repository at this point in the history
  • Loading branch information
razvan committed Sep 17, 2024
1 parent 7e8528a commit 805d48b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rust/operator-binary/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,18 @@ pub fn build_nifi_properties(
proxy_hosts: &str,
auth_config: &NifiAuthenticationConfig,
overrides: BTreeMap<String, String>,
product_version: &str,
) -> Result<String, Error> {
let mut properties = BTreeMap::new();
// Core Properties
let flow_file_name = if product_version.starts_with("2") {
"flow.json.gz"
} else {
"flow.xml.gz"
};
properties.insert(
"nifi.flow.configuration.file".to_string(),
NifiRepository::Database.mount_path() + "/flow.json.gz",
NifiRepository::Database.mount_path() + "/" + flow_file_name,
);
properties.insert(
"nifi.flow.configuration.archive.enabled".to_string(),
Expand Down
1 change: 1 addition & 0 deletions rust/operator-binary/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ async fn build_node_rolegroup_config_map(
kind: NIFI_PROPERTIES.to_string(),
})?
.clone(),
resolved_product_image.product_version.as_ref(),
)
.with_context(|_| BuildProductConfigSnafu {
rolegroup: rolegroup.clone(),
Expand Down

0 comments on commit 805d48b

Please sign in to comment.