ephraimbuddy commented on a change in pull request #16301:
URL: https://github.com/apache/airflow/pull/16301#discussion_r650880028



##########
File path: airflow/models/taskinstance.py
##########
@@ -1311,12 +1311,6 @@ def _run_finished_callback(self, error: 
Optional[Union[str, Exception]] = None)
             if task.on_success_callback is not None:
                 context = self.get_template_context()
                 task.on_success_callback(context)
-        elif self.state == State.UP_FOR_RETRY:
-            task = self.task
-            if task.on_retry_callback is not None:
-                context = self.get_template_context()
-                context["exception"] = error
-                task.on_retry_callback(context)

Review comment:
       I have moved this to handle_failure method since UP_FOR_RETRY is not a 
finished callback and that makes it not to be called when on_retry_callback is 
set




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to