tooptoop4 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_r364339634
##########
File path: airflow/models/dagrun.py
##########
@@ -263,48 +262,34 @@ def update_state(self, session=None):
Determines the overall state of the DagRun based on the state
of its TaskInstances.
+ :param finished_tasks: The finished tasks of this run
+ :type finished_tasks: list[airflow.models.TaskInstance]
:return: State
"""
dag = self.get_dag()
-
- tis = self.get_task_instances(session=session)
- self.log.debug("Updating state for %s considering %s task(s)", self,
len(tis))
+ ready_tis = []
+ tis = [ti for ti in self.get_task_instances(session=session) if
ti.state != State.REMOVED]
Review comment:
> do you think it has something to do with this chan
no, REMOVED state of TI leading to SUCCESS state of DagRun is existing bug,
before your changes.
----------------------------------------------------------------
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