charlotteK8 opened a new issue, #60866:
URL: https://github.com/apache/airflow/issues/60866

   ### Description
   
   Airflow currently supports retries at the task level, but there is no native 
way to automatically retry an entire DAG run from the beginning based on the 
outcome of a terminal (leaf) task or overall DAG run status.
   
   Proposed behavior: a DAG-level retry mechanism that allows users to,
   - Configure automatic retries of the entire DAG when one or more designated 
terminal tasks fail (or based on final DAG run state)
   - Specify the number of DAG-level retries and retry delay
   - Re-run all tasks from the start, rather than only retrying failed tasks 
(simulating a clearing of the run)
   - Track DAG-level retry attempts separately from task-level retries
   
   ### Use case/motivation
   
   In some workflows, a failure at the end of the DAG should indicate that 
upstream tasks must be re-executed from the very start of the run. Currently, 
achieving this requires manual clearing of task instances or custom logic, like 
calling the REST API to perform the clearing function for you within a callback 
of the leaf task.
   
   For example, a DAG ends with a validation or publish task. If this task 
fails, earlier extraction or transformation steps must be re-run to ensure 
consistency. An automatic DAG-level retry would remove the need for manual 
intervention/custom logic.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to