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

Add uninstall function for tar integTest between plugins #2020

Conversation

peterzhuamazon
Copy link
Member

Signed-off-by: Peter Zhu [email protected]

Description

Add uninstall function for tar integTest between plugins.

Now the cluster is green not yellow between each plugin type run.

2022-04-21 22:42:48 INFO     200: {"cluster_name":"opensearch","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"discovered_master":true,"discovered_cluster_manager":true,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0,"delayed_unassigned_shards":0,"number_of_pending_tasks":0,"number_of_in_flight_fetch":0,"task_max_waiting_in_queue_millis":0,"active_shards_percent_as_number":100.0}

2022-04-21 22:43:33 INFO     200: {"cluster_name":"opensearch","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"discovered_master":true,"discovered_cluster_manager":true,"active_primary_shards":1,"active_shards":1,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0,"delayed_unassigned_shards":0,"number_of_pending_tasks":0,"number_of_in_flight_fetch":0,"task_max_waiting_in_queue_millis":0,"active_shards_percent_as_number":100.0}

Issues Resolved

#2018

Check List

  • Commits are signed per the DCO using --signoff

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.

@peterzhuamazon peterzhuamazon added bug Something isn't working integtest cicd labels Apr 21, 2022
@peterzhuamazon peterzhuamazon self-assigned this Apr 21, 2022
@peterzhuamazon peterzhuamazon requested a review from a team as a code owner April 21, 2022 23:26
Signed-off-by: Peter Zhu <[email protected]>
@peterzhuamazon peterzhuamazon merged commit 464b769 into opensearch-project:main Apr 21, 2022
@peterzhuamazon peterzhuamazon deleted the opensearch-tar-integtest-uninstall branch April 21, 2022 23:51
def uninstall(self) -> None:
"""
Allow distribution that is not 'tar' to do proper cleanup
Allow distribution to do proper cleanup
Copy link
Member

Choose a reason for hiding this comment

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

To cleanup. Proper is unnecessary filler.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will change later.


def uninstall(self) -> None:
logging.info(f"Cleanup {self.work_dir}/* content after the test")
subprocess.check_call(f"rm -rf {self.work_dir}/*", shell=True)
Copy link
Member

Choose a reason for hiding this comment

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

It always worries me to have “rm -rf”, and it won’t work for windows, is there a python method?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is ways to cleanup a folder, but not contents within the folder, unless you list all the files and loop deletion.
Will try researching.

@peterzhuamazon peterzhuamazon linked an issue Apr 22, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cicd integtest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Add uninstall for tar integTest between each plugin run
3 participants