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 the path join for running integ test #3041

Merged
merged 2 commits into from
Jan 5, 2023

Conversation

zelinh
Copy link
Member

@zelinh zelinh commented Jan 4, 2023

Signed-off-by: Zelin Hao zelinhao@amazon.com

Description

Fix the path by using os.path.join instead of hard connected. This would resolve the issue when there is a need to install dependency plugin for running tests.
The origin error for the issue on installing maven artifacts was resolved earlier in this PR. #2892

Issues Resolved

#969

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: Zelin Hao <zelinhao@amazon.com>
@zelinh zelinh requested a review from a team as a code owner January 4, 2023 01:50
@zelinh zelinh self-assigned this Jan 4, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2023

Codecov Report

Merging #3041 (4a6aa32) into main (f0efaa4) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #3041   +/-   ##
=======================================
  Coverage   93.17%   93.17%           
=======================================
  Files         167      167           
  Lines        4602     4602           
=======================================
  Hits         4288     4288           
  Misses        314      314           
Impacted Files Coverage Δ
...c/test_workflow/dependency_installer_opensearch.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@@ -37,6 +37,6 @@ def install_build_dependencies(self, dependency_dict: dict, dest: str) -> None:
"""
os.makedirs(dest, exist_ok=True)
for dependency, version in dependency_dict.items():
path = f"{self.root_url}/builds/opensearch/plugins/{dependency}-{version}.zip"
path = os.path.join(self.root_url, f"builds/opensearch/plugins/{dependency}-{version}.zip")
Copy link
Member

@dblock dblock Jan 4, 2023

Choose a reason for hiding this comment

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

I think you want to make this Windows compatible too here, I believe os.path.join(self.root_url, 'builds', 'opensearch', ...) should work.

NM, it's a URL, maybe it should not be called path :)

@dblock
Copy link
Member

dblock commented Jan 4, 2023

Add a unit test?

Signed-off-by: Zelin Hao <zelinhao@amazon.com>
@zelinh
Copy link
Member Author

zelinh commented Jan 4, 2023

Add a unit test?

Yes, I just added another unit test for this situation when the URL has ending backslash.

@dblock dblock merged commit f6d5874 into opensearch-project:main Jan 5, 2023
@zelinh zelinh deleted the fix-test-path branch January 5, 2023 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants