amoghrajesh commented on code in PR #73889:
URL: https://github.com/apache/airflow/pull/73889#discussion_r4375099768


##########
airflow-core/src/airflow/models/taskinstance.py:
##########
@@ -447,6 +447,10 @@ def clear_task_instances(
                 ti.max_tries = max(ti.max_tries, previous_try_number)
             ti.state = None
             ti.external_executor_id = None
+            # retry_delay_override is the functional one: 
next_retry_datetime() prefers it over
+            # the task's own retry_delay, so a stale value would retime the 
next retry.
+            ti.retry_reason = None

Review Comment:
   Doing it here itself. 
   
   `set_state` clears only when leaving `up_for_retry`, not on every 
transition, since `next_retry_datetime()` reads the override while the task 
waits. Tests both ways: parametrized over success/failed/skipped for the 
clearing, plus one that the values survive a transition into `up_for_retry`. 
Clearing unconditionally fails that second one.



-- 
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