Lee-W commented on code in PR #62393:
URL: https://github.com/apache/airflow/pull/62393#discussion_r2844026060


##########
providers/databricks/src/airflow/providers/databricks/operators/databricks.py:
##########
@@ -921,8 +921,15 @@ def execute(self, context: Context):
             self.json["job_id"] = job_id
             del self.json["job_name"]
 
-        if self.cancel_previous_runs and self.json["job_id"] is not None:
-            hook.cancel_all_runs(self.json["job_id"])
+        if self.cancel_previous_runs:
+            job_id = self.json.get("job_id")
+
+            if job_id is None:
+                raise AirflowException(

Review Comment:
   Thanks @sjyangkevin ! Yes, don't do `AirflowException`



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