amichai07 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_r261877204
##########
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:
It seems that it should include also UPSTREAM_FAILED, the behaviour dealing
with finished tasks is quiet similar in most cases, I will run the tests and we
will see :)
----------------------------------------------------------------
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