You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SPIKE] Work out a way for API server to load providers declaratively #60404
Right now, API server loads all provider code just for UI metadata(static data), the intention I have in mind is that API server can start without loading provider code for connections, hooks etc
To do this, I am exploring some options where UI metadata comes from static sources like yaml.
Committer
I acknowledge that I am a maintainer/committer of the Apache Airflow project.
The static YAML approach also makes sense to me! Even if we go with the static YAML approach, I think we still require providers’ pip dependencies on the API server, and it is unavoidable to call ProviderManager for the end-to-end process.
Which should significantly reduce the loading time as we just import some dicts via ProviderManager.
Maybe, yes, but trying to have a declarative way instead. This would require loading python code provided by users, which could also pose a security risk for example. As of today, nothing can stop a user from writing some malicious code in get_ui_field_behaviour
The static YAML approach also makes sense to me! Even if we go with the static YAML approach, I think we still require providers’ pip dependencies on the API server, and it is unavoidable to call ProviderManager for the end-to-end process.
Right now yes, but I am proposing a change soon on that which will let API server read connection schemas truly from yaml without having the provider installed at all. A peek into the solution would be something along the lines of having pre packaged bundles for provider.yml in api server
Activity
amoghrajesh commentedon Feb 12, 2026
This is being worked on by: #60410
jason810496 commentedon Feb 12, 2026
Or another approach, similar to how we introduced a cli section in the provider metadata: #59805
We could separate the UI metadata into a new, clean module.
For example, if you search for
cli/definition.py, that’s where all the provider‑level CLI definitions live. Then we could still use the existing ProviderManager approach (loading objects via importlib.metadata). For community providers, we could add aprekto avoid importing heavy modules in the new UI metadata module, as shown here: https://github.com/apache/airflow/pull/59805/changes#diff-832133982e269231a55df6a2e72b5ac560f7b828b38b3cff2b904c0d96405ab1R145Which should significantly reduce the loading time as we just import some dicts via ProviderManager.
jason810496 commentedon Feb 12, 2026
The static YAML approach also makes sense to me! Even if we go with the static YAML approach, I think we still require providers’ pip dependencies on the API server, and it is unavoidable to call ProviderManager for the end-to-end process.
amoghrajesh commentedon Feb 13, 2026
Maybe, yes, but trying to have a declarative way instead. This would require loading python code provided by users, which could also pose a security risk for example. As of today, nothing can stop a user from writing some malicious code in
get_ui_field_behaviouramoghrajesh commentedon Feb 13, 2026
Right now yes, but I am proposing a change soon on that which will let API server read connection schemas truly from yaml without having the provider installed at all. A peek into the solution would be something along the lines of having pre packaged bundles for provider.yml in api server
potiuk commentedon Feb 15, 2026
I think best solution will be to let providers store their configuration in the database (via task-sdk) at startup.