Skip to content

Commit

Permalink
fix(job_attachments): fix output syncing when using identically named…
Browse files Browse the repository at this point in the history
… local File System Locations across different OS (#295)

Signed-off-by: Gahyun Suh <132245153+gahyusuh@users.noreply.github.com>
  • Loading branch information
gahyusuh committed Apr 11, 2024
1 parent 70958f5 commit 7fcf845
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/deadline/job_attachments/asset_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ def sync_outputs(
storage_profiles_source_paths = list(storage_profiles_path_mapping_rules.keys())

for manifest_properties in attachments.manifests:
session_root = session_dir
local_root: Path = Path()
if (
len(storage_profiles_path_mapping_rules) > 0
Expand All @@ -571,6 +572,10 @@ def sync_outputs(
local_root = Path(
storage_profiles_path_mapping_rules[manifest_properties.rootPath]
)
# We use session_root to filter out any files resolved to a location outside
# of that directory. If storage profile's path mapping rules are available,
# we can consider the session_root to be the mapped-storage profile path.
session_root = local_root
else:
raise AssetSyncError(
"Error occurred while attempting to sync output files: "
Expand All @@ -584,7 +589,7 @@ def sync_outputs(
manifest_properties,
s3_settings,
local_root,
session_dir,
session_root,
)
if output_files:
output_manifest = self._generate_output_manifest(output_files)
Expand Down

0 comments on commit 7fcf845

Please sign in to comment.