title: DAG marked as "success" if one task fails, because of trigger rule ALL_DONE
body: <p>I have the following DAG with 3 tasks:</p>
  <pre><code>start --&gt; special_task --&gt; end
  </code></pre>
  <p>The task in the middle can succeed or fail, but <code>end</code> <strong>must always</strong> be executed (imagine this is a task for cleanly closing resources). For that, I used the <a href="https://airflow.apache.org/docs/apache-airflow/stable/concepts/dags.html#trigger-rules" rel="nofollow noreferrer">trigger rule</a> <code>ALL_DONE</code>:</p>
  
  <pre><code>end.trigger_rule = trigger_rule.TriggerRule.ALL_DONE
  </code></pre>
  <p>Using that, <code>end</code> is properly executed if <code>special_task</code> fails. However, since <code>end</code> is the last task and succeeds, the DAG is always marked as <code>SUCCESS</code>.</p>
  <p>How can I configure my DAG so that if one of the tasks failed, the whole DAG is marked as <code>FAILED</code>?</p>
  <h2>Example to reproduce</h2>
  
  <pre><code>import datetime
  
  from airflow import DAG
  from airflow.operators.bash_operator import BashOperator
  from airflow.utils import trigger_rule
  
  dag = DAG(
      dag_id='my_dag',
      start_date=datetime.datetime.today(),
      schedule_interval=None
  )
  
  start = BashOperator(
      task_id='start',
      bash_command='echo start',
      dag=dag
  )
  
  special_task = BashOperator(
      task_id='special_task',
      bash_command='exit 1', # force failure
      dag=dag
  )
  
  end = BashOperator(
      task_id='end',
      bash_command='echo end',
      dag=dag
  )
  end.trigger_rule = trigger_rule.TriggerRule.ALL_DONE
  
  start.set_downstream(special_task)
  special_task.set_downstream(end)
  </code></pre>
  <p><a href="https://stackoverflow.com/questions/50055582/how-to-mark-an-airflow-dag-run-as-failed-if-any-task-fails">This post</a> seems to be related, but the answer does not suit my needs, since the downstream task <code>end</code> must be executed (hence the mandatory <code>trigger_rule</code>).</p>