MRLab12 commented on code in PR #40377:
URL: https://github.com/apache/airflow/pull/40377#discussion_r1676370100


##########
airflow/providers/ssh/operators/ssh.py:
##########
@@ -192,9 +192,20 @@ def execute(self, context=None) -> bytes | str:
         enable_pickling = conf.getboolean("core", "enable_xcom_pickling")
         if not enable_pickling:
             result = b64encode(result).decode("utf-8")
+
+        self.on_kill()

Review Comment:
   @potiuk To make sure I'm following correctly, the task should call `on_kill` 
in `TaskInstance` right? I'm trying to test this locally by triggering a 
timeout. When I trigger the `AirflowException("SSH command timed out")` error, 
`on_kill` is not executed. Since the errors are handled in `_handle_failure`, 
`on_kill` is not called here. Let me know if I'm on the right path.



-- 
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: commits-unsubscr...@airflow.apache.org

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

Reply via email to