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
14 changes: 12 additions & 2 deletions scripts/in_container/bin/generate_mprocs_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,22 @@ def generate_mprocs_config() -> str:
use_airflow_version = get_env("USE_AIRFLOW_VERSION", "")
if not use_airflow_version.startswith("2."):
# API Server (Airflow 3.x+)
# Bind dual-stack (IPv6 + IPv4) so http://localhost:28080 works from browsers that
# resolve `localhost` to ::1 first (e.g. Chrome/Safari on macOS with OrbStack, which
# forwards both IPv4 and IPv6 host ports into the container). The default `0.0.0.0`
# binds IPv4 only, causing the IPv6 attempt to land inside the container with no
# listener and TCP RST → opaque chrome-error://chromewebdata/ page.
api_host_arg = "--host '::'"
if get_env_bool("BREEZE_DEBUG_APISERVER"):
port = get_env("BREEZE_DEBUG_APISERVER_PORT", "5679")
api_cmd = f"debugpy --listen 0.0.0.0:{port} --wait-for-client -m airflow api-server -d"
api_cmd = (
f"debugpy --listen 0.0.0.0:{port} --wait-for-client -m airflow api-server {api_host_arg} -d"
)
else:
dev_mode = get_env_bool("DEV_MODE")
api_cmd = "airflow api-server -d" if dev_mode else "airflow api-server"
api_cmd = (
f"airflow api-server {api_host_arg} -d" if dev_mode else f"airflow api-server {api_host_arg}"
)
procs["api_server"] = {"shell": api_cmd, "restart": "always", "scrollback": 100000}
else:
# Webserver (Airflow 2.x)
Expand Down
9 changes: 6 additions & 3 deletions scripts/in_container/bin/run_tmux
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,18 @@ fi
if [[ ! ${USE_AIRFLOW_VERSION=} =~ ^2\..* ]]; then
tmux split-window -h
tmux select-pane -t 2
# Bind dual-stack (IPv6 + IPv4) so http://localhost:28080 works from browsers that resolve
# `localhost` to ::1 first (e.g. Chrome/Safari on macOS with OrbStack, which forwards both
# IPv4 and IPv6 host ports into the container). The default `0.0.0.0` binds IPv4 only.
if [[ ${BREEZE_DEBUG_APISERVER} == "true" ]]; then
tmux set-option -p @airflow_component "API Server(Debug Mode)"
tmux send-keys "debugpy --listen 0.0.0.0:${BREEZE_DEBUG_APISERVER_PORT} --wait-for-client -m airflow api-server -d" C-m
tmux send-keys "debugpy --listen 0.0.0.0:${BREEZE_DEBUG_APISERVER_PORT} --wait-for-client -m airflow api-server --host '::' -d" C-m
else
tmux set-option -p @airflow_component "API Server"
if [[ ${DEV_MODE=} == "true" ]]; then
tmux send-keys 'airflow api-server -d' C-m
tmux send-keys "airflow api-server --host '::' -d" C-m
else
tmux send-keys 'airflow api-server' C-m
tmux send-keys "airflow api-server --host '::'" C-m
fi
fi
else
Expand Down
Loading