This is an automated email from the ASF dual-hosted git repository.

amoghdesai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 6e8fbd8e5ac Migrate trino/cohere connection UI metadata to YAML 
(#62390)
6e8fbd8e5ac is described below

commit 6e8fbd8e5ac351f6dffbbf09e7cb3265182ea3cf
Author: Kevin Yang <[email protected]>
AuthorDate: Thu Feb 26 04:45:33 2026 -0500

    Migrate trino/cohere connection UI metadata to YAML (#62390)
---
 providers/cohere/provider.yaml                     |  4 ++++
 .../airflow/providers/cohere/get_provider_info.py  |  4 ++++
 providers/trino/provider.yaml                      | 24 ++++++++++++++++++++++
 .../airflow/providers/trino/get_provider_info.py   | 11 +++++++++-
 4 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/providers/cohere/provider.yaml b/providers/cohere/provider.yaml
index 33dbb5fafdb..562b9275aa5 100644
--- a/providers/cohere/provider.yaml
+++ b/providers/cohere/provider.yaml
@@ -72,3 +72,7 @@ operators:
 connection-types:
   - hook-class-name: airflow.providers.cohere.hooks.cohere.CohereHook
     connection-type: cohere
+    ui-field-behaviour:
+      hidden-fields: ["schema", "login", "port", "extra"]
+      relabeling:
+        password: API Key
diff --git a/providers/cohere/src/airflow/providers/cohere/get_provider_info.py 
b/providers/cohere/src/airflow/providers/cohere/get_provider_info.py
index 115a4b859de..a91c98224cb 100644
--- a/providers/cohere/src/airflow/providers/cohere/get_provider_info.py
+++ b/providers/cohere/src/airflow/providers/cohere/get_provider_info.py
@@ -44,6 +44,10 @@ def get_provider_info():
             {
                 "hook-class-name": 
"airflow.providers.cohere.hooks.cohere.CohereHook",
                 "connection-type": "cohere",
+                "ui-field-behaviour": {
+                    "hidden-fields": ["schema", "login", "port", "extra"],
+                    "relabeling": {"password": "API Key"},
+                },
             }
         ],
     }
diff --git a/providers/trino/provider.yaml b/providers/trino/provider.yaml
index 9a887ad8cc7..40c43a4b894 100644
--- a/providers/trino/provider.yaml
+++ b/providers/trino/provider.yaml
@@ -115,3 +115,27 @@ transfers:
 connection-types:
   - hook-class-name: airflow.providers.trino.hooks.trino.TrinoHook
     connection-type: trino
+    ui-field-behaviour:
+      placeholders:
+        extra: |
+          {
+           "auth": "authentication type",
+           "impersonate_as_owner": "allow impersonate as owner",
+           "jwt__token": "JWT token",
+           "jwt__file": "JWT file path",
+           "certs__client_cert_path": "Client certificate path",
+           "certs__client_key_path": "Client key path",
+           "kerberos__config": "Kerberos config",
+           "kerberos__service_name": "Kerberos service name",
+           "kerberos__mutual_authentication": "Kerberos mutual authentication",
+           "kerberos__force_preemptive": "Kerberos force preemptive",
+           "kerberos__hostname_override": "Kerberos hostname override",
+           "kerberos__sanitize_mutual_error_response": "Kerberos sanitize 
mutual error response",
+           "kerberos__principal": "Kerberos principal",
+           "kerberos__delegate": "Kerberos delegate",
+           "kerberos__ca_bundle": "Kerberos CA bundle",
+           "session_properties": "session properties",
+           "client_tags": "Trino client tags. Example ['sales','cluster1']",
+           "timezone": "Trino timezone"
+          }
+        login: "Effective user for connection"
diff --git a/providers/trino/src/airflow/providers/trino/get_provider_info.py 
b/providers/trino/src/airflow/providers/trino/get_provider_info.py
index 0b43354392d..c2213e2c98c 100644
--- a/providers/trino/src/airflow/providers/trino/get_provider_info.py
+++ b/providers/trino/src/airflow/providers/trino/get_provider_info.py
@@ -51,6 +51,15 @@ def get_provider_info():
             }
         ],
         "connection-types": [
-            {"hook-class-name": 
"airflow.providers.trino.hooks.trino.TrinoHook", "connection-type": "trino"}
+            {
+                "hook-class-name": 
"airflow.providers.trino.hooks.trino.TrinoHook",
+                "connection-type": "trino",
+                "ui-field-behaviour": {
+                    "placeholders": {
+                        "extra": '{\n "auth": "authentication type",\n 
"impersonate_as_owner": "allow impersonate as owner",\n "jwt__token": "JWT 
token",\n "jwt__file": "JWT file path",\n "certs__client_cert_path": "Client 
certificate path",\n "certs__client_key_path": "Client key path",\n 
"kerberos__config": "Kerberos config",\n "kerberos__service_name": "Kerberos 
service name",\n "kerberos__mutual_authentication": "Kerberos mutual 
authentication",\n "kerberos__force_preemptive": "Kerbe [...]
+                        "login": "Effective user for connection",
+                    }
+                },
+            }
         ],
     }

Reply via email to