Eager upgrade works also in editable mode. (#13589)

The recent change #13409 introduced common installation script
but one case turned out to be not working. Installing Airflow
in editable mode with eager upgrade fails on building production
image (the CI image effectively did not have airflow installed
in editable mode, which it should).

This PR fixes that.
This commit is contained in:
Jarek Potiuk 2021-01-09 20:00:24 +01:00 коммит произвёл GitHub
Родитель 809ddcda73
Коммит 543194d015
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -56,6 +56,13 @@ function install_airflow() {
pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade --upgrade-strategy eager \
"${AIRFLOW_INSTALLATION_METHOD}[${AIRFLOW_EXTRAS}]${AIRFLOW_INSTALL_VERSION}" \
${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS}
if [[ ${AIRFLOW_INSTALL_EDITABLE_FLAG} != "" ]]; then
# Remove airflow and reinstall it using editable flag
# We can only do it when we install airflow from sources
pip uninstall apache-airflow --yes
pip install ${AIRFLOW_INSTALL_EDITABLE_FLAG} \
"${AIRFLOW_INSTALLATION_METHOD}[${AIRFLOW_EXTRAS}]${AIRFLOW_INSTALL_VERSION}"
fi
# make sure correct PIP version is used
pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip==${AIRFLOW_PIP_VERSION}"
pip check || ${CONTINUE_ON_PIP_CHECK_FAILURE}