Skip to content

Commit 10055e8

Browse files
Update manifest repopath and temp resolve osd compiling issues on windows (#5404)
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
1 parent b45310d commit 10055e8

7 files changed

+16
-3
lines changed

manifests/2.19.1/opensearch-2.19.1-test.yml

+2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ components:
8080
- with-security
8181
- without-security
8282
additional-cluster-configs:
83+
node.attr.knn_cb_tier: integ
8384
path.repo:
8485
- /tmp
86+
- 'C:\'
8587
smoke-test:
8688
test-spec: k-NN.yml
8789
- name: ml-commons

manifests/2.19.1/opensearch-2.19.1.yml

+2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ components:
7171
- windows
7272
depends_on:
7373
- common-utils
74+
- job-scheduler
75+
- opensearch-remote-metadata-sdk
7476
- name: neural-search
7577
repository: https://github.com/opensearch-project/neural-search.git
7678
ref: tags/2.19.1.0

manifests/2.20.0/opensearch-2.20.0-test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ components:
8181
node.attr.knn_cb_tier: integ
8282
path.repo:
8383
- /tmp
84+
- 'C:\'
8485
- name: ml-commons
8586
integ-test:
8687
test-configs:

manifests/3.0.0-alpha1/opensearch-3.0.0-alpha1-test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ components:
8787
node.attr.knn_cb_tier: integ
8888
path.repo:
8989
- /tmp
90+
- 'C:\'
9091
smoke-test:
9192
test-spec: k-NN.yml
9293
- name: ml-commons

src/build_workflow/builder_from_source.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,17 @@
2121

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

src/system/temporary_directory.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class TemporaryDirectory:
4141
def __init__(self, keep: bool = False, chdir: bool = False) -> None:
4242
self.keep = keep
4343
if current_platform() == "windows":
44-
windows_home_dir = os.path.expanduser('~')
44+
windows_home_dir = os.path.abspath("C:\\") # Reduce char counts on windows path
4545
self.name = tempfile.mkdtemp(dir=windows_home_dir)
4646
else:
4747
self.name = tempfile.mkdtemp()

tests/tests_system/test_temporary_directory.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_path(self) -> None:
5757
def test_path_windows(self) -> None:
5858
with TemporaryDirectory() as work_dir:
5959
if current_platform() == "windows":
60-
windows_home_dir = os.path.expanduser('~')
60+
windows_home_dir = os.path.abspath("C:\\")
6161
self.assertTrue(str(work_dir.path).startswith(windows_home_dir))
6262
else:
6363
self.assertTrue(str(work_dir.path).startswith(tempfile.gettempdir()))

0 commit comments

Comments
 (0)