Taragolis commented on code in PR #35059:
URL: https://github.com/apache/airflow/pull/35059#discussion_r1370969011


##########
airflow/providers/yandex/provider.yaml:
##########
@@ -70,3 +70,15 @@ hooks:
 connection-types:
   - hook-class-name: airflow.providers.yandex.hooks.yandex.YandexCloudBaseHook
     connection-type: yandexcloud
+
+config:
+  airflow:

Review Comment:
   ```suggestion
     yandex:
   ```



##########
airflow/providers/yandex/provider.yaml:
##########
@@ -70,3 +70,15 @@ hooks:
 connection-types:
   - hook-class-name: airflow.providers.yandex.hooks.yandex.YandexCloudBaseHook
     connection-type: yandexcloud
+
+config:
+  airflow:
+    description: ~

Review Comment:
   ```suggestion
       description: This section contains settings for Yandex Cloud integration.
   ```
   
   or more appropriate



##########
airflow/providers/yandex/provider.yaml:
##########
@@ -70,3 +70,15 @@ hooks:
 connection-types:
   - hook-class-name: airflow.providers.yandex.hooks.yandex.YandexCloudBaseHook
     connection-type: yandexcloud
+
+config:
+  airflow:
+    description: ~
+    options:
+      sdk_user_agent_prefix:
+        description: |
+          Prefix for User-Agent header in Yandex.Cloud SDK requests
+        version_added: ~

Review Comment:
   ```suggestion
           version_added: 3.6.0
   ```



##########
airflow/providers/yandex/hooks/yandex.py:
##########
@@ -88,14 +88,19 @@ def get_connection_form_widgets() -> dict[str, Any]:
     @classmethod
     def provider_user_agent(cls) -> str | None:
         """Construct User-Agent from Airflow core & provider package 
versions."""
-        import airflow
+        from airflow import __version__ as airflow_version
+        from airflow.configuration import conf
         from airflow.providers_manager import ProvidersManager
 
         try:
             manager = ProvidersManager()
             provider_name = manager.hooks[cls.conn_type].package_name  # type: 
ignore[union-attr]
             provider = manager.providers[provider_name]
-            return f"apache-airflow/{airflow.__version__} 
{provider_name}/{provider.version}"
+            return ' '.join((
+                conf.get("yandex", "sdk_user_agent_prefix"),

Review Comment:
   ```suggestion
                   conf.get("yandex", "sdk_user_agent_prefix", fallback=""),
   ```



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to