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


##########
task-sdk/src/airflow/sdk/execution_time/supervisor.py:
##########
@@ -1151,8 +1155,16 @@ def final_state(self):
             return self._terminal_state or TaskInstanceState.SUCCESS
         if self._exit_code != 0 and self._terminal_state == SERVER_TERMINATED:
             return SERVER_TERMINATED
+
+        if self._is_signal_retryable() and self._should_retry:
+            return TaskInstanceState.UP_FOR_RETRY
+
         return TaskInstanceState.FAILED
 
+    def _is_signal_retryable(self) -> bool:
+        """Check if the exit code signal can be retried."""
+        return self._exit_code in (-signal.SIGKILL, -signal.SIGTERM, 
-signal.SIGSEGV)

Review Comment:
   Tried to handle it better in 
https://github.com/apache/airflow/pull/55767/commits/ac514f2e37157f8c1c505bab4d3c66c56c579457,
 wdyt?



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