kaxil commented on code in PR #45106:
URL: https://github.com/apache/airflow/pull/45106#discussion_r1898678934


##########
airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -359,3 +369,15 @@ def ti_put_rtif(
     _update_rtif(task_instance, put_rtif_payload, session)
 
     return {"message": "Rendered task instance fields successfully set"}
+
+
+def _is_eligible_to_retry(state: str, try_number: int, max_tries: int) -> bool:
+    """Is task instance is eligible for retry."""
+    if state == State.RESTARTING:
+        # If a task is cleared when running, it goes into RESTARTING state and 
is always
+        # eligible for retry
+        return True

Review Comment:
   We should add a test for the `RESTARTING` too



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