Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce decorator to load providers configuration (#32765)
A number of commands in Airflow relies on the fact that providers configuration is loaded. This is a rather fast operation as it does not involve any importing of provider classes, just discovering entrypoints, running them and parsing yaml configuration, so it is a very low sub-second time to do it. We cannot do it once in settings/config because we actually need settings/config to be pre-initialized without providers in order to be able to bootstrap airflow, therefore we need to run it individually in each command that can be run with the "airflow" entrypoint. Decorator seems to be best suited to do the job: * easy to apply and not easy to forget when you create another command and look at other commands * nicely wraps around local ProvidersManager import There are exceptions for the "version" and "providers lazy-loaded" commands because they are NOT supposed to initialize configuration of providers.
- Loading branch information
Showing
33 changed files
with
250 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.