You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Deavarajegowda M T (JIRA)" <ji...@apache.org> on 2019/08/15 07:31:00 UTC
[jira] [Created] (AIRFLOW-5222) Dag run status is wrongly set to
SUCCESS
Deavarajegowda M T created AIRFLOW-5222:
-------------------------------------------
Summary: Dag run status is wrongly set to SUCCESS
Key: AIRFLOW-5222
URL: https://issues.apache.org/jira/browse/AIRFLOW-5222
Project: Apache Airflow
Issue Type: Bug
Components: models
Affects Versions: 1.10.4, 1.10.3
Reporter: Deavarajegowda M T
Attachments: image-2019-08-15-12-59-15-383.png
!image-2019-08-15-12-59-15-383.png!
In this particular case shouldn't dag run status should be failed instead of success.
Looks like in airflow on end tasks status are checked to decide on dag run status.
root_ids = [t.task_id for t in dag.roots]
roots = [t for t in tis if t.task_id in root_ids]
# if all roots finished and at least one failed, the run failed
if (not unfinished_tasks and
any(r.state in (State.FAILED, State.UPSTREAM_FAILED) for r in roots)):
self.log.info('Marking run %s failed', self)
self.set_state(State.FAILED)
dag.handle_callback(self, success=False, reason='task_failure',
session=session)
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)