-
Notifications
You must be signed in to change notification settings - Fork 107
Description
Problem
AirflowCommand() in docker/docker.go hardcodes the -it flags:
cmd := exec.Command(containerRuntime, "exec", "-it", id, "bash", "-c", airflowCommand)This causes astro dev start to fail when applying airflow_settings.yaml (pools, connections, variables) from any non-interactive environment:
the input device is not a TTY
Affected environments
- CI/CD pipelines
- IDE embedded terminals (e.g. Cursor, VS Code tasks)
- Scripts run via
nohup,cron, or process managers - Any shell session where stdin is not a terminal (e.g. piped input)
Affected commands
Any operation that goes through settings.AddPools(), settings.AddConnections(), or settings.AddVariables() during astro dev start, as well as astro dev object import.
Expected behavior
astro dev start should successfully apply airflow_settings.yaml regardless of whether the calling shell has a TTY attached.
Suggested fix
Detect whether stdin is a terminal and only pass -it when appropriate, or remove -t entirely since the airflow CLI commands being executed don't require an interactive terminal:
// Option A: detect TTY
args := []string{"exec", "-i"}
if term.IsTerminal(int(os.Stdin.Fd())) {
args = append(args, "-t")
}
args = append(args, id, "bash", "-c", airflowCommand)
cmd := exec.Command(containerRuntime, args...)// Option B: just drop -t (simplest, airflow CLI commands don't need it)
cmd := exec.Command(containerRuntime, "exec", "-i", id, "bash", "-c", airflowCommand)Workaround
Set pools: [] (and/or empty connections/variables) in airflow_settings.yaml to skip the docker exec calls during startup, then configure pools via the Airflow REST API after the webserver is healthy.
Environment
- Astro CLI: 1.38.1 (also confirmed on
mainbranch / 1.39.0) - OS: macOS (darwin arm64)
- Container runtime: Docker Desktop