Airflow doesn’t reset task instance statuses after they have been completed if there is a code change. You could however give the task a new name and then set the DAG Runs to running state.
Option 1 – User Interface
Airflow can clear the state of tasks within the UI – just use “Browse -> Task Instances”. There you can:
- Create filter to select the specific task instances, i.e. by filtering for a task/DAG name and a time frame, then “Apply” the filter
- You can then see a table with all the task runs that apply to this filter, you can select all and and choose “With selected -> clear”
Option 2 – Command Line
Clear a set of task instance, as if they never ran For example:
airflow clear -s <start_date> -e <end_date> -t task_to_reset <DAG_NAME>
CLICK HERE to find out more related problems solutions.