Skip to content

Commit 7dfd39b

Browse files
Migrate alibaba connection UI metadata to YAML (#62379)
1 parent 3ab2eb9 commit 7dfd39b

2 files changed

Lines changed: 77 additions & 0 deletions

File tree

providers/alibaba/provider.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,59 @@ connection-types:
127127
connection-type: adb_spark
128128
- hook-class-name: airflow.providers.alibaba.cloud.hooks.base_alibaba.AlibabaBaseHook
129129
connection-type: alibaba_cloud
130+
conn-fields:
131+
access_key_id:
132+
label: Access Key ID
133+
schema:
134+
type:
135+
- string
136+
- 'null'
137+
format: password
138+
access_key_secret:
139+
label: Access Key Secret
140+
schema:
141+
type:
142+
- string
143+
- 'null'
144+
format: password
130145
- hook-class-name: airflow.providers.alibaba.cloud.hooks.maxcompute.MaxComputeHook
131146
connection-type: maxcompute
147+
ui-field-behaviour:
148+
hidden-fields:
149+
- host
150+
- schema
151+
- login
152+
- password
153+
- port
154+
- extra
155+
relabeling: {}
156+
conn-fields:
157+
access_key_id:
158+
label: Access Key ID
159+
schema:
160+
type:
161+
- string
162+
- 'null'
163+
format: password
164+
access_key_secret:
165+
label: Access Key Secret
166+
schema:
167+
type:
168+
- string
169+
- 'null'
170+
format: password
171+
project:
172+
label: Project
173+
schema:
174+
type:
175+
- string
176+
- 'null'
177+
endpoint:
178+
label: Endpoint
179+
schema:
180+
type:
181+
- string
182+
- 'null'
132183

133184
logging:
134185
- airflow.providers.alibaba.cloud.log.oss_task_handler.OSSTaskHandler

providers/alibaba/src/airflow/providers/alibaba/get_provider_info.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,36 @@ def get_provider_info():
100100
{
101101
"hook-class-name": "airflow.providers.alibaba.cloud.hooks.base_alibaba.AlibabaBaseHook",
102102
"connection-type": "alibaba_cloud",
103+
"conn-fields": {
104+
"access_key_id": {
105+
"label": "Access Key ID",
106+
"schema": {"type": ["string", "null"], "format": "password"},
107+
},
108+
"access_key_secret": {
109+
"label": "Access Key Secret",
110+
"schema": {"type": ["string", "null"], "format": "password"},
111+
},
112+
},
103113
},
104114
{
105115
"hook-class-name": "airflow.providers.alibaba.cloud.hooks.maxcompute.MaxComputeHook",
106116
"connection-type": "maxcompute",
117+
"ui-field-behaviour": {
118+
"hidden-fields": ["host", "schema", "login", "password", "port", "extra"],
119+
"relabeling": {},
120+
},
121+
"conn-fields": {
122+
"access_key_id": {
123+
"label": "Access Key ID",
124+
"schema": {"type": ["string", "null"], "format": "password"},
125+
},
126+
"access_key_secret": {
127+
"label": "Access Key Secret",
128+
"schema": {"type": ["string", "null"], "format": "password"},
129+
},
130+
"project": {"label": "Project", "schema": {"type": ["string", "null"]}},
131+
"endpoint": {"label": "Endpoint", "schema": {"type": ["string", "null"]}},
132+
},
107133
},
108134
],
109135
"logging": ["airflow.providers.alibaba.cloud.log.oss_task_handler.OSSTaskHandler"],

0 commit comments

Comments
 (0)