From f380e6ab030251eacf8b77dab0494e93b35c0687 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Mon, 22 Feb 2021 23:18:51 +0100 Subject: [PATCH] Use latest Pip version when building image. The initial problem with the new PIP resolved in 20.3 version have been successfully solved. Seems that version 21.* is much more stable and actually works in all cases, so we are switching back to it. Also changed pip and wheel dependencies to ~= (compatible) version hoping that the experience of backwards incomptible release in major version update have been adopted by the PIP team with 21* series release. Closes #12838 --- CONTRIBUTING.rst | 24 ++++--------------- CONTRIBUTORS_QUICK_START.rst | 12 ++-------- Dockerfile | 2 +- Dockerfile.ci | 2 +- IMAGES.rst | 14 +++-------- INSTALL | 8 ------- LOCAL_VIRTUALENV.rst | 24 ++++--------------- README.md | 15 +++--------- UPDATING.md | 9 ------- airflow/providers/apache/beam/README.md | 8 ------- .../PROVIDER_INDEX_TEMPLATE.rst.jinja2 | 9 ------- .../PROVIDER_README_TEMPLATE.rst.jinja2 | 8 ------- .../index.rst | 18 -------------- .../apache-airflow-providers-amazon/index.rst | 9 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../apache-airflow-providers-celery/index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 9 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../apache-airflow-providers-docker/index.rst | 8 ------- .../index.rst | 8 ------- .../apache-airflow-providers-exasol/index.rst | 8 ------- .../index.rst | 8 ------- docs/apache-airflow-providers-ftp/index.rst | 8 ------- .../apache-airflow-providers-google/index.rst | 8 ------- docs/apache-airflow-providers-grpc/index.rst | 8 ------- .../index.rst | 8 ------- docs/apache-airflow-providers-http/index.rst | 8 ------- docs/apache-airflow-providers-imap/index.rst | 8 ------- docs/apache-airflow-providers-jdbc/index.rst | 8 ------- .../index.rst | 8 ------- docs/apache-airflow-providers-jira/index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- docs/apache-airflow-providers-mongo/index.rst | 8 ------- docs/apache-airflow-providers-mysql/index.rst | 8 ------- docs/apache-airflow-providers-neo4j/index.rst | 8 ------- docs/apache-airflow-providers-odbc/index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../apache-airflow-providers-oracle/index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../apache-airflow-providers-plexus/index.rst | 8 ------- .../index.rst | 8 ------- .../apache-airflow-providers-presto/index.rst | 8 ------- .../apache-airflow-providers-qubole/index.rst | 8 ------- docs/apache-airflow-providers-redis/index.rst | 8 ------- .../index.rst | 8 ------- docs/apache-airflow-providers-samba/index.rst | 8 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- docs/apache-airflow-providers-sftp/index.rst | 8 ------- .../index.rst | 8 ------- docs/apache-airflow-providers-slack/index.rst | 8 ------- .../index.rst | 8 ------- .../apache-airflow-providers-sqlite/index.rst | 8 ------- docs/apache-airflow-providers-ssh/index.rst | 8 ------- .../index.rst | 9 ------- .../index.rst | 8 ------- .../index.rst | 8 ------- .../apache-airflow-providers-yandex/index.rst | 8 ------- .../index.rst | 8 ------- docs/apache-airflow/installation.rst | 5 ---- docs/apache-airflow/start/local.rst | 11 ++------- docs/apache-airflow/upgrade-check.rst | 12 ++-------- docs/docker-stack/build-arg-ref.rst | 2 +- .../ci/kubernetes/ci_run_kubernetes_tests.sh | 2 +- .../ci/libraries/_build_airflow_packages.sh | 2 +- scripts/ci/libraries/_initialization.sh | 2 +- .../docker/install_additional_dependencies.sh | 4 ++-- scripts/docker/install_airflow.sh | 6 ++--- .../docker/install_airflow_from_branch_tip.sh | 2 +- .../install_from_docker_context_files.sh | 8 +++---- scripts/in_container/_in_container_utils.sh | 2 +- 89 files changed, 37 insertions(+), 689 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index bb4270f3aeddc..83ef014fb596f 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -553,17 +553,9 @@ Airflow dependencies .. note:: - On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver - might work with Apache Airflow as of 20.3.3, but it might lead to errors in installation. It might - depend on your choice of extras. In order to install Airflow you might need to either downgrade - pip to version 20.2.4 ``pip install --upgrade pip==20.2.4`` or, in case you use Pip 20.3, - you need to add option ``--use-deprecated legacy-resolver`` to your pip install command. + The official way of installing Airflow is with the ``pip`` tool. - While ``pip 20.3.3`` solved most of the ``teething`` problems of 20.3, this note will remain here until we - set ``pip 20.3`` as official version in our CI pipeline where we are testing the installation as well. - Due to those constraints, only ``pip`` installation is currently officially supported. - - While they are some successes with using other tools like `poetry `_ or + While there are some successes with using other tools like `poetry `_ or `pip-tools `_, they do not share the same workflow as ``pip`` - especially when it comes to constraint vs. requirements management. Installing via ``Poetry`` or ``pip-tools`` is not currently supported. @@ -788,17 +780,9 @@ Pinned constraint files .. note:: - On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver - might work with Apache Airflow as of 20.3.3, but it might lead to errors in installation. It might - depend on your choice of extras. In order to install Airflow you might need to either downgrade - pip to version 20.2.4 ``pip install --upgrade pip==20.2.4`` or, in case you use Pip 20.3, - you need to add option ``--use-deprecated legacy-resolver`` to your pip install command. - - While ``pip 20.3.3`` solved most of the ``teething`` problems of 20.3, this note will remain here until we - set ``pip 20.3`` as official version in our CI pipeline where we are testing the installation as well. - Due to those constraints, only ``pip`` installation is currently officially supported. + The official way of installing Airflow is with the ``pip`` tool. - While they are some successes with using other tools like `poetry `_ or + While there are some successes with using other tools like `poetry `_ or `pip-tools `_, they do not share the same workflow as ``pip`` - especially when it comes to constraint vs. requirements management. Installing via ``Poetry`` or ``pip-tools`` is not currently supported. diff --git a/CONTRIBUTORS_QUICK_START.rst b/CONTRIBUTORS_QUICK_START.rst index caa9014eeb164..832394655f4eb 100644 --- a/CONTRIBUTORS_QUICK_START.rst +++ b/CONTRIBUTORS_QUICK_START.rst @@ -167,17 +167,9 @@ Setup Airflow with Breeze and PyCharm .. note:: - On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver - might work with Apache Airflow as of 20.3.3, but it might lead to errors in installation. It might - depend on your choice of extras. In order to install Airflow you might need to either downgrade - pip to version 20.2.4 ``pip install --upgrade pip==20.2.4`` or, in case you use Pip 20.3, - you need to add option ``--use-deprecated legacy-resolver`` to your pip install command. + The official way of installing Airflow is with the ``pip`` tool. - While ``pip 20.3.3`` solved most of the ``teething`` problems of 20.3, this note will remain here until we - set ``pip 20.3`` as official version in our CI pipeline where we are testing the installation as well. - Due to those constraints, only ``pip`` installation is currently officially supported. - - While they are some successes with using other tools like `poetry `_ or + While there are some successes with using other tools like `poetry `_ or `pip-tools `_, they do not share the same workflow as ``pip`` - especially when it comes to constraint vs. requirements management. Installing via ``Poetry`` or ``pip-tools`` is not currently supported. diff --git a/Dockerfile b/Dockerfile index 5f8e666b39726..f1803d2fc7a31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,7 +46,7 @@ ARG CASS_DRIVER_BUILD_CONCURRENCY="8" ARG PYTHON_BASE_IMAGE="python:3.6-slim-buster" -ARG AIRFLOW_PIP_VERSION=20.2.4 +ARG AIRFLOW_PIP_VERSION=21.0.1 # By default PIP has progress bar but you can disable it. ARG PIP_PROGRESS_BAR="on" diff --git a/Dockerfile.ci b/Dockerfile.ci index 02a43254e1bac..b369fd89e7168 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -266,7 +266,7 @@ ENV INSTALL_FROM_DOCKER_CONTEXT_FILES=${INSTALL_FROM_DOCKER_CONTEXT_FILES} ARG INSTALL_FROM_PYPI="true" ENV INSTALL_FROM_PYPI=${INSTALL_FROM_PYPI} -ARG AIRFLOW_PIP_VERSION=20.2.4 +ARG AIRFLOW_PIP_VERSION=21.0.1 ENV AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION} # In the CI image we always: diff --git a/IMAGES.rst b/IMAGES.rst index c00067fa067e1..caf53aac60b67 100644 --- a/IMAGES.rst +++ b/IMAGES.rst @@ -122,17 +122,9 @@ parameter to Breeze: .. note:: - On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver - might work with Apache Airflow as of 20.3.3, but it might lead to errors in installation. It might - depend on your choice of extras. In order to install Airflow you might need to either downgrade - pip to version 20.2.4 ``pip install --upgrade pip==20.2.4`` or, in case you use Pip 20.3, - you need to add option ``--use-deprecated legacy-resolver`` to your pip install command. + The official way of installing Airflow is with the ``pip`` tool. - While ``pip 20.3.3`` solved most of the ``teething`` problems of 20.3, this note will remain here until we - set ``pip 20.3`` as official version in our CI pipeline where we are testing the installation as well. - Due to those constraints, only ``pip`` installation is currently officially supported. - - While they are some successes with using other tools like `poetry `_ or + While there are some successes with using other tools like `poetry `_ or `pip-tools `_, they do not share the same workflow as ``pip`` - especially when it comes to constraint vs. requirements management. Installing via ``Poetry`` or ``pip-tools`` is not currently supported. @@ -673,7 +665,7 @@ The following build arguments (``--build-arg`` in docker build command) can be u | ``ADDITIONAL_RUNTIME_APT_ENV`` | | Additional env variables defined | | | | when installing runtime deps | +------------------------------------------+------------------------------------------+------------------------------------------+ -| ``AIRFLOW_PIP_VERSION`` | ``20.2.4`` | PIP version used. | +| ``AIRFLOW_PIP_VERSION`` | ``21.0.1`` | PIP version used. | +------------------------------------------+------------------------------------------+------------------------------------------+ | ``PIP_PROGRESS_BAR`` | ``on`` | Progress bar for PIP installation | +------------------------------------------+------------------------------------------+------------------------------------------+ diff --git a/INSTALL b/INSTALL index eeab5583f04af..6ccee519142da 100644 --- a/INSTALL +++ b/INSTALL @@ -28,14 +28,6 @@ java -jar apache-rat.jar -E ./.rat-excludes -d . python3 -m venv PATH_TO_YOUR_VENV source PATH_TO_YOUR_VENV/bin/activate -NOTE!! - -On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver -does not yet work with Apache Airflow and might lead to errors in installation - depends on your choice -of extras. In order to install Airflow you need to either downgrade pip to version 20.2.4 -``pip install --upgrade pip==20.2.4`` or, in case you use Pip 20.3, you need to add option -``--use-deprecated legacy-resolver`` to your pip install command. - # [required] building and installing by pip (preferred) pip install . diff --git a/LOCAL_VIRTUALENV.rst b/LOCAL_VIRTUALENV.rst index caf94a5665882..d4c4739bc270a 100644 --- a/LOCAL_VIRTUALENV.rst +++ b/LOCAL_VIRTUALENV.rst @@ -63,17 +63,9 @@ Extra Packages .. note:: - On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver - might work with Apache Airflow as of 20.3.3, but it might lead to errors in installation. It might - depend on your choice of extras. In order to install Airflow you might need to either downgrade - pip to version 20.2.4 ``pip install --upgrade pip==20.2.4`` or, in case you use Pip 20.3, - you need to add option ``--use-deprecated legacy-resolver`` to your pip install command. + The official way of installing Airflow is with the ``pip`` tool. - While ``pip 20.3.3`` solved most of the ``teething`` problems of 20.3, this note will remain here until we - set ``pip 20.3`` as official version in our CI pipeline where we are testing the installation as well. - Due to those constraints, only ``pip`` installation is currently officially supported. - - While they are some successes with using other tools like `poetry `_ or + While there are some successes with using other tools like `poetry `_ or `pip-tools `_, they do not share the same workflow as ``pip`` - especially when it comes to constraint vs. requirements management. Installing via ``Poetry`` or ``pip-tools`` is not currently supported. @@ -137,17 +129,9 @@ To create and initialize the local virtualenv: .. note:: - On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver - might work with Apache Airflow as of 20.3.3, but it might lead to errors in installation. It might - depend on your choice of extras. In order to install Airflow you might need to either downgrade - pip to version 20.2.4 ``pip install --upgrade pip==20.2.4`` or, in case you use Pip 20.3, - you need to add option ``--use-deprecated legacy-resolver`` to your pip install command. - - While ``pip 20.3.3`` solved most of the ``teething`` problems of 20.3, this note will remain here until we - set ``pip 20.3`` as official version in our CI pipeline where we are testing the installation as well. - Due to those constraints, only ``pip`` installation is currently officially supported. + The official way of installing Airflow is with the ``pip`` tool. - While they are some successes with using other tools like `poetry `_ or + While there are some successes with using other tools like `poetry `_ or `pip-tools `_, they do not share the same workflow as ``pip`` - especially when it comes to constraint vs. requirements management. Installing via ``Poetry`` or ``pip-tools`` is not currently supported. diff --git a/README.md b/README.md index ac901167a37dd..debecdbd2245b 100644 --- a/README.md +++ b/README.md @@ -147,18 +147,9 @@ correct Airflow tag/version/branch and Python versions in the URL. 1. Installing just Airflow: -NOTE!!! - -On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver -might work with Apache Airflow as of 20.3.3, but it might lead to errors in installation. It might -depend on your choice of extras. In order to install Airflow reliably, you might need to either downgrade -pip to version 20.2.4 `pip install --upgrade pip==20.2.4` or, in case you use Pip 20.3, -you might need to add option] `--use-deprecated legacy-resolver` to your pip install command. -While `pip 20.3.3` solved most of the `teething` problems of 20.3, this note will remain here until we -set `pip 20.3` as official version in our CI pipeline where we are testing the installation as well. -Due to those constraints, only `pip` installation is currently officially supported. - -While they are some successes with using other tools like [poetry](https://python-poetry.org) or +The official way of installing Airflow is with the `pip` tool. + +While there are some successes with using other tools like [poetry](https://python-poetry.org) or [pip-tools](https://pypi.org/project/pip-tools), they do not share the same workflow as `pip` - especially when it comes to constraint vs. requirements management. Installing via `Poetry` or `pip-tools` is not currently supported. diff --git a/UPDATING.md b/UPDATING.md index df51ae32cc55b..597ab2b0647da 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -1762,15 +1762,6 @@ If you want to install integration for Microsoft Azure, then instead of `pip ins you should use `pip install apache-airflow[apache.atlas]`. -NOTE! - -On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver -does not yet work with Apache Airflow and might lead to errors in installation - depends on your choice -of extras. In order to install Airflow you need to either downgrade pip to version 20.2.4 -`pip install --upgrade pip==20.2.4` or, in case you use Pip 20.3, you need to add option -`--use-deprecated legacy-resolver` to your pip install command. - - If you want to install integration for Microsoft Azure, then instead of ``` diff --git a/airflow/providers/apache/beam/README.md b/airflow/providers/apache/beam/README.md index 206fa4e8f1f56..ea76b4777eaf4 100644 --- a/airflow/providers/apache/beam/README.md +++ b/airflow/providers/apache/beam/README.md @@ -41,14 +41,6 @@ are in `airflow.providers.apache.beam` python package. ## Installation -NOTE! - -On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver -does not yet work with Apache Airflow and might lead to errors in installation - depends on your choice -of extras. In order to install Airflow you need to either downgrade pip to version 20.2.4 -`pip install --upgrade pip==20.2.4` or, in case you use Pip 20.3, you need to add option -`--use-deprecated legacy-resolver` to your pip install command. - You can install this package on top of an existing airflow 2.* installation via `pip install apache-airflow-providers-apache-beam` diff --git a/dev/provider_packages/PROVIDER_INDEX_TEMPLATE.rst.jinja2 b/dev/provider_packages/PROVIDER_INDEX_TEMPLATE.rst.jinja2 index 21e379931bba6..a95376ba4cd5b 100644 --- a/dev/provider_packages/PROVIDER_INDEX_TEMPLATE.rst.jinja2 +++ b/dev/provider_packages/PROVIDER_INDEX_TEMPLATE.rst.jinja2 @@ -47,15 +47,6 @@ are in ``{{FULL_PACKAGE_NAME}}`` python package. Installation ------------ -.. note:: - - On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver - does not yet work with Apache Airflow and might lead to errors in installation - depends on your choice - of extras. In order to install Airflow you need to either downgrade pip to version 20.2.4 - ``pip install --upgrade pip==20.2.4`` or, in case you use Pip 20.3, you need to add option - ``--use-deprecated legacy-resolver`` to your pip install command. - - You can install this package on top of an existing airflow 2.* installation via ``pip install {{PACKAGE_PIP_NAME}}`` {%- if PIP_REQUIREMENTS %} diff --git a/dev/provider_packages/PROVIDER_README_TEMPLATE.rst.jinja2 b/dev/provider_packages/PROVIDER_README_TEMPLATE.rst.jinja2 index 9975925481511..7847d797a2a77 100644 --- a/dev/provider_packages/PROVIDER_README_TEMPLATE.rst.jinja2 +++ b/dev/provider_packages/PROVIDER_README_TEMPLATE.rst.jinja2 @@ -44,14 +44,6 @@ in the `documentation `_ or `pip-tools `_, they do not share the same workflow as diff --git a/docs/apache-airflow/start/local.rst b/docs/apache-airflow/start/local.rst index 64aaa7a5710ce..813270eea9f18 100644 --- a/docs/apache-airflow/start/local.rst +++ b/docs/apache-airflow/start/local.rst @@ -24,17 +24,10 @@ This quick start guide will help you bootstrap a Airflow standalone instance on .. note:: - On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver - might work with Apache Airflow as of 20.3.3, but it might lead to errors in installation. It might - depend on your choice of extras. In order to install Airflow you might need to either downgrade - pip to version 20.2.4 ``pip install --upgrade pip==20.2.4`` or, in case you use Pip 20.3, - you need to add option ``--use-deprecated legacy-resolver`` to your pip install command. + The official way of installing Airflow is with the ``pip`` tool. - While ``pip 20.3.3`` solved most of the ``teething`` problems of 20.3, this note will remain here until we - set ``pip 20.3`` as official version in our CI pipeline where we are testing the installation as well. - Due to those constraints, only ``pip`` installation is currently officially supported. - While they are some successes with using other tools like `poetry `_ or + While there are some successes with using other tools like `poetry `_ or `pip-tools `_, they do not share the same workflow as ``pip`` - especially when it comes to constraint vs. requirements management. Installing via ``Poetry`` or ``pip-tools`` is not currently supported. diff --git a/docs/apache-airflow/upgrade-check.rst b/docs/apache-airflow/upgrade-check.rst index 18bbec0094536..654d532132955 100644 --- a/docs/apache-airflow/upgrade-check.rst +++ b/docs/apache-airflow/upgrade-check.rst @@ -38,17 +38,9 @@ time of writing: 1.10.15) and then to download this package and run the script a .. note:: - On November 2020, new version of PIP (20.3) has been released with a new, 2020 resolver. This resolver - might work with Apache Airflow as of 20.3.3, but it might lead to errors in installation. It might - depend on your choice of extras. In order to install Airflow you might need to either downgrade - pip to version 20.2.4 ``pip install --upgrade pip==20.2.4`` or, in case you use Pip 20.3, - you need to add option ``--use-deprecated legacy-resolver`` to your pip install command. + The official way of installing Airflow is with the ``pip`` tool. - While ``pip 20.3.3`` solved most of the ``teething`` problems of 20.3, this note will remain here until we - set ``pip 20.3`` as official version in our CI pipeline where we are testing the installation as well. - Due to those constraints, only ``pip`` installation is currently officially supported. - - While they are some successes with using other tools like `poetry `_ or + While there are some successes with using other tools like `poetry `_ or `pip-tools `_, they do not share the same workflow as ``pip`` - especially when it comes to constraint vs. requirements management. Installing via ``Poetry`` or ``pip-tools`` is not currently supported. diff --git a/docs/docker-stack/build-arg-ref.rst b/docs/docker-stack/build-arg-ref.rst index 2ec04c87ebf52..ff401977e9fb9 100644 --- a/docs/docker-stack/build-arg-ref.rst +++ b/docs/docker-stack/build-arg-ref.rst @@ -45,7 +45,7 @@ Those are the most common arguments that you use when you want to build a custom +------------------------------------------+------------------------------------------+------------------------------------------+ | ``AIRFLOW_USER_HOME_DIR`` | ``/home/airflow`` | Home directory of the Airflow user. | +------------------------------------------+------------------------------------------+------------------------------------------+ -| ``AIRFLOW_PIP_VERSION`` | ``20.2.4`` | PIP version used. | +| ``AIRFLOW_PIP_VERSION`` | ``21.0.1`` | PIP version used. | +------------------------------------------+------------------------------------------+------------------------------------------+ | ``PIP_PROGRESS_BAR`` | ``on`` | Progress bar for PIP installation | +------------------------------------------+------------------------------------------+------------------------------------------+ diff --git a/scripts/ci/kubernetes/ci_run_kubernetes_tests.sh b/scripts/ci/kubernetes/ci_run_kubernetes_tests.sh index 65f885c9727d6..ceee1b98ed4d1 100755 --- a/scripts/ci/kubernetes/ci_run_kubernetes_tests.sh +++ b/scripts/ci/kubernetes/ci_run_kubernetes_tests.sh @@ -88,7 +88,7 @@ function create_virtualenv() { . "${virtualenv_path}/bin/activate" - pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}" + pip install --upgrade "pip~=${AIRFLOW_PIP_VERSION}" "wheel~=${WHEEL_VERSION}" pip install pytest freezegun pytest-cov \ --constraint "https://raw.githubusercontent.com/${CONSTRAINTS_GITHUB_REPOSITORY}/${DEFAULT_CONSTRAINTS_BRANCH}/constraints-${HOST_PYTHON_VERSION}.txt" diff --git a/scripts/ci/libraries/_build_airflow_packages.sh b/scripts/ci/libraries/_build_airflow_packages.sh index 46429308c4060..d179b81a3532a 100644 --- a/scripts/ci/libraries/_build_airflow_packages.sh +++ b/scripts/ci/libraries/_build_airflow_packages.sh @@ -22,7 +22,7 @@ function build_airflow_packages::build_airflow_packages() { rm -rf -- *egg-info* rm -rf -- build - pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" "wheel==${WHEEL_VERSION}" + pip install --upgrade "pip~=${AIRFLOW_PIP_VERSION}" "wheel~=${WHEEL_VERSION}" local packages=() diff --git a/scripts/ci/libraries/_initialization.sh b/scripts/ci/libraries/_initialization.sh index 78d37ae390f2c..3a6c4b3513118 100644 --- a/scripts/ci/libraries/_initialization.sh +++ b/scripts/ci/libraries/_initialization.sh @@ -411,7 +411,7 @@ function initialization::initialize_image_build_variables() { export INSTALLED_EXTRAS="async,amazon,celery,cncf.kubernetes,docker,dask,elasticsearch,ftp,grpc,hashicorp,http,imap,ldap,google,microsoft.azure,mysql,postgres,redis,sendgrid,sftp,slack,ssh,statsd,virtualenv" # default version of PIP USED (This has to be < 20.3 until https://github.com/apache/airflow/issues/12838 is solved) - AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION:="20.2.4"} + AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION:="21.0.1"} export AIRFLOW_PIP_VERSION # We also pin version of wheel used to get consistent builds diff --git a/scripts/docker/install_additional_dependencies.sh b/scripts/docker/install_additional_dependencies.sh index 7925ac8a03ece..f55dfc439f23f 100755 --- a/scripts/docker/install_additional_dependencies.sh +++ b/scripts/docker/install_additional_dependencies.sh @@ -36,7 +36,7 @@ function install_additional_dependencies() { pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade --upgrade-strategy eager \ ${ADDITIONAL_PYTHON_DEPS} ${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS} # make sure correct PIP version is used - pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip==${AIRFLOW_PIP_VERSION}" + pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip~=${AIRFLOW_PIP_VERSION}" pip check || ${CONTINUE_ON_PIP_CHECK_FAILURE} else echo @@ -46,7 +46,7 @@ function install_additional_dependencies() { --upgrade --upgrade-strategy only-if-needed \ ${ADDITIONAL_PYTHON_DEPS} # make sure correct PIP version is used - pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip==${AIRFLOW_PIP_VERSION}" + pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip~=${AIRFLOW_PIP_VERSION}" pip check || ${CONTINUE_ON_PIP_CHECK_FAILURE} fi } diff --git a/scripts/docker/install_airflow.sh b/scripts/docker/install_airflow.sh index bfcc7e91b5549..d4bac2f7b0916 100755 --- a/scripts/docker/install_airflow.sh +++ b/scripts/docker/install_airflow.sh @@ -59,7 +59,7 @@ function install_airflow() { fi # make sure correct PIP version is used - pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip==${AIRFLOW_PIP_VERSION}" + pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip~=${AIRFLOW_PIP_VERSION}" pip check || ${CONTINUE_ON_PIP_CHECK_FAILURE} else \ echo @@ -69,13 +69,13 @@ function install_airflow() { "${AIRFLOW_INSTALLATION_METHOD}[${AIRFLOW_EXTRAS}]${AIRFLOW_VERSION_SPECIFICATION}" \ --constraint "${AIRFLOW_CONSTRAINTS_LOCATION}" # make sure correct PIP version is used - pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip==${AIRFLOW_PIP_VERSION}" + pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip~=${AIRFLOW_PIP_VERSION}" # then upgrade if needed without using constraints to account for new limits in setup.py pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade --upgrade-strategy only-if-needed \ ${AIRFLOW_INSTALL_EDITABLE_FLAG} \ "${AIRFLOW_INSTALLATION_METHOD}[${AIRFLOW_EXTRAS}]${AIRFLOW_VERSION_SPECIFICATION}" \ # make sure correct PIP version is used - pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip==${AIRFLOW_PIP_VERSION}" + pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip~=${AIRFLOW_PIP_VERSION}" pip check || ${CONTINUE_ON_PIP_CHECK_FAILURE} fi diff --git a/scripts/docker/install_airflow_from_branch_tip.sh b/scripts/docker/install_airflow_from_branch_tip.sh index 6e34d05159b43..f78d5bf61fe0c 100755 --- a/scripts/docker/install_airflow_from_branch_tip.sh +++ b/scripts/docker/install_airflow_from_branch_tip.sh @@ -42,7 +42,7 @@ function install_airflow_from_branch_tip() { "https://github.com/${AIRFLOW_REPO}/archive/${AIRFLOW_BRANCH}.tar.gz#egg=apache-airflow[${AIRFLOW_EXTRAS}]" \ --constraint "${AIRFLOW_CONSTRAINTS_LOCATION}" # make sure correct PIP version is used - pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip==${AIRFLOW_PIP_VERSION}" + pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip~=${AIRFLOW_PIP_VERSION}" pip freeze | grep apache-airflow-providers | xargs pip uninstall --yes || true echo echo Uninstalling just airflow. Dependencies remain. diff --git a/scripts/docker/install_from_docker_context_files.sh b/scripts/docker/install_from_docker_context_files.sh index d1982cf771bc0..8369fd7a1d180 100755 --- a/scripts/docker/install_from_docker_context_files.sh +++ b/scripts/docker/install_from_docker_context_files.sh @@ -56,7 +56,7 @@ function install_airflow_and_providers_from_docker_context_files(){ ${reinstalling_apache_airflow_package} ${reinstalling_apache_airflow_providers_packages} \ ${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS} # make sure correct PIP version is used - pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip==${AIRFLOW_PIP_VERSION}" + pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip~=${AIRFLOW_PIP_VERSION}" pip check || ${CONTINUE_ON_PIP_CHECK_FAILURE} else echo @@ -74,12 +74,12 @@ function install_airflow_and_providers_from_docker_context_files(){ --constraint /tmp/constraints.txt rm /tmp/constraints.txt # make sure correct PIP version is used \ - pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip==${AIRFLOW_PIP_VERSION}" + pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip~=${AIRFLOW_PIP_VERSION}" # then upgrade if needed without using constraints to account for new limits in setup.py pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade --upgrade-strategy only-if-needed \ ${reinstalling_apache_airflow_package} ${reinstalling_apache_airflow_providers_packages} # make sure correct PIP version is used - pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip==${AIRFLOW_PIP_VERSION}" + pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip~=${AIRFLOW_PIP_VERSION}" pip check || ${CONTINUE_ON_PIP_CHECK_FAILURE} fi @@ -100,7 +100,7 @@ install_all_other_packages_from_docker_context_files() { if [[ -n "${reinstalling_other_packages}" ]]; then \ pip install ${AIRFLOW_INSTALL_USER_FLAG} --force-reinstall --no-deps --no-index ${reinstalling_other_packages} # make sure correct PIP version is used - pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip==${AIRFLOW_PIP_VERSION}" + pip install ${AIRFLOW_INSTALL_USER_FLAG} --upgrade "pip~=${AIRFLOW_PIP_VERSION}" fi } diff --git a/scripts/in_container/_in_container_utils.sh b/scripts/in_container/_in_container_utils.sh index d015e1cf7ecd1..966f6aae6e41f 100644 --- a/scripts/in_container/_in_container_utils.sh +++ b/scripts/in_container/_in_container_utils.sh @@ -496,7 +496,7 @@ ${COLOR_RESET} function install_supported_pip_version() { group_start "Install supported PIP version ${AIRFLOW_PIP_VERSION}" - pip install --upgrade "pip==${AIRFLOW_PIP_VERSION}" + pip install --upgrade "pip~=${AIRFLOW_PIP_VERSION}" group_end }