MaksYermak commented on code in PR #51956:
URL: https://github.com/apache/airflow/pull/51956#discussion_r2164147059


##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/spark_kubernetes.py:
##########
@@ -268,8 +268,19 @@ def get_or_create_spark_crd(self, launcher: 
CustomObjectLauncher, context) -> k8
     def process_pod_deletion(self, pod, *, reraise=True):
         if pod is not None:
             if self.delete_on_termination:
-                self.log.info("Deleting spark job: %s", 
pod.metadata.name.replace("-driver", ""))
-                
self.launcher.delete_spark_job(pod.metadata.name.replace("-driver", ""))
+                pod_name = pod.metadata.name.replace("-driver", "")
+                self.log.info("Deleting spark job: %s", pod_name)
+
+                # because of self.launcher is defined in execute method it 
does not exist for

Review Comment:
   @sunank200 it's a good idea I have updated the code, thank you



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