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

   ### Description
   
   This was previously possible in Airflow 2 using [this 
solution](https://github.com/apache/airflow/discussions/28263#discussioncomment-4354509).
 However, in Airflow 3 `RuntimeTaskInstanceProtocol` does not expose a method 
for modifying the task state directly.
   
   My suggestion would be to create a new exception type that can be raised 
from `on_retry_callback` to request a state change to either success or failure.
   
   ### Use case/motivation
   
   We have some long-running tasks (>24hr) that sometimes fail fast due to 
transient issues. We want to be able to retry whenever these fast fails occur. 
However, if a failure occurs hours into the task, we would prefer not to retry, 
as the task must be completed by a certain time and failures of this sort 
typically represent an actual issue we want to look into.
   
   ### Related issues
   
   Just the discussion item 
[here](https://github.com/apache/airflow/discussions/28263) from years ago as 
far as I can tell.
   
   ### 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