You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2021/01/09 19:00:35 UTC

[airflow] branch master updated: Eager upgrade works also in editable mode. (#13589)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new 543194d  Eager upgrade works also in editable mode. (#13589)
543194d is described below

commit 543194d015a0446c6fdb6125e14522e85c954b41
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Sat Jan 9 20:00:24 2021 +0100

    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.
---
 scripts/docker/install_airflow.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/scripts/docker/install_airflow.sh b/scripts/docker/install_airflow.sh
index e00ba56..ae50955 100755
--- a/scripts/docker/install_airflow.sh
+++ b/scripts/docker/install_airflow.sh
@@ -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}