turbaszek commented on issue #8432: Provide GCP credentials in Bash/Python operators URL: https://github.com/apache/airflow/pull/8432#issuecomment-615884076 I agree that having provider-specific code in Bash / Python ops doesn't sound good. However, I think that it would be nice to help users somehow to authorize in those ops. Other idea I have is to pass an authorization context manager to operators: ```python class BashOperator: def __init__(..., authctx=None): self.authctx = authctx def pre_execute(self): self.authctx.enter() def post_execute(self): self.authctx.close() ``` and then users can do something like this: ``` bop = BashOperator(task_id="id", ..., authctx=gcp_auth(KEY_NAME)) ```
---------------------------------------------------------------- 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] With regards, Apache Git Services
