The GitHub Actions job "Tests" on airflow.git/fix/dag-callback-logging-airflow-3x has failed. Run started by GitHub user Arunodoy18 (triggered by Arunodoy18).
Head commit for run: c83d566026bf15c564077ca6c7e222089a1569ff / Arunodoy18 <[email protected]> Fix missing logs from DAG.on_failure_callback in Airflow 3.x DAG-level failure callbacks are executed outside of any TaskInstance context, which means no log handlers are attached. This caused all logging calls inside the callback to be silently dropped. This commit adds a logging context manager that temporarily redirects Python logging calls from DAG callbacks to the scheduler logger. Changes: - Added _redirect_callback_logs_to_scheduler() context manager in processor.py and dagrun.py - Wrapped callback execution with the logging context - Log messages are prefixed with [DAG Callback] for identification - Added unit tests to verify log capture in both code paths All logs from DAG callbacks now appear in scheduler logs with proper log levels preserved. No API changes or configuration required. Fixes issue where DAG callback logs were invisible for debugging. Report URL: https://github.com/apache/airflow/actions/runs/21327905138 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
