seyoon-lim commented on code in PR #40757:
URL: https://github.com/apache/airflow/pull/40757#discussion_r1761192669
##########
airflow/providers/apache/spark/hooks/spark_submit.py:
##########
@@ -370,10 +448,12 @@ def _build_spark_submit_command(self, application: str)
-> list[str]:
connection_cmd += ["--executor-memory", self._executor_memory]
if self._driver_memory:
connection_cmd += ["--driver-memory", self._driver_memory]
- if self._keytab:
- connection_cmd += ["--keytab", self._keytab]
- if self._principal:
- connection_cmd += ["--principal", self._principal]
+ keytab = self._get_keytab()
+ if keytab:
+ connection_cmd += ["--keytab", keytab]
+ principal = self._get_principal()
Review Comment:
@romsharon98 I have rolled back this logic due to the following reason from
https://github.com/apache/airflow/pull/40757#discussion_r1747780969
The test fails when an error is raised from _resolve_connection. In this
case, I need to return self._principal(self._keytab) instead of
self._connection["principal"](self._connection["keytab"]).
--
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]