This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 7277122ae6 Upgrade `pip` to latest released 22.1.0 version (#23665)
7277122ae6 is described below
commit 7277122ae62305de19ceef33607f09cf030a3cd4
Author: Jarek Potiuk <[email protected]>
AuthorDate: Thu May 12 19:36:06 2022 +0200
Upgrade `pip` to latest released 22.1.0 version (#23665)
We are finally able to get rid of the annoying false-positive
warnings and we have finally a chance on having warning-free
installation during docker builds.
---
Dockerfile | 40 +++++++++++-----------
Dockerfile.ci | 38 ++++++++++----------
IMAGES.rst | 2 +-
dev/TRACKING_BACKTRACKING_ISSUES.md | 2 +-
docs/docker-stack/build-arg-ref.rst | 2 +-
scripts/ci/libraries/_initialization.sh | 2 +-
scripts/docker/common.sh | 2 +-
scripts/docker/entrypoint_ci.sh | 2 +-
scripts/docker/entrypoint_prod.sh | 2 +-
scripts/docker/install_additional_dependencies.sh | 8 ++---
scripts/docker/install_airflow.sh | 14 ++++----
...install_airflow_dependencies_from_branch_tip.sh | 4 +--
.../docker/install_from_docker_context_files.sh | 8 ++---
scripts/docker/install_pipx_tools.sh | 2 +-
14 files changed, 63 insertions(+), 65 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 1bef126ff2..315a8908dc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -48,7 +48,7 @@ ARG AIRFLOW_VERSION="2.3.0"
ARG PYTHON_BASE_IMAGE="python:3.7-slim-bullseye"
-ARG AIRFLOW_PIP_VERSION=22.0.4
+ARG AIRFLOW_PIP_VERSION=22.1.0
ARG AIRFLOW_IMAGE_REPOSITORY="https://github.com/apache/airflow"
ARG
AIRFLOW_IMAGE_README_URL="https://raw.githubusercontent.com/apache/airflow/main/docs/docker-stack/README.md"
@@ -316,11 +316,11 @@ function install_airflow_dependencies_from_branch_tip() {
# Install latest set of dependencies using constraints. In case
constraints were upgraded and there
# are conflicts, this might fail, but it should be fixed in the following
installation steps
set -x
- pip install \
+ pip install --root-user-action ignore \
"https://github.com/${AIRFLOW_REPO}/archive/${AIRFLOW_BRANCH}.tar.gz#egg=apache-airflow[${AIRFLOW_EXTRAS}]"
\
--constraint "${AIRFLOW_CONSTRAINTS_LOCATION}" || true
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
pip freeze | grep apache-airflow-providers | xargs pip uninstall --yes
2>/dev/null || true
set +x
echo
@@ -367,7 +367,7 @@ function common::get_airflow_version_specification() {
function common::override_pip_version_if_needed() {
if [[ -n ${AIRFLOW_VERSION} ]]; then
if [[ ${AIRFLOW_VERSION} =~ ^2\.0.* || ${AIRFLOW_VERSION} =~ ^1\.* ]];
then
- export AIRFLOW_PIP_VERSION="20.2.4"
+ export AIRFLOW_PIP_VERSION="22.1.0"
fi
fi
}
@@ -570,13 +570,13 @@ function
install_airflow_and_providers_from_docker_context_files(){
echo
# force reinstall all airflow + provider package local files with eager
upgrade
set -x
- pip install "${pip_flags[@]}" --upgrade --upgrade-strategy eager \
+ pip install "${pip_flags[@]}" --root-user-action ignore --upgrade
--upgrade-strategy eager \
${reinstalling_apache_airflow_package}
${reinstalling_apache_airflow_providers_packages} \
${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS}
set +x
# make sure correct PIP version is left installed
- pip install "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
pip check
}
@@ -591,9 +591,9 @@ function
install_all_other_packages_from_docker_context_files() {
grep -v apache_airflow | grep -v apache-airflow || true)
if [[ -n "${reinstalling_other_packages}" ]]; then
set -x
- pip install --force-reinstall --no-deps --no-index
${reinstalling_other_packages}
+ pip install --root-user-action ignore --force-reinstall --no-deps
--no-index ${reinstalling_other_packages}
# make sure correct PIP version is used
- pip install "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
set -x
fi
}
@@ -641,7 +641,7 @@ function install_airflow() {
echo "${COLOR_BLUE}Installing all packages with eager
upgrade${COLOR_RESET}"
echo
# eager upgrade
- pip install --upgrade --upgrade-strategy eager \
+ pip install --root-user-action ignore --upgrade --upgrade-strategy
eager \
"${AIRFLOW_INSTALLATION_METHOD}[${AIRFLOW_EXTRAS}]${AIRFLOW_VERSION_SPECIFICATION}"
\
${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS}
if [[ -n "${AIRFLOW_INSTALL_EDITABLE_FLAG}" ]]; then
@@ -649,13 +649,13 @@ function install_airflow() {
# We can only do it when we install airflow from sources
set -x
pip uninstall apache-airflow --yes
- pip install ${AIRFLOW_INSTALL_EDITABLE_FLAG} \
+ pip install --root-user-action ignore
${AIRFLOW_INSTALL_EDITABLE_FLAG} \
"${AIRFLOW_INSTALLATION_METHOD}[${AIRFLOW_EXTRAS}]${AIRFLOW_VERSION_SPECIFICATION}"
set +x
fi
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
echo
echo "${COLOR_BLUE}Running 'pip check'${COLOR_RESET}"
echo
@@ -665,17 +665,17 @@ function install_airflow() {
echo "${COLOR_BLUE}Installing all packages with constraints and
upgrade if needed${COLOR_RESET}"
echo
set -x
- pip install ${AIRFLOW_INSTALL_EDITABLE_FLAG} \
+ pip install --root-user-action ignore ${AIRFLOW_INSTALL_EDITABLE_FLAG}
\
"${AIRFLOW_INSTALLATION_METHOD}[${AIRFLOW_EXTRAS}]${AIRFLOW_VERSION_SPECIFICATION}"
\
--constraint "${AIRFLOW_CONSTRAINTS_LOCATION}"
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
# then upgrade if needed without using constraints to account for new
limits in setup.py
- pip install --upgrade --upgrade-strategy only-if-needed \
+ pip install --root-user-action ignore --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 --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
set +x
echo
echo "${COLOR_BLUE}Running 'pip check'${COLOR_RESET}"
@@ -711,10 +711,10 @@ function install_additional_dependencies() {
echo "${COLOR_BLUE}Installing additional dependencies while upgrading
to newer dependencies${COLOR_RESET}"
echo
set -x
- pip install --upgrade --upgrade-strategy eager \
+ pip install --root-user-action ignore --upgrade --upgrade-strategy
eager \
${ADDITIONAL_PYTHON_DEPS} ${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS}
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
set +x
echo
echo "${COLOR_BLUE}Running 'pip check'${COLOR_RESET}"
@@ -725,10 +725,10 @@ function install_additional_dependencies() {
echo "${COLOR_BLUE}Installing additional dependencies upgrading only
if needed${COLOR_RESET}"
echo
set -x
- pip install --upgrade --upgrade-strategy only-if-needed \
+ pip install --root-user-action ignore --upgrade --upgrade-strategy
only-if-needed \
${ADDITIONAL_PYTHON_DEPS}
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
set +x
echo
echo "${COLOR_BLUE}Running 'pip check'${COLOR_RESET}"
@@ -1023,7 +1023,7 @@ if [[ -n "${_PIP_ADDITIONAL_REQUIREMENTS=}" ]] ; then
>&2 echo " the container starts, so it is onlny useful for testing
and trying out"
>&2 echo " of adding dependencies."
>&2 echo
- pip install --no-cache-dir ${_PIP_ADDITIONAL_REQUIREMENTS}
+ pip install --root-user-action ignore --no-cache-dir
${_PIP_ADDITIONAL_REQUIREMENTS}
fi
diff --git a/Dockerfile.ci b/Dockerfile.ci
index c17b348aed..14b6a49d82 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -276,11 +276,11 @@ function install_airflow_dependencies_from_branch_tip() {
# Install latest set of dependencies using constraints. In case
constraints were upgraded and there
# are conflicts, this might fail, but it should be fixed in the following
installation steps
set -x
- pip install \
+ pip install --root-user-action ignore \
"https://github.com/${AIRFLOW_REPO}/archive/${AIRFLOW_BRANCH}.tar.gz#egg=apache-airflow[${AIRFLOW_EXTRAS}]"
\
--constraint "${AIRFLOW_CONSTRAINTS_LOCATION}" || true
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
pip freeze | grep apache-airflow-providers | xargs pip uninstall --yes
2>/dev/null || true
set +x
echo
@@ -327,7 +327,7 @@ function common::get_airflow_version_specification() {
function common::override_pip_version_if_needed() {
if [[ -n ${AIRFLOW_VERSION} ]]; then
if [[ ${AIRFLOW_VERSION} =~ ^2\.0.* || ${AIRFLOW_VERSION} =~ ^1\.* ]];
then
- export AIRFLOW_PIP_VERSION="20.2.4"
+ export AIRFLOW_PIP_VERSION="22.1.0"
fi
fi
}
@@ -366,7 +366,7 @@ function install_pipx_tools() {
echo "${COLOR_BLUE}Installing pipx tools${COLOR_RESET}"
echo
# Make sure PIPX is installed in latest version
- pip install --upgrade pipx
+ pip install --root-user-action ignore --upgrade pipx
if [[ $(uname -m) != "aarch64" ]]; then
# Do not install mssql-cli for ARM
# Install all the tools we need available in command line but without
impacting the current environment
@@ -510,7 +510,7 @@ function install_airflow() {
echo "${COLOR_BLUE}Installing all packages with eager
upgrade${COLOR_RESET}"
echo
# eager upgrade
- pip install --upgrade --upgrade-strategy eager \
+ pip install --root-user-action ignore --upgrade --upgrade-strategy
eager \
"${AIRFLOW_INSTALLATION_METHOD}[${AIRFLOW_EXTRAS}]${AIRFLOW_VERSION_SPECIFICATION}"
\
${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS}
if [[ -n "${AIRFLOW_INSTALL_EDITABLE_FLAG}" ]]; then
@@ -518,13 +518,13 @@ function install_airflow() {
# We can only do it when we install airflow from sources
set -x
pip uninstall apache-airflow --yes
- pip install ${AIRFLOW_INSTALL_EDITABLE_FLAG} \
+ pip install --root-user-action ignore
${AIRFLOW_INSTALL_EDITABLE_FLAG} \
"${AIRFLOW_INSTALLATION_METHOD}[${AIRFLOW_EXTRAS}]${AIRFLOW_VERSION_SPECIFICATION}"
set +x
fi
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
echo
echo "${COLOR_BLUE}Running 'pip check'${COLOR_RESET}"
echo
@@ -534,17 +534,17 @@ function install_airflow() {
echo "${COLOR_BLUE}Installing all packages with constraints and
upgrade if needed${COLOR_RESET}"
echo
set -x
- pip install ${AIRFLOW_INSTALL_EDITABLE_FLAG} \
+ pip install --root-user-action ignore ${AIRFLOW_INSTALL_EDITABLE_FLAG}
\
"${AIRFLOW_INSTALLATION_METHOD}[${AIRFLOW_EXTRAS}]${AIRFLOW_VERSION_SPECIFICATION}"
\
--constraint "${AIRFLOW_CONSTRAINTS_LOCATION}"
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
# then upgrade if needed without using constraints to account for new
limits in setup.py
- pip install --upgrade --upgrade-strategy only-if-needed \
+ pip install --root-user-action ignore --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 --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
set +x
echo
echo "${COLOR_BLUE}Running 'pip check'${COLOR_RESET}"
@@ -580,10 +580,10 @@ function install_additional_dependencies() {
echo "${COLOR_BLUE}Installing additional dependencies while upgrading
to newer dependencies${COLOR_RESET}"
echo
set -x
- pip install --upgrade --upgrade-strategy eager \
+ pip install --root-user-action ignore --upgrade --upgrade-strategy
eager \
${ADDITIONAL_PYTHON_DEPS} ${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS}
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
set +x
echo
echo "${COLOR_BLUE}Running 'pip check'${COLOR_RESET}"
@@ -594,10 +594,10 @@ function install_additional_dependencies() {
echo "${COLOR_BLUE}Installing additional dependencies upgrading only
if needed${COLOR_RESET}"
echo
set -x
- pip install --upgrade --upgrade-strategy only-if-needed \
+ pip install --root-user-action ignore --upgrade --upgrade-strategy
only-if-needed \
${ADDITIONAL_PYTHON_DEPS}
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
set +x
echo
echo "${COLOR_BLUE}Running 'pip check'${COLOR_RESET}"
@@ -741,7 +741,7 @@ if [[ ${SKIP_ENVIRONMENT_INITIALIZATION=} != "true" ]]; then
fi
done
if (( ${#installable_files[@]} )); then
- pip install "${installable_files[@]}"
+ pip install --root-user-action ignore "${installable_files[@]}"
fi
fi
@@ -1195,7 +1195,7 @@ ARG AIRFLOW_CI_BUILD_EPOCH="3"
ARG AIRFLOW_PRE_CACHED_PIP_PACKAGES="true"
# By default in the image, we are installing all providers when installing
from sources
ARG INSTALL_PROVIDERS_FROM_SOURCES="true"
-ARG AIRFLOW_PIP_VERSION=22.0.4
+ARG AIRFLOW_PIP_VERSION=22.1.0
# Setup PIP
# By default PIP install run without cache to make image smaller
ARG PIP_NO_CACHE_DIR="true"
@@ -1265,9 +1265,7 @@ COPY --from=scripts install_pip_version.sh
install_airflow_dependencies_from_bra
# are uninstalled, only dependencies remain.
# the cache is only used when "upgrade to newer dependencies" is not set to
automatically
# account for removed dependencies (we do not install them in the first place)
-RUN echo -e "\n\e[32mThe 'Running pip as the root user' warnings below are not
valid but we can't disable them :(\e[0m\n"; \
- echo -e "\n\e[34mSee https://github.com/pypa/pip/issues/10556 for
details.\e[0m\n" ; \
- bash /scripts/docker/install_pip_version.sh; \
+RUN bash /scripts/docker/install_pip_version.sh; \
if [[ ${AIRFLOW_PRE_CACHED_PIP_PACKAGES} == "true" && \
${UPGRADE_TO_NEWER_DEPENDENCIES} == "false" ]]; then \
bash /scripts/docker/install_airflow_dependencies_from_branch_tip.sh; \
diff --git a/IMAGES.rst b/IMAGES.rst
index 4f3051ac62..e045a3d4cf 100644
--- a/IMAGES.rst
+++ b/IMAGES.rst
@@ -475,7 +475,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`` | ``22.0.4``
| PIP version used. |
+| ``AIRFLOW_PIP_VERSION`` | ``22.1.0``
| PIP version used. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``PIP_PROGRESS_BAR`` | ``on``
| Progress bar for PIP installation |
+------------------------------------------+------------------------------------------+------------------------------------------+
diff --git a/dev/TRACKING_BACKTRACKING_ISSUES.md
b/dev/TRACKING_BACKTRACKING_ISSUES.md
index 212c7dd059..ca3747e6fb 100644
--- a/dev/TRACKING_BACKTRACKING_ISSUES.md
+++ b/dev/TRACKING_BACKTRACKING_ISSUES.md
@@ -42,7 +42,7 @@ image build jobs in CI.
An example of such issue is described
[here](https://github.com/pypa/pip/issues/10924).
Unfortunately the problem is that in such cases, it is not possible to figure
out what caused the
-problem from `pip` output (state as of `pip` 22.0.4).
+problem from `pip` output (state as of `pip` 22.1.0).
There are a number of issues in `pip` that describe the issue, and some
backtracking reasons have been already
tracked down and fixed by `pip` maintainers, but this is a difficult problem
to solve and it is likely it
diff --git a/docs/docker-stack/build-arg-ref.rst
b/docs/docker-stack/build-arg-ref.rst
index aee5d6b3e6..d7edc2a386 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`` | ``22.0.4``
| PIP version used. |
+| ``AIRFLOW_PIP_VERSION`` | ``22.1.0``
| PIP version used. |
+------------------------------------------+------------------------------------------+---------------------------------------------+
| ``PIP_PROGRESS_BAR`` | ``on``
| Progress bar for PIP installation |
+------------------------------------------+------------------------------------------+---------------------------------------------+
diff --git a/scripts/ci/libraries/_initialization.sh
b/scripts/ci/libraries/_initialization.sh
index 36cf2b8479..f1c541d502 100644
--- a/scripts/ci/libraries/_initialization.sh
+++ b/scripts/ci/libraries/_initialization.sh
@@ -418,7 +418,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"
- AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION:="22.0.4"}
+ AIRFLOW_PIP_VERSION=${AIRFLOW_PIP_VERSION:="22.1.0"}
export AIRFLOW_PIP_VERSION
# We also pin version of wheel used to get consistent builds
diff --git a/scripts/docker/common.sh b/scripts/docker/common.sh
index 29fc2273ca..35c3f56928 100644
--- a/scripts/docker/common.sh
+++ b/scripts/docker/common.sh
@@ -42,7 +42,7 @@ function common::get_airflow_version_specification() {
function common::override_pip_version_if_needed() {
if [[ -n ${AIRFLOW_VERSION} ]]; then
if [[ ${AIRFLOW_VERSION} =~ ^2\.0.* || ${AIRFLOW_VERSION} =~ ^1\.* ]];
then
- export AIRFLOW_PIP_VERSION="20.2.4"
+ export AIRFLOW_PIP_VERSION="22.1.0"
fi
fi
}
diff --git a/scripts/docker/entrypoint_ci.sh b/scripts/docker/entrypoint_ci.sh
index 912bdcee2d..0aa7e5ddc6 100755
--- a/scripts/docker/entrypoint_ci.sh
+++ b/scripts/docker/entrypoint_ci.sh
@@ -149,7 +149,7 @@ if [[ ${SKIP_ENVIRONMENT_INITIALIZATION=} != "true" ]]; then
fi
done
if (( ${#installable_files[@]} )); then
- pip install "${installable_files[@]}"
+ pip install --root-user-action ignore "${installable_files[@]}"
fi
fi
diff --git a/scripts/docker/entrypoint_prod.sh
b/scripts/docker/entrypoint_prod.sh
index 3a357d3213..1ba24ec20e 100755
--- a/scripts/docker/entrypoint_prod.sh
+++ b/scripts/docker/entrypoint_prod.sh
@@ -304,7 +304,7 @@ if [[ -n "${_PIP_ADDITIONAL_REQUIREMENTS=}" ]] ; then
>&2 echo " the container starts, so it is onlny useful for testing
and trying out"
>&2 echo " of adding dependencies."
>&2 echo
- pip install --no-cache-dir ${_PIP_ADDITIONAL_REQUIREMENTS}
+ pip install --root-user-action ignore --no-cache-dir
${_PIP_ADDITIONAL_REQUIREMENTS}
fi
diff --git a/scripts/docker/install_additional_dependencies.sh
b/scripts/docker/install_additional_dependencies.sh
index 21f41a04a7..33336a1d58 100644
--- a/scripts/docker/install_additional_dependencies.sh
+++ b/scripts/docker/install_additional_dependencies.sh
@@ -32,10 +32,10 @@ function install_additional_dependencies() {
echo "${COLOR_BLUE}Installing additional dependencies while upgrading
to newer dependencies${COLOR_RESET}"
echo
set -x
- pip install --upgrade --upgrade-strategy eager \
+ pip install --root-user-action ignore --upgrade --upgrade-strategy
eager \
${ADDITIONAL_PYTHON_DEPS} ${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS}
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
set +x
echo
echo "${COLOR_BLUE}Running 'pip check'${COLOR_RESET}"
@@ -46,10 +46,10 @@ function install_additional_dependencies() {
echo "${COLOR_BLUE}Installing additional dependencies upgrading only
if needed${COLOR_RESET}"
echo
set -x
- pip install --upgrade --upgrade-strategy only-if-needed \
+ pip install --root-user-action ignore --upgrade --upgrade-strategy
only-if-needed \
${ADDITIONAL_PYTHON_DEPS}
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
set +x
echo
echo "${COLOR_BLUE}Running 'pip check'${COLOR_RESET}"
diff --git a/scripts/docker/install_airflow.sh
b/scripts/docker/install_airflow.sh
index 9b3743fd4e..81848ce2be 100644
--- a/scripts/docker/install_airflow.sh
+++ b/scripts/docker/install_airflow.sh
@@ -54,7 +54,7 @@ function install_airflow() {
echo "${COLOR_BLUE}Installing all packages with eager
upgrade${COLOR_RESET}"
echo
# eager upgrade
- pip install --upgrade --upgrade-strategy eager \
+ pip install --root-user-action ignore --upgrade --upgrade-strategy
eager \
"${AIRFLOW_INSTALLATION_METHOD}[${AIRFLOW_EXTRAS}]${AIRFLOW_VERSION_SPECIFICATION}"
\
${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS}
if [[ -n "${AIRFLOW_INSTALL_EDITABLE_FLAG}" ]]; then
@@ -62,13 +62,13 @@ function install_airflow() {
# We can only do it when we install airflow from sources
set -x
pip uninstall apache-airflow --yes
- pip install ${AIRFLOW_INSTALL_EDITABLE_FLAG} \
+ pip install --root-user-action ignore
${AIRFLOW_INSTALL_EDITABLE_FLAG} \
"${AIRFLOW_INSTALLATION_METHOD}[${AIRFLOW_EXTRAS}]${AIRFLOW_VERSION_SPECIFICATION}"
set +x
fi
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
echo
echo "${COLOR_BLUE}Running 'pip check'${COLOR_RESET}"
echo
@@ -78,17 +78,17 @@ function install_airflow() {
echo "${COLOR_BLUE}Installing all packages with constraints and
upgrade if needed${COLOR_RESET}"
echo
set -x
- pip install ${AIRFLOW_INSTALL_EDITABLE_FLAG} \
+ pip install --root-user-action ignore ${AIRFLOW_INSTALL_EDITABLE_FLAG}
\
"${AIRFLOW_INSTALLATION_METHOD}[${AIRFLOW_EXTRAS}]${AIRFLOW_VERSION_SPECIFICATION}"
\
--constraint "${AIRFLOW_CONSTRAINTS_LOCATION}"
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
# then upgrade if needed without using constraints to account for new
limits in setup.py
- pip install --upgrade --upgrade-strategy only-if-needed \
+ pip install --root-user-action ignore --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 --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
set +x
echo
echo "${COLOR_BLUE}Running 'pip check'${COLOR_RESET}"
diff --git a/scripts/docker/install_airflow_dependencies_from_branch_tip.sh
b/scripts/docker/install_airflow_dependencies_from_branch_tip.sh
index 15856cebb7..a7a2702582 100644
--- a/scripts/docker/install_airflow_dependencies_from_branch_tip.sh
+++ b/scripts/docker/install_airflow_dependencies_from_branch_tip.sh
@@ -48,11 +48,11 @@ function install_airflow_dependencies_from_branch_tip() {
# Install latest set of dependencies using constraints. In case
constraints were upgraded and there
# are conflicts, this might fail, but it should be fixed in the following
installation steps
set -x
- pip install \
+ pip install --root-user-action ignore \
"https://github.com/${AIRFLOW_REPO}/archive/${AIRFLOW_BRANCH}.tar.gz#egg=apache-airflow[${AIRFLOW_EXTRAS}]"
\
--constraint "${AIRFLOW_CONSTRAINTS_LOCATION}" || true
# make sure correct PIP version is used
- pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
pip freeze | grep apache-airflow-providers | xargs pip uninstall --yes
2>/dev/null || true
set +x
echo
diff --git a/scripts/docker/install_from_docker_context_files.sh
b/scripts/docker/install_from_docker_context_files.sh
index 80e11d357f..9b00906acf 100644
--- a/scripts/docker/install_from_docker_context_files.sh
+++ b/scripts/docker/install_from_docker_context_files.sh
@@ -79,13 +79,13 @@ function
install_airflow_and_providers_from_docker_context_files(){
echo
# force reinstall all airflow + provider package local files with eager
upgrade
set -x
- pip install "${pip_flags[@]}" --upgrade --upgrade-strategy eager \
+ pip install "${pip_flags[@]}" --root-user-action ignore --upgrade
--upgrade-strategy eager \
${reinstalling_apache_airflow_package}
${reinstalling_apache_airflow_providers_packages} \
${EAGER_UPGRADE_ADDITIONAL_REQUIREMENTS}
set +x
# make sure correct PIP version is left installed
- pip install "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
pip check
}
@@ -104,9 +104,9 @@ function
install_all_other_packages_from_docker_context_files() {
grep -v apache_airflow | grep -v apache-airflow || true)
if [[ -n "${reinstalling_other_packages}" ]]; then
set -x
- pip install --force-reinstall --no-deps --no-index
${reinstalling_other_packages}
+ pip install --root-user-action ignore --force-reinstall --no-deps
--no-index ${reinstalling_other_packages}
# make sure correct PIP version is used
- pip install "pip==${AIRFLOW_PIP_VERSION}"
+ pip install --disable-pip-version-check "pip==${AIRFLOW_PIP_VERSION}"
2>/dev/null
set -x
fi
}
diff --git a/scripts/docker/install_pipx_tools.sh
b/scripts/docker/install_pipx_tools.sh
index a40903611c..07fbd92eaf 100644
--- a/scripts/docker/install_pipx_tools.sh
+++ b/scripts/docker/install_pipx_tools.sh
@@ -23,7 +23,7 @@ function install_pipx_tools() {
echo "${COLOR_BLUE}Installing pipx tools${COLOR_RESET}"
echo
# Make sure PIPX is installed in latest version
- pip install --upgrade pipx
+ pip install --root-user-action ignore --upgrade pipx
if [[ $(uname -m) != "aarch64" ]]; then
# Do not install mssql-cli for ARM
# Install all the tools we need available in command line but without
impacting the current environment