Skip to content

Commit

Permalink
fix: incorrect filesystem paths to files fetched from S3 by userdata (#…
Browse files Browse the repository at this point in the history
…164)

Signed-off-by: Josh Usiskin <[email protected]>
  • Loading branch information
jusiskin authored Nov 20, 2024
1 parent a52eca3 commit 5a6c0ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/deadline_test_fixtures/deadline/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def configure_worker_common(self, *, config: DeadlineWorkerConfiguration) -> str
This cannot assume that the agent user exists.
"""

cmds = []
cmds = ["$ErrorActionPreference = 'Stop'"]

if config.service_model_path:
cmds.append(
Expand Down
7 changes: 5 additions & 2 deletions src/deadline_test_fixtures/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,8 @@ def worker_config(
dest_path = posixpath.join("/tmp", os.path.basename(resolved_whl_path))
else:
dest_path = posixpath.join(
"$env:USERPROFILE\\AppData\\Local\\Temp", os.path.basename(resolved_whl_path)
"C:\\Windows\\System32\\Config\\systemprofile\\AppData\\Local\\Temp",
os.path.basename(resolved_whl_path),
)
file_mappings = [(resolved_whl_path, dest_path)]

Expand All @@ -472,7 +473,9 @@ def worker_config(
if operating_system.name == "AL2023":
dst_path = posixpath.join("/tmp", src_path.name)
else:
dst_path = posixpath.join("$env:USERPROFILE\\AppData\\Local\\Temp", src_path.name)
dst_path = posixpath.join(
"C:\\Windows\\System32\\Config\\systemprofile\\AppData\\Local\\Temp", src_path.name
)
LOG.info(f"The service model will be copied to {dst_path} on the Worker environment")
file_mappings.append((str(src_path), dst_path))

Expand Down

0 comments on commit 5a6c0ee

Please sign in to comment.