aaron-y-chen commented on code in PR #72285:
URL: https://github.com/apache/airflow/pull/72285#discussion_r3904790397


##########
providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py:
##########
@@ -1290,6 +1309,10 @@ def _poll_k8s_driver_via_api(self) -> str | None:
         finally:
             self._run_post_submit_commands()
 
+    def _poll_k8s_driver_via_api(self) -> str | None:
+        """Deprecated alias for poll_k8s_driver_via_api."""
+        return self.poll_k8s_driver_via_api()

Review Comment:
   Why is not
   ```python
   def poll_k8s_driver_via_api(self):
       return self._poll_k8s_driver_via_api()
   ```



##########
providers/apache/spark/src/airflow/providers/apache/spark/operators/spark_submit.py:
##########
@@ -162,15 +163,16 @@ class 
_YarnSparkSubmitBackend(_SparkSubmitDeploymentBackend):
     """Logic for tracking Spark applications in YARN cluster mode."""
 
     def submit_job(self, context: Context) -> str | None:
-        if self.hook._conf.get("spark.yarn.submit.waitAppCompletion", 
"").strip().lower() == "true":
+        conf = self.hook.conf or {}

Review Comment:
   Why do we need this? We already have `or {}` in `_conf`.
   
   
https://github.com/apache/airflow/blob/24d8c66ee11e3003801b51511c4308e97a944a97/providers/apache/spark/src/airflow/providers/apache/spark/hooks/spark_submit.py#L278



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