This is an automated email from the ASF dual-hosted git repository.
Lee-W 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 c578603205b Fix conn-fields check crash for nested provider packages
(#70224)
c578603205b is described below
commit c578603205b73aedb6fde559adc2a72fabdafb51
Author: Wei Lee <[email protected]>
AuthorDate: Thu Jul 23 08:41:03 2026 +0800
Fix conn-fields check crash for nested provider packages (#70224)
---
providers/atlassian/jira/provider.yaml | 12 ++++++++++++
.../airflow/providers/atlassian/jira/get_provider_info.py | 7 +++++++
.../jira/src/airflow/providers/atlassian/jira/hooks/jira.py | 1 -
scripts/ci/prek/check_provider_yaml_files.py | 11 +++++++++--
scripts/ci/prek/common_prek_utils.py | 2 +-
5 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/providers/atlassian/jira/provider.yaml
b/providers/atlassian/jira/provider.yaml
index 904d3037609..239a4b06c15 100644
--- a/providers/atlassian/jira/provider.yaml
+++ b/providers/atlassian/jira/provider.yaml
@@ -83,6 +83,18 @@ connection-types:
- hook-class-name: airflow.providers.atlassian.jira.hooks.jira.JiraHook
hook-name: "JIRA"
connection-type: jira
+ conn-fields:
+ verify:
+ label: Verify SSL
+ schema:
+ type:
+ - boolean
+ - 'null'
+ default: true
+ ui-field-behaviour:
+ hidden-fields:
+ - schema
+ - extra
notifications:
- airflow.providers.atlassian.jira.notifications.jira.JiraNotifier
diff --git
a/providers/atlassian/jira/src/airflow/providers/atlassian/jira/get_provider_info.py
b/providers/atlassian/jira/src/airflow/providers/atlassian/jira/get_provider_info.py
index 4b36780e8fb..3a0937ca001 100644
---
a/providers/atlassian/jira/src/airflow/providers/atlassian/jira/get_provider_info.py
+++
b/providers/atlassian/jira/src/airflow/providers/atlassian/jira/get_provider_info.py
@@ -57,6 +57,13 @@ def get_provider_info():
"hook-class-name":
"airflow.providers.atlassian.jira.hooks.jira.JiraHook",
"hook-name": "JIRA",
"connection-type": "jira",
+ "conn-fields": {
+ "verify": {
+ "label": "Verify SSL",
+ "schema": {"type": ["boolean", "null"], "default":
True},
+ }
+ },
+ "ui-field-behaviour": {"hidden-fields": ["schema", "extra"]},
}
],
"notifications":
["airflow.providers.atlassian.jira.notifications.jira.JiraNotifier"],
diff --git
a/providers/atlassian/jira/src/airflow/providers/atlassian/jira/hooks/jira.py
b/providers/atlassian/jira/src/airflow/providers/atlassian/jira/hooks/jira.py
index ad053b896a8..e6ffad8cd64 100644
---
a/providers/atlassian/jira/src/airflow/providers/atlassian/jira/hooks/jira.py
+++
b/providers/atlassian/jira/src/airflow/providers/atlassian/jira/hooks/jira.py
@@ -112,7 +112,6 @@ class JiraHook(BaseHook):
"""Return custom UI field behaviour for Atlassian Jira Connection."""
return {
"hidden_fields": ["schema", "extra"],
- "relabeling": {},
}
diff --git a/scripts/ci/prek/check_provider_yaml_files.py
b/scripts/ci/prek/check_provider_yaml_files.py
index 1f50d20be96..3f3ec5183a5 100755
--- a/scripts/ci/prek/check_provider_yaml_files.py
+++ b/scripts/ci/prek/check_provider_yaml_files.py
@@ -27,6 +27,7 @@ import pathlib
import sys
from common_prek_utils import (
+ KNOWN_SECOND_LEVEL_PATHS,
initialize_breeze_prek,
run_command_via_breeze_run,
validate_cmd_result,
@@ -46,7 +47,10 @@ def _resolve_provider_yaml_files(raw_files: list[str]) ->
list[str]:
All paths are relative to the ``providers/`` directory, as supplied by
prek. The first path segment is the provider package name
- (e.g. ``samba/src/airflow/...`` → ``samba/provider.yaml``).
+ (e.g. ``samba/src/airflow/...`` → ``samba/provider.yaml``), except for
+ namespace packages in ``KNOWN_SECOND_LEVEL_PATHS`` (e.g. ``apache``,
+ ``common``), which nest an extra level (e.g.
+ ``apache/beam/src/airflow/...`` → ``apache/beam/provider.yaml``).
"""
result: set[str] = set()
for f in raw_files:
@@ -59,7 +63,10 @@ def _resolve_provider_yaml_files(raw_files: list[str]) ->
list[str]:
# e.g. samba/src/airflow/providers/samba/hooks/samba.py
parts = p.parts
if parts:
- result.add(f"{parts[0]}/provider.yaml")
+ if parts[0] in KNOWN_SECOND_LEVEL_PATHS and len(parts) > 1:
+ result.add(f"{parts[0]}/{parts[1]}/provider.yaml")
+ else:
+ result.add(f"{parts[0]}/provider.yaml")
return sorted(result)
diff --git a/scripts/ci/prek/common_prek_utils.py
b/scripts/ci/prek/common_prek_utils.py
index 5d50133906b..e316eb154ae 100644
--- a/scripts/ci/prek/common_prek_utils.py
+++ b/scripts/ci/prek/common_prek_utils.py
@@ -42,7 +42,7 @@ AIRFLOW_TASK_SDK_ROOT_PATH = AIRFLOW_ROOT_PATH / "task-sdk"
AIRFLOW_TASK_SDK_SOURCES_PATH = AIRFLOW_TASK_SDK_ROOT_PATH / "src"
# Here we should add the second level paths that we want to have sub-packages
in
-KNOWN_SECOND_LEVEL_PATHS = ["apache", "atlassian", "common", "cncf", "dbt",
"microsoft"]
+KNOWN_SECOND_LEVEL_PATHS = ["apache", "atlassian", "common", "cncf", "dbt",
"ibm", "microsoft"]
DEFAULT_PYTHON_MAJOR_MINOR_VERSION = "3.10"