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


##########
task_sdk/src/airflow/sdk/execution_time/supervisor.py:
##########
@@ -767,6 +768,14 @@ def _handle_request(self, msg: ToSupervisor, log: 
FilteringBoundLogger):
         if isinstance(msg, TaskState):
             self._terminal_state = msg.state
             self._task_end_time_monotonic = time.monotonic()
+        elif isinstance(msg, RuntimeCheckOnTask):
+            runtime_check_resp = 
self.client.task_instances.runtime_checks(id=self.id, msg=msg)
+            resp = runtime_check_resp.model_dump_json().encode()
+            if not runtime_check_resp.ok:
+                log.debug("Runtime checks failed on task %s, marking task as 
failed..", self.id)
+                self.client.task_instances.finish(
+                    id=self.id, state=TerminalTIState.FAILED, 
when=datetime.now(tz=timezone.utc)
+                )

Review Comment:
   Handled in last batch of commits



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