Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: env-overrides with tests #550

Merged
merged 9 commits into from
Aug 20, 2024
Merged

fix: env-overrides with tests #550

merged 9 commits into from
Aug 20, 2024

Conversation

adwk67
Copy link
Member

@adwk67 adwk67 commented Aug 16, 2024

Description

fix: implemented env-var merge and added tests

Tests:
AKS: 🟢
OKD: 🟢 (except Omid test, but a separate issue has been opened for that)

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

Preview Give feedback

Reviewer

Preview Give feedback

Acceptance

Preview Give feedback

@adwk67 adwk67 marked this pull request as ready for review August 19, 2024 14:16
@adwk67 adwk67 self-assigned this Aug 19, 2024
@adwk67 adwk67 changed the title fix: implemented env-var merge and added tests fix: env-overrides with tests Aug 19, 2024
@razvan razvan self-requested a review August 19, 2024 15:10
razvan
razvan previously approved these changes Aug 19, 2024
Copy link
Member

@razvan razvan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -655,4 +671,134 @@ impl HbaseCluster {
tracing::debug!("Merged config: {:?}", conf_rolegroup);
fragment::validate(conf_rolegroup).context(FragmentValidationFailureSnafu)
}

pub fn merged_env(&self, rolegroup_config: Option<&BTreeMap<String, String>>) -> Vec<EnvVar> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about renaming it and making it a stand alone function ? For example:

pub fn make_env (env_map: Option<&BTreeMap<String, String>>) -> Vec<EnvVar>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! Changed here: 0545c9c

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have also renamed it to make_env or something else more general since it knows nothing about merged configuration.

@razvan
Copy link
Member

razvan commented Aug 19, 2024

why is the "definition of done" duplicated ? :)

@adwk67 adwk67 added this pull request to the merge queue Aug 20, 2024
Merged via the queue into main with commit dc480ca Aug 20, 2024
31 checks passed
@adwk67 adwk67 deleted the fix/consistent-overrides branch August 20, 2024 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants