ashb commented on a change in pull request #9044:
URL: https://github.com/apache/airflow/pull/9044#discussion_r441538872
##########
File path: airflow/providers/apache/spark/hooks/spark_submit.py
##########
@@ -617,15 +619,23 @@ def on_kill(self):
self._submit_sp.kill()
if self._yarn_application_id:
- self.log.info('Killing application %s on YARN',
self._yarn_application_id)
-
kill_cmd = "yarn application -kill {}" \
.format(self._yarn_application_id).split()
+ env = None
+ if self._keytab is not None and self._principal is not None:
+ # we are ignoring renewal failures from renew_from_kt
+ # here as the failure could just be due to a non-renewable
ticket,
+ # we still attempt to kill the yarn application
+ renew_from_kt(self._principal, self._keytab, False)
Review comment:
Boolean parameters are hard to understand at the call site, so please do
it with a named arg:
```suggestion
renew_from_kt(self._principal, self._keytab,
exit_on_fail=False)
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]