The GitHub Actions job "Tests (AMD)" on 
airflow.git/cli-logs-to-stderr-for-structured-output has succeeded.
Run started by GitHub user dheerajturaga (triggered by dheerajturaga).

Head commit for run:
89f3c6282cf50ddf4477fd30833d2f043adf21bc / Dheeraj Turaga 
<[email protected]>
Send Airflow CLI logs to stderr for -o commands so structured output stays 
parseable

CLI commands that accept -o (table|json|yaml|plain) write structured data
to stdout. Airflow's default logging config routes the root console handler
to sys.stdout, so any log line emitted while such a command runs is mixed
into that data and breaks downstream parsers (most visibly: the Celery
default visibility_timeout warning corrupts `airflow celery list-workers
-o json` output).

After parse_args() in the CLI entrypoint, redirect any root-logger
StreamHandler whose stream is sys.stdout to sys.stderr, gated on
hasattr(args, 'output'). Daemon commands (scheduler, api-server,
celery worker, ...) do not register -o and so keep their existing
stdout-logging behavior.

Report URL: https://github.com/apache/airflow/actions/runs/28142777040

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to