You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jack (Jira)" <ji...@apache.org> on 2019/09/30 18:05:00 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=16941202#comment-16941202 ] 

jack commented on AIRFLOW-5222:
-------------------------------

I think the DAG state is determent by the last task status.

so in this case join is skipped which is why the DAG marked as success.

> 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: example_branch_operator.py, 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
(v8.3.4#803005)