This is an automated email from the ASF dual-hosted git repository.
potiuk 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 56090bd8e46 Migrate yandex connection UI metadata to YAML (#63506)
56090bd8e46 is described below
commit 56090bd8e466052c30e9a565197c2d4cfb8b81c8
Author: fat-catTW <[email protected]>
AuthorDate: Sat Mar 14 22:01:40 2026 +0800
Migrate yandex connection UI metadata to YAML (#63506)
---
providers/yandex/provider.yaml | 66 ++++++++++++++++++++++
.../airflow/providers/yandex/get_provider_info.py | 35 ++++++++++++
2 files changed, 101 insertions(+)
diff --git a/providers/yandex/provider.yaml b/providers/yandex/provider.yaml
index 11c3e24730b..fc22e70ca98 100644
--- a/providers/yandex/provider.yaml
+++ b/providers/yandex/provider.yaml
@@ -111,6 +111,72 @@ hooks:
connection-types:
- hook-class-name: airflow.providers.yandex.hooks.yandex.YandexCloudBaseHook
connection-type: yandexcloud
+ ui-field-behaviour:
+ hidden-fields:
+ - host
+ - schema
+ - login
+ - password
+ - port
+ - extra
+
+ conn-fields:
+ service_account_json:
+ label: Service account auth JSON
+ schema:
+ type:
+ - string
+ - "null"
+ format: password
+ description: >-
+ Service account auth JSON. Looks like {"id": "...",
+ "service_account_id": "...", "private_key": "..."}.
+ Will be used instead of OAuth token and SA JSON file path field if
specified.
+ service_account_json_path:
+ label: Service account auth JSON file path
+ schema:
+ type:
+ - string
+ - "null"
+ description: >-
+ Service account auth JSON file path. File content
+ looks like {"id": "...", "service_account_id": "...", "private_key":
"..."}.
+ Will be used instead of OAuth token if specified.
+ oauth:
+ label: OAuth Token
+ schema:
+ type:
+ - string
+ - "null"
+ format: password
+ description: >-
+ User account OAuth token. Either this or service account JSON must
be specified.
+ folder_id:
+ label: Default folder ID
+ schema:
+ type:
+ - string
+ - "null"
+ description: >-
+ Optional. If specified, this ID will be used by default when
creating nodes and clusters.
+ public_ssh_key:
+ label: Public SSH key
+ schema:
+ type:
+ - string
+ - "null"
+ description: >-
+ Optional. The key will be placed to
+ all created Compute nodes,
+ allowing you to have a root shell there.
+ endpoint:
+ label: API endpoint
+ schema:
+ type:
+ - string
+ - "null"
+ description: >-
+ Optional. Specify an API endpoint. Leave blank to use default.
secrets-backends:
- airflow.providers.yandex.secrets.lockbox.LockboxSecretBackend
diff --git a/providers/yandex/src/airflow/providers/yandex/get_provider_info.py
b/providers/yandex/src/airflow/providers/yandex/get_provider_info.py
index 279c9e7e563..94dea772e15 100644
--- a/providers/yandex/src/airflow/providers/yandex/get_provider_info.py
+++ b/providers/yandex/src/airflow/providers/yandex/get_provider_info.py
@@ -70,6 +70,41 @@ def get_provider_info():
{
"hook-class-name":
"airflow.providers.yandex.hooks.yandex.YandexCloudBaseHook",
"connection-type": "yandexcloud",
+ "ui-field-behaviour": {
+ "hidden-fields": ["host", "schema", "login", "password",
"port", "extra"]
+ },
+ "conn-fields": {
+ "service_account_json": {
+ "label": "Service account auth JSON",
+ "schema": {"type": ["string", "null"], "format":
"password"},
+ "description": 'Service account auth JSON. Looks like
{"id": "...", "service_account_id": "...", "private_key": "..."}. Will be used
instead of OAuth token and SA JSON file path field if specified.',
+ },
+ "service_account_json_path": {
+ "label": "Service account auth JSON file path",
+ "schema": {"type": ["string", "null"]},
+ "description": 'Service account auth JSON file path.
File content looks like {"id": "...", "service_account_id": "...",
"private_key": "..."}. Will be used instead of OAuth token if specified.',
+ },
+ "oauth": {
+ "label": "OAuth Token",
+ "schema": {"type": ["string", "null"], "format":
"password"},
+ "description": "User account OAuth token. Either this
or service account JSON must be specified.",
+ },
+ "folder_id": {
+ "label": "Default folder ID",
+ "schema": {"type": ["string", "null"]},
+ "description": "Optional. If specified, this ID will
be used by default when creating nodes and clusters.",
+ },
+ "public_ssh_key": {
+ "label": "Public SSH key",
+ "schema": {"type": ["string", "null"]},
+ "description": "Optional. The key will be placed to
all created Compute nodes,\n allowing you to have a root shell there.",
+ },
+ "endpoint": {
+ "label": "API endpoint",
+ "schema": {"type": ["string", "null"]},
+ "description": "Optional. Specify an API endpoint.
Leave blank to use default.",
+ },
+ },
}
],
"secrets-backends":
["airflow.providers.yandex.secrets.lockbox.LockboxSecretBackend"],