Skip to content

Commit 6fede98

Browse files
committed
Installing non-editable airflow for constraint generation (#30050)
When we are generating constraints including released version of providers or "no providers" (which effectively means preinstalled version of providers only), we should use non-editable installation of airflow. Normally in CI, we have editable version of airflow and we install providers from sources, but this leads to skipping installation of the preinstalled providers (it is connected to the fact that we were earlier installing as editable and "sources only" and those packages are marked as required, which confuses newer version of pip. It prints that the preinstalled packages are installed, but it does not specify the version - apparently thinking the editable version of the install already contains them. Since our behaviour is pretty non-standard, this is not really a bug in pip, but it is a bug in our approach when we are adding providers for constraint generation. Rather than using editable installation when we add providers, we should use "regular" installation. This seems to remove the confusion and the preinstalled packages are also installed. (cherry picked from commit 05242e9)
1 parent 321d602 commit 6fede98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/in_container/_in_container_utils.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ function install_local_airflow_with_eager_upgrade() {
261261
# we add eager requirements to make sure to take into account limitations that will allow us to
262262
# install all providers
263263
# shellcheck disable=SC2086
264-
pip install -e ".${extras}" ${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS} \
264+
pip install ".${extras}" ${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS} \
265265
--upgrade --upgrade-strategy eager
266266
}
267267

@@ -290,7 +290,7 @@ function install_all_providers_from_pypi_with_eager_upgrade() {
290290
# Installing it with Airflow makes sure that the version of package that matches current
291291
# Airflow requirements will be used.
292292
# shellcheck disable=SC2086
293-
pip install -e ".[${NO_PROVIDERS_EXTRAS}]" "${packages_to_install[@]}" ${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS} \
293+
pip install ".[${NO_PROVIDERS_EXTRAS}]" "${packages_to_install[@]}" ${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS} \
294294
--upgrade --upgrade-strategy eager
295295

296296
}

0 commit comments

Comments
 (0)