Skip to content

Conversation

@potiuk
Copy link
Member

@potiuk potiuk commented Jul 22, 2023


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

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.
@potiuk
Copy link
Member Author

potiuk commented Jul 22, 2023

Based on #32765 so only last commit counts.

setup.py Outdated
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate commit will clean up and move all three celery, kubernetes, dask out of here (and in the docs). They are not needed.

@potiuk
Copy link
Member Author

potiuk commented Jul 22, 2023

Closing and reopening one in Airflow Repo. This one changes some of the values that are taken from main branch (list of providers to build and list of default extras), so I need to make the PR from airflow repo, not from fork.

@potiuk potiuk closed this Jul 22, 2023
@potiuk potiuk deleted the create-dask-executor-provider branch November 17, 2023 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:CLI area:dev-tools area:plugins area:Scheduler including HA (high availability) scheduler area:Triggerer area:webserver Webserver related Issues provider:cncf-kubernetes Kubernetes (k8s) provider related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant