dataengineervishal commented on code in PR #54560:
URL: https://github.com/apache/airflow/pull/54560#discussion_r2280984102
##########
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:
@Programmer-RD-AI I’ve gone through a few coding practices, and I feel my
design is cleaner. The ClientOptions object will be created only once (unless
it’s manually reset), and the connection itself still won’t be created upfront.
It will only be initialized when get_conn is called.
--
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]