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


##########
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:
   @o-nikolas Thank you for explaining the process. I now have a better 
understanding of how the operator works with a task. I pushed a new test I want 
to add for specifically checking if on_kill is called with a timeout. The test 
currently does not pass, but I wanted to maybe get some help with it. When 
debugging the test locally in my IDE, the test triggers a timeout if I pause 
the debugger on:
   
   
https://github.com/apache/airflow/blob/6b9214508ae8ff4d6d39e9ecda5138b5ba717ceb/airflow/models/taskinstance.py#L759
   
   Not sure why this happens during the test run. When I do trigger the 
`AirflowTaskTimeout`, I'm not seeing the `on_kill` log message, but the test 
passes the `mock_on_kill.assert_called_once()` assertion.



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