uranusjr commented on a change in pull request #18723:
URL: https://github.com/apache/airflow/pull/18723#discussion_r722790213
##########
File path: airflow/task/task_runner/base_task_runner.py
##########
@@ -61,13 +61,14 @@ def __init__(self, local_task_job):
# Add sudo commands to change user if we need to. Needed to handle
SubDagOperator
# case using a SequentialExecutor.
self.log.debug("Planning to run as the %s user", self.run_as_user)
- if self.run_as_user and (self.run_as_user != getuser()):
- # We want to include any environment variables now, as we won't
- # want to have to specify them in the sudo call - they would show
- # up in `ps` that way! And run commands now, as the other user
- # might not be able to run the cmds to get credentials
- cfg_path = tmp_configuration_copy(chmod=0o600)
+ # We want to include any environment variables now, as we won't
+ # want to have to specify them in the sudo call - they would show
+ # up in `ps` that way! And run commands now, as the other user
+ # might not be able to run the cmds to get credentials
+ cfg_path = tmp_configuration_copy(chmod=0o600)
+
+ if self.run_as_user and (self.run_as_user != getuser()):
Review comment:
```suggestion
if self.run_as_user and self.run_as_user != getuser():
```
Parentheses redundant.
--
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]