airflow
airflow copied to clipboard
Fix teardown scheduling if indirect upstream is cleared
This PR fixes the calculation of the scheduling decision if upstream to a teardown task an individual task is reset (w/o resetting all downstream!) but the direct upstream tasks of the teardown are completed.
As reported in #29332 in such case as direct upstream dependencies of teardown tasks were completed, teardown was starting too early.
With this fix teardown scheduling evaluates all upstream dependencies if any upstream is not completed.
How to test?
- Use the DAG in the comments of the bug report #29332 and deploy this
- Run this DAG (at least once) till success
- Clear the first normal task w/o clearing downstream
- See that teardown is scheduled only if the cleared task is completed (before this PR it is immediately scheduled after setup was completed in parallel to the actual cleared task
closes: #29332