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

Initial empty dictionary for None additional cluster configs in OSD IntegTest #3593

Conversation

peterzhuamazon
Copy link
Member

Description

Initial empty dictionary for None additional cluster configs

Issues Resolved

#3589 partially
#3434

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
@peterzhuamazon peterzhuamazon self-assigned this Jun 2, 2023
@peterzhuamazon peterzhuamazon mentioned this pull request Jun 2, 2023
42 tasks
@peterzhuamazon peterzhuamazon changed the title Initial empty dictionary for None additional cluster configs Initial empty dictionary for None additional cluster configs in OSD IntegTest Jun 2, 2023
@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Merging #3593 (81804c8) into main (aceb8b4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #3593   +/-   ##
=======================================
  Coverage   91.49%   91.49%           
=======================================
  Files         181      181           
  Lines        5374     5376    +2     
=======================================
+ Hits         4917     4919    +2     
  Misses        457      457           
Impacted Files Coverage Δ
...teg_test/integ_test_suite_opensearch_dashboards.py 95.58% <100.00%> (+0.13%) ⬆️

@peterzhuamazon peterzhuamazon merged commit b2e8af3 into opensearch-project:main Jun 2, 2023
@peterzhuamazon peterzhuamazon deleted the osd_integtest_additional_configs2 branch June 2, 2023 00:35
@@ -84,6 +84,9 @@ def __setup_cluster_and_execute_test_config(self, config: str) -> int:
self.additional_cluster_config = self.test_config.integ_test.get("additional-cluster-configs")
logging.info(f"Additional config found: {self.additional_cluster_config}")

if self.additional_cluster_config is None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

how about just initialize self.additional_cluster_config as empty directory and check the len or keys() method to check if it has any values? @peterzhuamazon

Copy link
Member Author

Choose a reason for hiding this comment

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

That can be done but right now I am just matching the OS side implementation.
We can improve this in later PRs.

Copy link
Member

@dblock dblock Jun 7, 2023

Choose a reason for hiding this comment

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

I'm late to this game, but assigning of a default should happen in the constructor, not inside the path of execution because it becomes a surprising side-effect of the latter.

Otherwise do self.additional_cluster_config or {} anywhere it's used.

@peterzhuamazon
Copy link
Member Author

This is also to follow up #3590.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

4 participants