Programmer-RD-AI commented on code in PR #54560:
URL: https://github.com/apache/airflow/pull/54560#discussion_r2280326379
##########
providers/google/src/airflow/providers/google/suite/hooks/sheets.py:
##########
@@ -68,7 +73,16 @@ def get_conn(self) -> Any:
"""
if not self._conn:
http_authorized = self._authorize()
- self._conn = build("sheets", self.api_version,
http=http_authorized, cache_discovery=False)
+ client_options = None
+ if self.api_endpoint:
+ client_options = ClientOptions(api_endpoint=self.api_endpoint)
Review Comment:
Could we move the `ClientOptions` creation into the `__init__` so that, if
`api_endpoint` is provided, client_options is initialized once instead of
inside `get_conn`? That way we don’t re-create it every call.
--
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]