This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-1-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 92899ca01fa33b1969683fd5cd540f5f90845954 Author: Jarek Potiuk <[email protected]> AuthorDate: Sun Sep 5 16:35:27 2021 +0200 Add Python2 to installed packages (#18037) As of August 2021, the buster-slim python images, no longer contain python2 packages. We still support running Python2 via PythonVirtualenvOperator and our tests started to fail when we run the tests in `main` - those tests always pull and build the images using latest-available buster-slim images. Our system to prevent PR failures in this case has proven to be useful - the main tests failed to succeed so the base images we have are still using previous buster-slim images which still contain Python 2. This PR adds python2 to installed packages - on both CI images and PROD images. For CI images it is needed to pass tests, for PROD images, it is needed for backwards-compatibility. (cherry picked from commit 6898a2f8a587adacd97beec739ad63c35bfe5537) --- Dockerfile | 4 ++++ Dockerfile.ci | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/Dockerfile b/Dockerfile index 00ae238..554e461 100644 --- a/Dockerfile +++ b/Dockerfile @@ -339,6 +339,9 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +# As of August 2021, Debian buster-slim does not include Python2 by default and we need it +# as we still support running Python2 via PythonVirtualenvOperator +# TODO: Remove python2 when we stop supporting it ARG RUNTIME_APT_DEPS="\ apt-transport-https \ apt-utils \ @@ -360,6 +363,7 @@ ARG RUNTIME_APT_DEPS="\ netcat \ openssh-client \ postgresql-client \ + python2 \ rsync \ sasl2-bin \ sqlite3 \ diff --git a/Dockerfile.ci b/Dockerfile.ci index 6267770..5be31be 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -57,6 +57,10 @@ ENV DEV_APT_COMMAND=${DEV_APT_COMMAND} \ ADDITIONAL_DEV_APT_DEPS=${ADDITIONAL_DEV_APT_DEPS} \ ADDITIONAL_DEV_APT_COMMAND=${ADDITIONAL_DEV_APT_COMMAND} +# As of August 2021, Debian buster-slim does not include Python2 by default and we need it +# as we still support running Python2 via PythonVirtualenvOperator +# TODO: Remove python2 when we stop supporting it + # Install basic and additional apt dependencies RUN mkdir -pv /usr/share/man/man1 \ && mkdir -pv /usr/share/man/man7 \ @@ -86,6 +90,7 @@ RUN mkdir -pv /usr/share/man/man1 \ locales \ netcat \ nodejs \ + python2 \ rsync \ sasl2-bin \ sudo \
