title: Airflow: how to stop next dag run from starting after failure
body: <p>I'm trying to see whether or not there is a straightforward way to not start the next dag run if the previous dag run has failures. I already set <code>depends_on_past=True</code>, <code>wait_for_downstream=True</code>, <code>max_active_runs=1</code>.</p>
  <p>What i have is tasks 1, 2, 3 where they:</p>
  <ol>
  <li>create resources</li>
  <li>run job</li>
  <li>tear down resources</li>
  </ol>
  <p>task 3 always runs with <code>trigger_rule=all_done</code> to make sure we always tear down resources. What i'm seeing is that if task 2 fails, and task 3 then succeeds, the next dag run starts and if i have <code>wait_for_downstream=False</code> it runs task 1 since the previous task 1 was a success and if i have <code>wait_for_downstream=true</code> then it doesn't start the dag as i expect which is perfect.</p>
  <p>The problem is that if tasks 1 and 2 succeed but task 3 fails for some reason, now my next dag run starts and task 1 runs immediately because both task 1 and task 2 (due to <code>wait_for_downstream</code>) were successful in the previous run. This is the worst case scenario because task 1 creates resources and then the job is never run so the resources just sit there allocated.</p>
  <p>What i ultimately want is for any failure to stop the dag from proceeding to the next dag run. If my previous dag run is marked as fail then the next one should not start at all. Is there any mechanism for doing this?</p>
  <p>My current 2 best effort ideas are:</p>
  <ol>
  <li>Use a sub dag so that there's only 1 task in the parent dag and therefore the next dag run will never start at all if the previous single task dag failed. This seems like it will work but i've seen mixed reviews on the use of sub dag operators.</li>
  <li>Do some sort of logic within the dag as a first task that manually queries the DB to see if the dag has previous failures and fails the task if it does. This seems hacky and not ideal but that it could work as well.</li>
  </ol>
  <p>Is there any out of the box solution for this? Seems fairly standard to not want to continue on failure and not want step 1 to start of run 2 if not all steps of run 1 were successful or if run 1 itself was marked as failed.</p>