Taragolis commented on code in PR #29635:
URL: https://github.com/apache/airflow/pull/29635#discussion_r1112404383
##########
airflow/providers/yandex/hooks/yandex.py:
##########
@@ -122,7 +127,8 @@ def __init__(
self.connection = self.get_connection(self.connection_id)
self.extras = self.connection.extra_dejson
credentials = self._get_credentials()
- self.sdk = yandexcloud.SDK(user_agent=self.provider_user_agent(),
**credentials)
+ endpoint = self._get_field("endpoint", "api.cloud.yandex.net")
+ self.sdk = yandexcloud.SDK(user_agent=self.provider_user_agent(),
endpoint=endpoint, **credentials)
Review Comment:
```suggestion
sdk_config = {}
endpoint = self._get_field("endpoint", None)
if endpoint:
sdk_config["endpoint"] = endpoint
self.sdk = yandexcloud.SDK(user_agent=self.provider_user_agent(),
**sdk_config, **credentials)
```
I would avoid specify default value in Airflow Provider, if it changed in
Yandex Cloud SDK it would break in the future.
BTW, is that all their
[documentation](https://cloud.yandex.com/en/docs/functions/lang/python/sdk) for
Python SDK? 🙄
--
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]