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_r259278464
 
 

 ##########
 File path: airflow/jobs.py
 ##########
 @@ -930,7 +932,20 @@ def _process_task_instances(self, dag, queue, 
session=None):
             run.dag = dag
             # todo: preferably the integrity check happens at dag collection 
time
             run.verify_integrity(session=session)
-            run.update_state(session=session)
+            finished_tasks = (
+                session
+                .query(TI.task_id, TI.state
+                       )
+                .filter(
+                    TI.dag_id == run.dag_id,
+                    TI.execution_date == run.execution_date,
+                    TI.state.in_([
+                        State.SUCCESS, State.FAILED,
+                        State.UPSTREAM_FAILED, State.SKIPPED])
 
 Review comment:
   This  should probably be `State.finished()`. But that list doesn't include 
UPSTREAM_FAILED, and I don't know what adding it would do.  Could you take a 
look and try to work that out?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to