This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 9e28fcbfe8b Small fix to asset compilation retry (#45144)
9e28fcbfe8b is described below
commit 9e28fcbfe8b497487c1706054d3c94b03f06b453
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sun Dec 22 11:27:57 2024 +0100
Small fix to asset compilation retry (#45144)
Try num printed is now more human, and capture_output is added - it
was missing in the original #45143
---
scripts/ci/pre_commit/compile_ui_assets.py | 3 ++-
scripts/ci/pre_commit/compile_www_assets.py | 8 ++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/scripts/ci/pre_commit/compile_ui_assets.py
b/scripts/ci/pre_commit/compile_ui_assets.py
index 158bde1468e..cd63b7a5676 100755
--- a/scripts/ci/pre_commit/compile_ui_assets.py
+++ b/scripts/ci/pre_commit/compile_ui_assets.py
@@ -71,12 +71,13 @@ if __name__ == "__main__":
env = os.environ.copy()
env["FORCE_COLOR"] = "true"
for try_num in range(3):
- print(f"### Trying to install yarn dependencies: attempt: {try_num}
###")
+ print(f"### Trying to install yarn dependencies: attempt: {try_num +
1} ###")
result = subprocess.run(
["pnpm", "install", "--frozen-lockfile",
"--config.confirmModulesPurge=false"],
cwd=os.fspath(ui_directory),
text=True,
check=False,
+ capture_output=True,
)
if result.returncode == 0:
break
diff --git a/scripts/ci/pre_commit/compile_www_assets.py
b/scripts/ci/pre_commit/compile_www_assets.py
index bf4d9622412..8e6a845eae0 100755
--- a/scripts/ci/pre_commit/compile_www_assets.py
+++ b/scripts/ci/pre_commit/compile_www_assets.py
@@ -71,9 +71,13 @@ if __name__ == "__main__":
env = os.environ.copy()
env["FORCE_COLOR"] = "true"
for try_num in range(3):
- print(f"### Trying to install yarn dependencies: attempt: {try_num}
###")
+ print(f"### Trying to install yarn dependencies: attempt: {try_num +
1} ###")
result = subprocess.run(
- ["yarn", "install", "--frozen-lockfile"],
cwd=os.fspath(www_directory), text=True, check=False
+ ["yarn", "install", "--frozen-lockfile"],
+ cwd=os.fspath(www_directory),
+ text=True,
+ check=False,
+ capture_output=True,
)
if result.returncode == 0:
break