-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Behaviour to install all airflow providers added #11529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behaviour to install all airflow providers added #11529
Conversation
d65aff7 to
295bfc3
Compare
|
Hey @ashb @kaxil @turbaszek, others. I looked how to solve the installation problem described in #11489 and failing Kubernetes builds (caused likely by the provider split) and I believe i found the best approach. I think we want to keep this:
The proposal I have is a variable INSTALL_PROVIDERS_FROM_SOURCES. When this flag is "true", airflow will install providers from sources, when it is missing or anything else but "true", it will install only airflow core. By default in Breeze and when building images from sources I set this variable to "true" (but it can be set to false by --skip-installing-airflow-providers flag so that you can also install a "bare" airflow in Breeze or prepare a "bare" image without any providers easily. Together with in-progess #11464 (I will have to add conditional dependencies there and rebase on top of this) it will have exactly the desired effect:
I tested all the above scenarios and I think it makes perfect sense. Let me know what you think. |
|
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
kaxil
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestions left
429530f to
f4a2aa4
Compare
|
All resolved @kaxil! |
f4a2aa4 to
6730b9c
Compare
|
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks$,^Build docs$,^Spell check docs$,^Backport packages$,^Checks: Helm tests$,^Test OpenAPI*. |
6730b9c to
4bdb570
Compare
In Airflow 2.0 we decided to split Airlow into separate providers. this means that when you prepare core airflow package, providers are not installed by default. This is not very convenient for local development though and for docker images built from sources, where you would like to install all providers by default. A new INSTALL_ALL_AIRFLOW_PROVIDERS environment variable controls this behaviour now. It is is set to "true", all packages including provider packages are installed. If missing or set to false, only the core provider package is installed. For Breeze, the default is set to "true", as for those cases you want to install all providers in your environment. Similarly if you build the production image from sources. However when you build image using github tag or pip package, you should specify appropriate extras to install the required provider packages. Note that if you install Airflow via 'pip install .' from sources in local virtualenv, provider packages are not going to be installed unless you set INSTALL_ALL_AIRFLOW_PROVIDERS to "true". Fixes apache#11489
4bdb570 to
a46fac6
Compare
There was a typo in the original file when review was made in the apache#11529 but apparently this typo was still left in one place and as the result, providers have not been installed in the master Dockerfile. Fixes apache#11695
There was a typo in the original file when review was made in the apache#11529 but apparently this typo was still left in one place and as the result, providers have not been installed in the master Dockerfile. Fixes apache#11695
There was a typo in the original file when review was made in the apache#11529 but apparently this typo was still left in one place and as the result, providers have not been installed in the master Dockerfile. Fixes apache#11695 (cherry picked from commit eba1d91)
In Airflow 2.0 we decided to split Airlow into separate providers.
this means that when you prepare core airflow package, providers
are not installed by default. This is not very convenient for
local development though and for docker images built from sources,
where you would like to install all providers by default.
A new INSTALL_PROVIDERS_FROM_SOURCES environment variable controls
this behaviour now. It is is set to "true", all packages including
provider packages are installed. If missing or set to false, only
the core provider package is installed.
For Breeze, the default is set to "true", as for those cases you
want to install all providers in your environment. Similarly if you
build the production image from sources. However when you build
image using github tag or pip package, you should specify
appropriate extras to install the required provider packages.
Note that if you install Airflow via 'pip install .' from sources
in local virtualenv, provider packages are not going to be
installed unless you set INSTALL_PROVIDERS_FROM_SOURCES to "true".
Fixes #11489
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.