FrankYang0529 commented on code in PR #68902:
URL: https://github.com/apache/airflow/pull/68902#discussion_r3525911077


##########
task-sdk/src/airflow/sdk/execution_time/supervisor.py:
##########
@@ -1729,7 +1729,13 @@ def _handle_request(self, msg: ToSupervisor, log: 
FilteringBoundLogger, req_id:
         elif isinstance(msg, PutVariable):
             resp, dump_opts = handle_put_variable(self.client, msg)
         elif isinstance(msg, SetRenderedFields):
-            self.client.task_instances.set_rtif(self.id, msg.rendered_fields)
+            try:
+                self.client.task_instances.set_rtif(self.id, 
msg.rendered_fields)
+            except ServerResponseError as e:
+                # The TI id was archived when the server regenerated it on 
retry/clear, so skip 410.
+                if e.response.status_code != HTTPStatus.GONE:
+                    raise
+                log.debug("Skipping RTIF overwrite; task instance archived on 
retry/clear", ti_id=self.id)

Review Comment:
   I update comment to explain 410 heartbeat case. Thanks.



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