Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions dev/breeze/src/airflow_breeze/utils/run_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,13 +448,16 @@ def _run_compile_internally(

env = os.environ.copy()
if dev:
return run_command(
command_to_execute,
check=False,
no_output_dump_on_exception=True,
text=True,
env=env,
)
with open(UI_ASSET_OUT_DEV_MODE_FILE, "w") as output_file:
return run_command(
command_to_execute,
check=False,
no_output_dump_on_exception=True,
text=True,
env=env,
stderr=subprocess.STDOUT,
stdout=output_file,
)
compile_lock.parent.mkdir(parents=True, exist_ok=True)
compile_lock.unlink(missing_ok=True)
try:
Expand Down
8 changes: 6 additions & 2 deletions scripts/ci/prek/compile_ui_assets_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from __future__ import annotations

import os
import signal
import subprocess
import sys
from pathlib import Path
Expand Down Expand Up @@ -79,10 +80,9 @@
stderr=subprocess.STDOUT,
)

subprocess.run(
subprocess.Popen(
["pnpm", "dev"],
cwd=os.fspath(UI_DIRECTORY),
check=True,
env=env,
stdout=open(UI_ASSET_OUT_DEV_MODE_FILE, "a"),
stderr=subprocess.STDOUT,
Expand All @@ -104,3 +104,7 @@
stdout=open(SIMPLE_AUTH_MANAGER_UI_ASSET_OUT_DEV_MODE_FILE, "a"),
stderr=subprocess.STDOUT,
)

# Keep script alive so child processes stay in the same process group.
# When breeze exits, kill_process_group() will terminate all processes together.
signal.pause()