firasbouzazi commented on code in PR #77271:
URL: https://github.com/apache/airflow/pull/77271#discussion_r4712749955


##########
providers/databricks/src/airflow/providers/databricks/sensors/databricks.py:
##########
@@ -144,6 +150,8 @@ def execute(self, context: Context):
 
         if self.deferrable:
             
self._handle_deferrable_execution(defer_method_name=DEFER_METHOD_NAME)  # type: 
ignore[misc]
+            return None
+        return super().execute(context)

Review Comment:
   Yes. On AirflowSensorTimeout, or the AirflowSkipException that soft_fail 
raises instead, the sensor now cancels the statement unless it has already 
finished, then re-raises. That matches the trigger and _handle_execution(). 
Tested with the real poke loop (timeout=0, with and without soft_fail), plus a 
skip on a finished statement, which does not cancel.



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