Skip to content

Load hook metadata from YAML without importing Hook class#63826

Open
yuseok89 wants to merge 7 commits intoapache:mainfrom
yuseok89:hook-meta-load-from-yaml
Open

Load hook metadata from YAML without importing Hook class#63826
yuseok89 wants to merge 7 commits intoapache:mainfrom
yuseok89:hook-meta-load-from-yaml

Conversation

@yuseok89
Copy link
Contributor

@yuseok89 yuseok89 commented Mar 17, 2026

Closes: #61815

Loading the Connection Add page is slow on the first uncached request because hook_meta_data() imports Hook classes for every connection type. With 129+ providers, this cost becomes significant before the response can be cached.

This PR changes the GET /ui/connections/hook_meta response so it no longer imports Hook classes and instead uses only the metadata from provider.yaml via _load_ui_metadata(). This was made possible by @amoghrajesh 's provider.yaml migration, which moved connection UI metadata into YAML.

In this change, hook-name is added to connection-types in provider.yaml for display in the connection type dropdown (falls back to connection_type when absent).

Before

Screen.Recording.2026-02-12.at.9.34.40.PM.mov

After

Screen.Recording.2026-03-18.at.11.04.44.PM.mov

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

  • 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.

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Load connection type metadata on-demand to improve Add Connection page load time

1 participant