Airflow - Deleted task instance not re-running after being deleted from DAG search results page in UI
Asked Answered
M

1

7

We are running a large number of DAGS, and as a result, thousands of task instances for each calendar date. We have sporadic days that have failed and we are attempting to re-run those dates as efficiently as possible.

The method we attempted to use is using the UI's search feature to narrow down the full list of individual dates that failed, and clicking 'delete' (which, to my understanding, was equivalent to 'clearing' a task instance), shown in this screenshot.

enter image description here

We are using catchup = True in order to automatically re-run cleared dates, but after checking individual DAGs that should be re-running those deleted dates, the dates no longer appear at all. Not even in a 'cleared' or 'running' state. The dates just aren't present. For example, we deleted 3/30/2020 and 3/31/2020, so in the tree view, the dates jump from 3/29/2020 to 4/01/2020.

Is there an additional setting or anything to keep in mind when deleting/clearing instances using the UI, from the search results page in particular?

Musser answered 13/4, 2020 at 14:41 Comment(0)
A
0

Faced the same issue on Airflow 2.5.0. I found two possible fixes.

Option 1: backfill the DAG run

Backfilling the run on the date(s) should bring back the missing task(s). Example command:

airflow dags backfill my_dag -s 2024-01-10 -e 2022-01-11

Option 2: remove DAG

Be mindful that this option is destructive. If one is re-running a whole DAG retroactively and can afford it, deleting the whole DAG using the UI will solve the issue as well. After being removed, the DAG will be regenerated with all tasks correctly populated.

Alejandro answered 15/1 at 11:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.