nathadfield opened a new pull request, #60052:
URL: https://github.com/apache/airflow/pull/60052
## Summary
Closes #60049
`TriggerDagRunOperator` was incorrectly entering `DEFERRED` state even when
`wait_for_completion=False`. This occurred when `deferrable=True` was set
(either explicitly or via the `operators.default_deferrable` config), causing
tasks to get stuck in deferred state when they should complete immediately
after triggering the target DAG.
## Changes
- Modified `TriggerDagRunOperator.__init__` to ensure `deferrable` is only
`True` when both `deferrable=True` AND `wait_for_completion=True`
- Added test cases for both Airflow 2 and Airflow 3 to verify the fix
## Root Cause
When `wait_for_completion=False`, there's no reason to defer since the
operator should just trigger the DAG and return immediately. However, the code
was passing `deferrable=True` through to the execution logic, causing it to
unnecessarily enter deferred state.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]