seanghaeli commented on code in PR #76571:
URL: https://github.com/apache/airflow/pull/76571#discussion_r4519116287


##########
task-sdk/src/airflow/sdk/api/client.py:
##########
@@ -1181,8 +1184,34 @@ def __init__(self, client: Client):
         self.client = client
 
     def run(self, callback_id: uuid.UUID) -> None:
-        """Exchange the single-use callback token for an execution token."""
-        self.client.patch(f"callbacks/{callback_id}/run")
+        """
+        Exchange the single-use callback token for an execution token.
+
+        The server uses up the token once it gets the request, so only retry 
when the request never
+        reached it, and give a slow server longer to answer.
+        """
+        try:

Review Comment:
   Actually, I think the right way to handle the follow-up would be to 
re-dispatch the callback with a fresh token. This would handle the case of a 
worker dying after an exchange, not only the case of the server's response to 
the worker being lost for whatever reason.
   
   If we all agree that this PR is the right shape for a 3.4.1 stopgap, let's 
resolve this thread and move follow-up discussion into issue #76735 
@amoghrajesh @uranusjr 



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