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

potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit cf3babaa498179c2374cd2529cc7b82431dd09fe
Author: Kaxil Naik <[email protected]>
AuthorDate: Wed Nov 25 07:43:47 2020 +0000

    Use AIRFLOW_CONSTRAINTS_LOCATION when passed during docker build (#12604)
    
    Previously, even though this was passed during docker build it was
    ignored. This commit fixes it
    
    (cherry picked from commit c457c975b885469f09ef2e4c8d1f5836798bc820)
---
 Dockerfile    | 2 +-
 Dockerfile.ci | 9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 00442bc..9b96cfa 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -176,7 +176,7 @@ RUN if [[ ${AIRFLOW_PRE_CACHED_PIP_PACKAGES} == "true" ]]; 
then \
        fi; \
        pip install --user \
           
"https://github.com/${AIRFLOW_REPO}/archive/${AIRFLOW_BRANCH}.tar.gz#egg=apache-airflow[${AIRFLOW_EXTRAS}]";
 \
-          --constraint 
"https://raw.githubusercontent.com/apache/airflow/${AIRFLOW_CONSTRAINTS_REFERENCE}/constraints-${PYTHON_MAJOR_MINOR_VERSION}.txt";
 \
+          --constraint "${AIRFLOW_CONSTRAINTS_LOCATION}" \
           && pip uninstall --yes apache-airflow; \
     fi
 
diff --git a/Dockerfile.ci b/Dockerfile.ci
index ac51a56..cac73bb 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -245,8 +245,8 @@ ENV 
AIRFLOW_EXTRAS=${AIRFLOW_EXTRAS}${ADDITIONAL_AIRFLOW_EXTRAS:+,}${ADDITIONAL_
 RUN echo "Installing with extras: ${AIRFLOW_EXTRAS}."
 
 ARG AIRFLOW_CONSTRAINTS_REFERENCE="constraints-master"
-ARG 
AIRFLOW_CONSTRAINTS_URL="https://raw.githubusercontent.com/apache/airflow/${AIRFLOW_CONSTRAINTS_REFERENCE}/constraints-${PYTHON_MAJOR_MINOR_VERSION}.txt";
-ENV AIRFLOW_CONSTRAINTS_URL=${AIRFLOW_CONSTRAINTS_URL}
+ARG 
AIRFLOW_CONSTRAINTS_LOCATION="https://raw.githubusercontent.com/apache/airflow/${AIRFLOW_CONSTRAINTS_REFERENCE}/constraints-${PYTHON_MAJOR_MINOR_VERSION}.txt";
+ENV AIRFLOW_CONSTRAINTS_LOCATION=${AIRFLOW_CONSTRAINTS_LOCATION}
 
 # By changing the CI build epoch we can force reinstalling Airflow from the 
current master
 # It can also be overwritten manually by setting the AIRFLOW_CI_BUILD_EPOCH 
environment variable.
@@ -269,11 +269,10 @@ ENV INSTALL_AIRFLOW_VIA_PIP=${INSTALL_AIRFLOW_VIA_PIP}
 RUN if [[ ${AIRFLOW_PRE_CACHED_PIP_PACKAGES} == "true" ]]; then \
         pip install \
             
"https://github.com/${AIRFLOW_REPO}/archive/${AIRFLOW_BRANCH}.tar.gz#egg=apache-airflow[${AIRFLOW_EXTRAS}]";
 \
-                --constraint 
"https://raw.githubusercontent.com/apache/airflow/${AIRFLOW_CONSTRAINTS_REFERENCE}/constraints-${PYTHON_MAJOR_MINOR_VERSION}.txt";
 \
+                --constraint "${AIRFLOW_CONSTRAINTS_LOCATION}" \
                 && pip uninstall --yes apache-airflow; \
     fi
 
-
 # Generate random hex dump file so that we can determine whether it's faster 
to rebuild the image
 # using current cache (when our dump is the same as the remote onb) or better 
to pull
 # the new image (when it is different)
@@ -341,7 +340,7 @@ COPY scripts/in_container/entrypoint_ci.sh /entrypoint
 RUN chmod a+x /entrypoint
 
 # We can copy everything here. The Context is filtered by dockerignore. This 
makes sure we are not
-# copying over stuff that is accidentally generated or that we do not need 
(such as .egginfo)
+# copying over stuff that is accidentally generated or that we do not need 
(such as egg-info)
 # if you want to add something that is missing and you expect to see it in the 
image you can
 # add it with ! in .dockerignore next to the airflow, test etc. directories 
there
 COPY . ${AIRFLOW_SOURCES}/

Reply via email to