Steve Jacobs created AIRFLOW-3344:
-------------------------------------

             Summary: Airflow DAG object clear function does not clear tasks in 
the upstream_failed state when only_failed=True
                 Key: AIRFLOW-3344
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3344
             Project: Apache Airflow
          Issue Type: Bug
          Components: DAG
    Affects Versions: 1.10.0, 1.9.0, 1.8.2
            Reporter: Steve Jacobs


When using the airflow clear command from the cli, you can pass an argument 
--only_failed to clear only failed tasks. This will clear ONLY tasks with the 
state failed, and not tasks with the state upstream_failed, causing any clear 
to still fail the dag_run if any upstream tasks are failed.

Since one_failed as a trigger rule also checks for upstream_failed tasks, it 
seems consistent that this should also clear upstream_failed tasks. The 
relevant code change necessary is here:
{code:java}
if only_failed:
 tis = tis.filter(TI.state == State.FAILED)
{code}
to
{code:java}
if only_failed:
  tis = tis.filter(TI.state.in_([State.FAILED, State.UPSTREAM_FAILED]))
{code}
in models.py



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to