ashb commented on a change in pull request #4751: [AIRFLOW-3607] collected
trigger rule dep check per dag run
URL: https://github.com/apache/airflow/pull/4751#discussion_r365368138
##########
File path: tests/models/test_dagrun.py
##########
@@ -229,7 +229,7 @@ def test_dagrun_deadlock(self):
start_date=now)
ti_op1 = dr.get_task_instance(task_id=op1.task_id)
- ti_op1.set_state(state=State.SUCCESS, session=session)
+ ti_op1.set_state(state=State.FAILED, session=session)
Review comment:
Okay, I've cone back to the original commit where we introduced the concept
of deadlocks: 24a7072990fb232a6fe23c9eb3fdb72ba0695c96 and it says this:
```
3. Deadlock — A dag run is deadlocked when no action is possible.
This is determined by the presence of unfinished tasks without met
dependencies. However, care must be taken when depends_on_past=True
because individual dag runs could *look* like they are deadlocked
when they are actually just waiting for earlier runs to finish.
```
(not what I'd traditionally call a deadlock, but okay).
So I think this is _wrong_. Since the task is in success state, but the
trigger rule is one_failed it should cause the "deadlock" (or also known as
terminal state): when ti_op1 is in success state ti_op2 won't ever be able to
run, so this should cause it to fail
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services