You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2021/09/05 14:35:44 UTC
[airflow] branch main updated: Add Python2 to installed packages
(#18037)
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 6898a2f Add Python2 to installed packages (#18037)
6898a2f is described below
commit 6898a2f8a587adacd97beec739ad63c35bfe5537
Author: Jarek Potiuk <ja...@potiuk.com>
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.
---
Dockerfile | 4 ++++
Dockerfile.ci | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/Dockerfile b/Dockerfile
index f2053f7..405470d 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 1ebf693..b96ab5d 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 \