You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2019/08/16 17:49:01 UTC

[jira] [Commented] (AIRFLOW-5222) Dag run status is wrongly set to SUCCESS

    [ https://issues.apache.org/jira/browse/AIRFLOW-5222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16909279#comment-16909279 ] 

Ash Berlin-Taylor commented on AIRFLOW-5222:
--------------------------------------------

Can you share the DAG file used to generate the graph shown above?

> 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.3, 1.10.4
>            Reporter: Deavarajegowda M T
>            Priority: Minor
>         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)