SIGN IN SIGN UP
apache / airflow UNCLAIMED

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows

0 0 267 Python

Fix flaky test_trigger_runner_exception_stops_triggerer race (#67782)

The test arms a SIGALRM timer for 0.1s, then calls _execute(); the
handler reads job_runner.trigger_runner.pid to kill the subprocess.
But trigger_runner is only assigned inside _execute() after the
supervisor subprocess forks, so on a slow CI runner the timer could
fire first and raise "'TriggererJobRunner' object has no attribute
'trigger_runner'".

Initialize trigger_runner to None in __init__ so signal handlers
(on_kill, _exit_gracefully) and the _execute() finally block never
hit AttributeError, and re-arm the timer in the test handler when the
subprocess has not started yet.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
J
Jarek Potiuk committed
12e3355632fee6c2667c0f8cfe5bf40a2fdb0434
Parent: 5108abe
Committed by GitHub <noreply@github.com> on 5/30/2026, 4:07:17 PM