Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions providers/atlassian/jira/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ def get_ui_field_behaviour(cls) -> dict[str, Any]:
"""Return custom UI field behaviour for Atlassian Jira Connection."""
return {
"hidden_fields": ["schema", "extra"],
"relabeling": {},
}


Expand Down
11 changes: 9 additions & 2 deletions scripts/ci/prek/check_provider_yaml_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import sys

from common_prek_utils import (
KNOWN_SECOND_LEVEL_PATHS,
initialize_breeze_prek,
run_command_via_breeze_run,
validate_cmd_result,
Expand All @@ -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:
Expand All @@ -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:
Comment thread
Lee-W marked this conversation as resolved.
result.add(f"{parts[0]}/{parts[1]}/provider.yaml")
else:
result.add(f"{parts[0]}/provider.yaml")
return sorted(result)


Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/prek/common_prek_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
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"

Expand Down