This is an automated email from the ASF dual-hosted git repository.
gopidesu pushed a commit to branch fix-nospace
in repository https://gitbox.apache.org/repos/asf/airflow-site-archive.git
The following commit(s) were added to refs/heads/fix-nospace by this push:
new f64ad3b194 Update workflow to use mount dir
f64ad3b194 is described below
commit f64ad3b194ec28419a430bc76fed1c6a3c3e7516
Author: Pavan Kumar <[email protected]>
AuthorDate: Fri May 2 08:48:11 2025 +0100
Update workflow to use mount dir
---
scripts/transfer_utils.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/scripts/transfer_utils.py b/scripts/transfer_utils.py
index 0566e2dffc..7ee8ee70c6 100644
--- a/scripts/transfer_utils.py
+++ b/scripts/transfer_utils.py
@@ -2,6 +2,7 @@ import subprocess
import sys
from functools import cached_property
from multiprocessing import Pool
+from pathlib import Path
import boto3
import urllib3
@@ -65,9 +66,13 @@ class CommonTransferUtils:
console.print(f"[blue] Syncing {source} to {destination} [/]")
- subprocess.run(
- ["aws", "s3", "sync", "--delete", source, destination],
capture_output=True, text=True, check=True
- )
+ if Path(source).is_dir():
+ subprocess.run(
+ ["aws", "s3", "sync", "--delete", source, destination],
capture_output=True, text=True, check=True
+ )
+ else:
+ self.copy(source, destination)
+
console.print(f"[blue] Sync completed for {source} to {destination}
[/]")
@staticmethod