Apache Airflow · Arazzo Workflow
Apache Airflow Retry Failed Tasks in a DAG Run
Version 1.0.0
Preview which task instances a clear would touch, clear the failed ones for real, and wait for the re-run to settle.
View Spec
View on GitHub
ApacheDAGData PipelineETLOpen SourceOrchestrationPythonSchedulingWorkflowArazzoWorkflows
Provider
Workflows
retry-failed-tasks
Dry-run a clear, execute it, and wait for the resulting re-run to finish.
Verifies the DAG run failed, previews the blast radius of the clear, performs the clear against only the failed tasks and their downstream dependents, polls the re-run, and annotates the DAG run with the result.
1
confirmRunFailed
get_dag_run
Read the DAG run and require the failed state. Clearing a healthy run would throw away good work, so the workflow refuses to proceed on anything else.
2
previewClear
post_clear_task_instances
Call the clear endpoint with dry_run enabled. Nothing changes; Airflow just returns the task instances the real call would reset, which is the blast radius the operator should approve before continuing.
3
clearTasks
post_clear_task_instances
Perform the clear for real. reset_dag_runs returns the DAG run itself to the queued state so the scheduler picks the cleared tasks back up; without it the run stays failed and the tasks never re-run.
4
waitForRerun
get_dag_run
Poll the DAG run until Airflow stamps a fresh end_date, marking the re-run as finished. Retries every 15 seconds for up to 80 attempts (~20 minutes).
5
recordOutcome
set_dag_run_note
Write the retry note onto the DAG run so the history explains why the run was cleared and what happened on the second attempt.