This is an automated email from the ASF dual-hosted git repository. kaxilnaik pushed a commit to branch v1-10-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit b2e3e2cee27664f6528492b57270e837c4f83e34 Author: Jarek Potiuk <[email protected]> AuthorDate: Tue Dec 1 17:39:55 2020 +0100 Pins PIP to 20.2.4 in our Dockerfiles (#12738) Until we make sure that the new resolver in PIP 20.3 works we should pin PIP to 20.2.4. This is hopefully a temporary measure. Part of #12737 (cherry picked from commit 0451d84ea2409c7b091640f52c25ac9a0bb2505f) --- Dockerfile | 12 ++++++++++++ Dockerfile.ci | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/Dockerfile b/Dockerfile index 9b96cfa..35f50b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,6 +47,8 @@ ARG CASS_DRIVER_BUILD_CONCURRENCY="8" ARG PYTHON_BASE_IMAGE="python:3.6-slim-buster" ARG PYTHON_MAJOR_MINOR_VERSION="3.6" +ARG PIP_VERSION=20.2.4 + ############################################################################################## # This is the build image where we build all dependencies ############################################################################################## @@ -59,6 +61,9 @@ ENV PYTHON_BASE_IMAGE=${PYTHON_BASE_IMAGE} ARG PYTHON_MAJOR_MINOR_VERSION ENV PYTHON_MAJOR_MINOR_VERSION=${PYTHON_MAJOR_MINOR_VERSION} +ARG PIP_VERSION +ENV PIP_VERSION=${PIP_VERSION} + # Make sure noninteractive debian install is used and language variables set ENV DEBIAN_FRONTEND=noninteractive LANGUAGE=C.UTF-8 LANG=C.UTF-8 LC_ALL=C.UTF-8 \ LC_CTYPE=C.UTF-8 LC_MESSAGES=C.UTF-8 @@ -168,6 +173,8 @@ RUN if [[ -f /docker-context-files/.pypirc ]]; then \ cp /docker-context-files/.pypirc /root/.pypirc; \ fi +RUN pip install --upgrade "pip==${PIP_VERSION}" + # In case of Production build image segment we want to pre-install master version of airflow # dependencies from GitHub so that we do not have to always reinstall it from the scratch. RUN if [[ ${AIRFLOW_PRE_CACHED_PIP_PACKAGES} == "true" ]]; then \ @@ -295,6 +302,9 @@ ENV AIRFLOW_VERSION=${AIRFLOW_VERSION} ENV DEBIAN_FRONTEND=noninteractive LANGUAGE=C.UTF-8 LANG=C.UTF-8 LC_ALL=C.UTF-8 \ LC_CTYPE=C.UTF-8 LC_MESSAGES=C.UTF-8 +ARG PIP_VERSION +ENV PIP_VERSION=${PIP_VERSION} + # Install curl and gnupg2 - needed for many other installation steps RUN apt-get update \ && apt-get install -y --no-install-recommends \ @@ -395,6 +405,8 @@ COPY --chown=airflow:root scripts/in_container/prod/entrypoint_prod.sh /entrypoi COPY --chown=airflow:root scripts/in_container/prod/clean-logs.sh /clean-logs RUN chmod a+x /entrypoint /clean-logs +RUN pip install --upgrade "pip==${PIP_VERSION}" + # Make /etc/passwd root-group-writeable so that user can be dynamically added by OpenShift # See https://github.com/apache/airflow/issues/9248 RUN chmod g=u /etc/passwd diff --git a/Dockerfile.ci b/Dockerfile.ci index cac73bb..c71fae6 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -29,6 +29,9 @@ ENV AIRFLOW_VERSION=$AIRFLOW_VERSION ARG PYTHON_MAJOR_MINOR_VERSION="3.6" ENV PYTHON_MAJOR_MINOR_VERSION=${PYTHON_MAJOR_MINOR_VERSION} +ARG PIP_VERSION=20.2.4 +ENV PIP_VERSION=${PIP_VERSION} + # Print versions RUN echo "Base image: ${PYTHON_BASE_IMAGE}" RUN echo "Airflow version: ${AIRFLOW_VERSION}" @@ -262,6 +265,8 @@ ENV AIRFLOW_LOCAL_PIP_WHEELS=${AIRFLOW_LOCAL_PIP_WHEELS} ARG INSTALL_AIRFLOW_VIA_PIP="true" ENV INSTALL_AIRFLOW_VIA_PIP=${INSTALL_AIRFLOW_VIA_PIP} +RUN pip install --upgrade "pip==${PIP_VERSION}" + # In case of CI builds we want to pre-install master version of airflow dependencies so that # We do not have to always reinstall it from the scratch. # This can be reinstalled from latest master by increasing PIP_DEPENDENCIES_EPOCH_NUMBER.
