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_r367549812
 
 

 ##########
 File path: tests/models/test_dagrun.py
 ##########
 @@ -234,8 +234,9 @@ def test_dagrun_deadlock(self):
         ti_op2.set_state(state=State.NONE, session=session)
 
         dr.update_state()
-        self.assertEqual(dr.state, State.RUNNING)
+        self.assertEqual(dr.state, State.FAILED)
 
+        dr.set_state(State.RUNNING)
 
 Review comment:
   So before your change these tasks ended up in this state: `[<TaskInstance: 
text_dagrun_deadlock.B [skipped]>, <TaskInstance: text_dagrun_deadlock.A 
[success]>]`. And looking at the TriggerRuleDep for ONE_FAILED:
   
   ```
               elif tr == TR.ONE_FAILED:
                   if upstream_done and not (failed or upstream_failed):
                       ti.set_state(State.SKIPPED, session)
   ```
   
   So that looks right - op2/B should be in SKIPPED state.
   
   @amichai07 So this is a bug, and the test was right and shouldn't be changed.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to