Flag conn-fields in hook but absent from provider.yaml in static checks#69655
Conversation
d67b4c8 to
2107311
Compare
d156316 to
5dab8c9
Compare
… Azure and Snowflake providers so those are in sync with defined fields in get_connection_form_widgets method of corresponding hook
581f42f to
19686cc
Compare
|
Quickest fix: git fetch upstream main && git rebase upstream/main
rm uv.lock && uv lock
git add uv.lock && git rebase --continue
git push --force-with-leaseAutomated nudge — ignore if you're not ready to rebase. This comment is updated in place on future |
jason810496
left a comment
There was a problem hiding this comment.
LGTM once the CI pass, thanks.
…r-yaml # Conflicts: # uv.lock
Backport failed to create: v3-3-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker 58b5a80 v3-3-testThis should apply the commit to the v3-3-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
…ks (apache#69655) * Flag conn-fields in hook but absent from provider.yaml * Added missing conn-fields in provider.yaml of Hive, Google, Azure and Snowflake providers so those are in sync with defined fields in get_connection_form_widgets method of corresponding hook * Added cloud_environment in provider.yaml for AzureBaseHook * Fixed addition of cloud_environment in get_provider_info --------- Co-authored-by: BKD7702 <bkd7702@infrabel.be> (cherry picked from commit 58b5a80)
…ks (apache#69655) * Flag conn-fields in hook but absent from provider.yaml * Added missing conn-fields in provider.yaml of Hive, Google, Azure and Snowflake providers so those are in sync with defined fields in get_connection_form_widgets method of corresponding hook * Added cloud_environment in provider.yaml for AzureBaseHook * Fixed addition of cloud_environment in get_provider_info --------- Co-authored-by: BKD7702 <bkd7702@infrabel.be> (cherry picked from commit 58b5a80)
…ks (#69655) (#69996) * Flag conn-fields in hook but absent from provider.yaml * Added missing conn-fields in provider.yaml of Hive, Google, Azure and Snowflake providers so those are in sync with defined fields in get_connection_form_widgets method of corresponding hook * Added cloud_environment in provider.yaml for AzureBaseHook * Fixed addition of cloud_environment in get_provider_info --------- Co-authored-by: BKD7702 <bkd7702@infrabel.be> (cherry picked from commit 58b5a80)
|
Backport to v3-3-test succeeded via PR #69996 . |
…elogs The Airflow 3 API server builds the connection form from provider metadata rather than by importing hooks, so adding these fields to provider.yaml is what makes them appear in the UI at all. Hive connections gain Ssl and Zoo Keeper Namespace, Azure gains Azure Cloud Environment, and Google and Snowflake gain fields of their own. Excluding the change hid a visible one from users.
The
check_conn_fields_match_form_widgetsstatic check introduced in #69473only validated one direction: stale keys declared in
conn-fields(YAML) that nolonger exist in
get_connection_form_widgets(). It did not catch the oppositecase — 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_protocolwas added toget_connection_form_widgets()but not toconn-fieldsinprovider.yaml, andthe check passed without complaint.
The fix makes the check bidirectional: when
conn-fieldsis declared, its keysmust exactly match the hook's widget keys. Both directions are now reported as
errors with distinct fix hints. The "no
conn-fieldsat all" case is stillsilently skipped (opting out of the React UI form is intentional).
Was generative AI tooling used to co-author this PR?
Claude Sonnet 4.6
{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.