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

Update manifest repopath and temp resolve osd compiling issues on windows #5404

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions manifests/2.19.1/opensearch-2.19.1-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ components:
- with-security
- without-security
additional-cluster-configs:
node.attr.knn_cb_tier: integ
path.repo:
- /tmp
- 'C:\'
smoke-test:
test-spec: k-NN.yml
- name: ml-commons
Expand Down
2 changes: 2 additions & 0 deletions manifests/2.19.1/opensearch-2.19.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ components:
- windows
depends_on:
- common-utils
- job-scheduler
- opensearch-remote-metadata-sdk
- name: neural-search
repository: https://github.com/opensearch-project/neural-search.git
ref: tags/2.19.1.0
Expand Down
1 change: 1 addition & 0 deletions manifests/2.20.0/opensearch-2.20.0-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ components:
node.attr.knn_cb_tier: integ
path.repo:
- /tmp
- 'C:\'
- name: ml-commons
integ-test:
test-configs:
Expand Down
1 change: 1 addition & 0 deletions manifests/3.0.0-alpha1/opensearch-3.0.0-alpha1-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ components:
node.attr.knn_cb_tier: integ
path.repo:
- /tmp
- 'C:\'
smoke-test:
test-spec: k-NN.yml
- name: ml-commons
Expand Down
9 changes: 8 additions & 1 deletion src/build_workflow/builder_from_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,17 @@

class BuilderFromSource(Builder):
def checkout(self, work_dir: str) -> None:
# TODO: Reduce temp dir randomized dirname char counts or remove this after qualifier
# This is a temporary fix for OSD Core
# Due to path of node installation is longer than 200 chars and cause path not able to be removed
# https://github.com/opensearch-project/OpenSearch-Dashboards/issues/9397#issuecomment-2727641857
# Even 'osd' would not be enough for the proper cleanup so switch to 'o' for now
# https://github.com/opensearch-project/OpenSearch-Dashboards/issues/9397#issuecomment-2731257431
component_name = self.component.name if self.component.name != 'OpenSearch-Dashboards' else 'o'
self.git_repo = GitRepository(
self.component.repository,
self.component.ref,
os.path.join(work_dir, self.component.name),
os.path.join(work_dir, component_name),
self.component.working_directory,
)

Expand Down
2 changes: 1 addition & 1 deletion src/system/temporary_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class TemporaryDirectory:
def __init__(self, keep: bool = False, chdir: bool = False) -> None:
self.keep = keep
if current_platform() == "windows":
windows_home_dir = os.path.expanduser('~')
windows_home_dir = os.path.abspath("C:\\") # Reduce char counts on windows path
self.name = tempfile.mkdtemp(dir=windows_home_dir)
else:
self.name = tempfile.mkdtemp()
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_system/test_temporary_directory.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_path(self) -> None:
def test_path_windows(self) -> None:
with TemporaryDirectory() as work_dir:
if current_platform() == "windows":
windows_home_dir = os.path.expanduser('~')
windows_home_dir = os.path.abspath("C:\\")
self.assertTrue(str(work_dir.path).startswith(windows_home_dir))
else:
self.assertTrue(str(work_dir.path).startswith(tempfile.gettempdir()))