Skip to content

Flag conn-fields in hook but absent from provider.yaml in static checks#69655

Open
dabla wants to merge 2 commits into
apache:mainfrom
dabla:feature/add-static-check-conn-fields-provider-yaml
Open

Flag conn-fields in hook but absent from provider.yaml in static checks#69655
dabla wants to merge 2 commits into
apache:mainfrom
dabla:feature/add-static-check-conn-fields-provider-yaml

Conversation

@dabla

@dabla dabla commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

The check_conn_fields_match_form_widgets static check introduced in #69473
only validated one direction: stale keys declared in conn-fields (YAML) that no
longer exist in get_connection_form_widgets(). It did not catch the opposite
case — a field added to the hook's form widgets but forgotten in conn-fields
which means the field silently disappears from the new React connection UI.

PR #64643 (Samba auth_protocol) exposed this gap: auth_protocol was added to
get_connection_form_widgets() but not to conn-fields in provider.yaml, and
the check passed without complaint.

The fix makes the check bidirectional: when conn-fields is declared, its keys
must exactly match the hook's widget keys. Both directions are now reported as
errors with distinct fix hints. The "no conn-fields at all" case is still
silently skipped (opting out of the React UI form is intentional).


Was generative AI tooling used to co-author this PR?
  • [ x ] Yes (please specify the tool below)

Claude Sonnet 4.6


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@potiuk potiuk force-pushed the feature/add-static-check-conn-fields-provider-yaml branch from d67b4c8 to 2107311 Compare July 9, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant