Skip to content

Commit

Permalink
Revert "Switch to Debian 11 (bullseye) as base for our dockerfiles (#…
Browse files Browse the repository at this point in the history
…21378)" (#21874)

This reverts commit 5d89dea.

The issue is not a random IO timeout -- it's a problem with the file in the repo.

Reverting this right now as all PRs are failing :(
  • Loading branch information
ashb committed Feb 28, 2022
1 parent 5d89dea commit 8299ade
Show file tree
Hide file tree
Showing 32 changed files with 50 additions and 52 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ env:
FORCE_ANSWER_TO_QUESTIONS: "yes"
CHECK_IMAGE_FOR_REBUILD: "true"
SKIP_CHECK_REMOTE_IMAGE: "true"
DEBIAN_VERSION: "bullseye"
DB_RESET: "true"
VERBOSE: "true"
GITHUB_REPOSITORY: ${{ github.repository }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ env:
FORCE_ANSWER_TO_QUESTIONS: "yes"
CHECK_IMAGE_FOR_REBUILD: "true"
SKIP_CHECK_REMOTE_IMAGE: "true"
DEBIAN_VERSION: "bullseye"
DB_RESET: "true"
VERBOSE: "true"
DOCKER_CACHE: "pulled"
Expand Down
16 changes: 8 additions & 8 deletions BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
bullseye buster
buster bullseye
-a, --install-airflow-version INSTALL_AIRFLOW_VERSION
Uses different version of Airflow when building PROD image.
Expand Down Expand Up @@ -1500,7 +1500,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
bullseye buster
buster bullseye
-a, --install-airflow-version INSTALL_AIRFLOW_VERSION
Uses different version of Airflow when building PROD image.
Expand Down Expand Up @@ -1575,7 +1575,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
bullseye buster
buster bullseye
-I, --production-image
Use production image for entering the environment and builds (not for tests).
Expand Down Expand Up @@ -1657,7 +1657,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
bullseye buster
buster bullseye
-v, --verbose
Show verbose information about executed docker, kind, kubectl, helm commands. Useful for
Expand Down Expand Up @@ -1708,7 +1708,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
bullseye buster
buster bullseye
####################################################################################################
Expand Down Expand Up @@ -1918,7 +1918,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
bullseye buster
buster bullseye
-b, --backend BACKEND
Backend to use for tests - it determines which database is used.
Expand Down Expand Up @@ -2002,7 +2002,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
bullseye buster
buster bullseye
-F, --force-build-images
Forces building of the local docker images. The images are rebuilt
Expand Down Expand Up @@ -2416,7 +2416,7 @@ This is the current syntax for `./breeze <./breeze>`_:
One of:
bullseye buster
buster bullseye
****************************************************************************************************
Choose backend to run for Airflow
Expand Down
4 changes: 2 additions & 2 deletions CI.rst
Original file line number Diff line number Diff line change
Expand Up @@ -607,11 +607,11 @@ have to be percent-encoded when you access them via UI (/ = %2F)
+--------------+----------------------------------------------------------+----------------------------------------------------------+
| Image | Name:tag (both cases latest version and per-build) | Description |
+==============+==========================================================+==========================================================+
| Python image | python:<X.Y>-slim-bullseye | Base Python image used by both production and CI image. |
| Python image | python:<X.Y>-slim-buster | Base Python image used by both production and CI image. |
| (DockerHub) | | Python maintainer release new versions of those image |
| | | with security fixes every few weeks in DockerHub. |
+--------------+----------------------------------------------------------+----------------------------------------------------------+
| Airflow | airflow/<BRANCH>/python:<X.Y>-slim-bullseye | Version of python base image used in Airflow Builds |
| Airflow | airflow/<BRANCH>/python:<X.Y>-slim-buster | Version of python base image used in Airflow Builds |
| python base | | We keep the "latest" version only to mark last "good" |
| image | | python base that went through testing and was pushed. |
+--------------+----------------------------------------------------------+----------------------------------------------------------+
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ARG AIRFLOW_USER_HOME_DIR=/home/airflow
# latest released version here
ARG AIRFLOW_VERSION="2.2.3"

ARG PYTHON_BASE_IMAGE="python:3.7-slim-bullseye"
ARG PYTHON_BASE_IMAGE="python:3.7-slim-buster"

ARG AIRFLOW_PIP_VERSION=22.0.3
ARG AIRFLOW_IMAGE_REPOSITORY="https://github.com/apache/airflow"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# WARNING: THIS DOCKERFILE IS NOT INTENDED FOR PRODUCTION USE OR DEPLOYMENT.
#
ARG PYTHON_BASE_IMAGE="python:3.7-slim-bullseye"
ARG PYTHON_BASE_IMAGE="python:3.7-slim-buster"
FROM ${PYTHON_BASE_IMAGE} as main

# Nolog bash flag is currently ignored - but you can replace it with other flags (for example
Expand Down
18 changes: 9 additions & 9 deletions IMAGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ It is recommended to build images with ``DOCKER_BUILDKIT=1`` variable
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
--build-arg ADDITIONAL_AIRFLOW_EXTRAS="jdbc"
--build-arg ADDITIONAL_PYTHON_DEPS="pandas"
--build-arg ADDITIONAL_DEV_APT_DEPS="gcc g++"
Expand All @@ -344,7 +344,7 @@ based on example in `this comment <https://github.com/apache/airflow/issues/8605
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
--build-arg AIRFLOW_INSTALLATION_METHOD="apache-airflow" \
--build-arg ADDITIONAL_AIRFLOW_EXTRAS="slack" \
--build-arg ADDITIONAL_PYTHON_DEPS="apache-airflow-providers-odbc \
Expand Down Expand Up @@ -372,7 +372,7 @@ The following build arguments (``--build-arg`` in docker build command) can be u
+------------------------------------------+------------------------------------------+------------------------------------------+
| Build argument | Default value | Description |
+==========================================+==========================================+==========================================+
| ``PYTHON_BASE_IMAGE`` | ``python:3.7-slim-bullseye`` | Base Python image |
| ``PYTHON_BASE_IMAGE`` | ``python:3.7-slim-buster`` | Base Python image |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``PYTHON_MAJOR_MINOR_VERSION`` | ``3.6`` | major/minor version of Python (should |
| | | match base image) |
Expand Down Expand Up @@ -489,7 +489,7 @@ This builds the CI image in version 3.7 with default extras ("all").
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" --tag my-image:0.0.1
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" --tag my-image:0.0.1
This builds the CI image in version 3.6 with "gcp" extra only.
Expand All @@ -498,7 +498,7 @@ This builds the CI image in version 3.6 with "gcp" extra only.
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
--build-arg AIRFLOW_EXTRAS=gcp --tag my-image:0.0.1
Expand All @@ -508,7 +508,7 @@ This builds the CI image in version 3.6 with "apache-beam" extra added.
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
--build-arg ADDITIONAL_AIRFLOW_EXTRAS="apache-beam" --tag my-image:0.0.1
This builds the CI image in version 3.6 with "mssql" additional package added.
Expand All @@ -517,7 +517,7 @@ This builds the CI image in version 3.6 with "mssql" additional package added.
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
--build-arg ADDITIONAL_PYTHON_DEPS="mssql" --tag my-image:0.0.1
This builds the CI image in version 3.6 with "gcc" and "g++" additional apt dev dependencies added.
Expand All @@ -526,7 +526,7 @@ This builds the CI image in version 3.6 with "gcc" and "g++" additional apt dev
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
--build-arg ADDITIONAL_DEV_APT_DEPS="gcc g++" --tag my-image:0.0.1
This builds the CI image in version 3.6 with "jdbc" extra and "default-jre-headless" additional apt runtime dependencies added.
Expand All @@ -535,7 +535,7 @@ This builds the CI image in version 3.6 with "jdbc" extra and "default-jre-headl
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-bullseye" \
--build-arg PYTHON_BASE_IMAGE="python:3.7-slim-buster" \
--build-arg AIRFLOW_EXTRAS=jdbc --build-arg ADDITIONAL_RUNTIME_DEPS="default-jre-headless" \
--tag my-image:0.0.1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ The work to add Windows support is tracked via [#10388](https://github.com/apach
it is not a high priority. You should only use Linux-based distros as "Production" execution environment
as this is the only environment that is supported. The only distro that is used in our CI tests and that
is used in the [Community managed DockerHub image](https://hub.docker.com/p/apache/airflow) is
`Debian Bullseye`.
`Debian Buster`.

## Getting started

Expand Down
2 changes: 1 addition & 1 deletion TESTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ Below are the steps you need to take to set up your virtual machine in the Googl
--zone="${GCP_ZONE}" \
--machine-type=f1-micro \
--subnet="${GCP_NETWORK_NAME}" \
--image=debian-11-bullseye-v20220120 \
--image=debian-10-buster-v20200210 \
--image-project=debian-cloud \
--preemptible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def extract():
# [END extract_virtualenv]

# [START transform_docker]
@task.docker(image='python:3.9-slim-bullseye', multiple_outputs=True)
@task.docker(image='python:3.9-slim-buster', multiple_outputs=True)
def transform(order_data_dict: dict):
"""
#### Transform task
Expand Down
2 changes: 1 addition & 1 deletion breeze-complete
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Those cannot be made read-only as the breeze-complete must be re-sourceable

_breeze_allowed_python_major_minor_versions="3.7 3.8 3.9"
_breeze_allowed_debian_versions="bullseye buster"
_breeze_allowed_debian_versions="buster bullseye"
_breeze_allowed_backends="sqlite mysql postgres mssql"
_breeze_allowed_integrations="cassandra kerberos mongo openldap pinot rabbitmq redis statsd trino all"
_breeze_allowed_generate_constraints_modes="source-providers pypi-providers no-providers"
Expand Down
2 changes: 1 addition & 1 deletion chart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@
"tag": {
"description": "The redis image tag.",
"type": "string",
"default": "6-bullseye"
"default": "6-buster"
},
"pullPolicy": {
"description": "The redis image pull policy.",
Expand Down
2 changes: 1 addition & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ images:
pullPolicy: IfNotPresent
redis:
repository: redis
tag: 6-bullseye
tag: 6-buster
pullPolicy: IfNotPresent
pgbouncer:
repository: apache/airflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ suited for the job:
* management and automated synchronisation of the environment can be easily done using simple, external
scripts that will check the "freshness" of the images and propose corrective actions (pulling or
rebuilding the image) for the user whenever they are needed (all that in cross-platform way)
* we can use specific base image (Debian Bullseye with Long Term Support) and rely on security fixes provided
* we can use specific base image (Debian Buster with Long Term Support) and rely on security fixes provided
by Debian for system dependencies.

The only alternative considered is a plain virtualenv managed individually by each user. The problem with
Expand Down
4 changes: 2 additions & 2 deletions dev/breeze/src/airflow_breeze/ci/build_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def airflow_image_repository(self):
@property
def python_base_image(self):
"""Construct Python Base Image"""
# ghcr.io/apache/airflow/main/python:3.8-slim-bullseye
return f'{self.airflow_image_name}/{self.airflow_branch}/python:{self.python_version}-slim-bullseye'
# ghcr.io/apache/airflow/main/python:3.8-slim-buster
return f'{self.airflow_image_name}/{self.airflow_branch}/python:{self.python_version}-slim-buster'

@property
def airflow_ci_local_manifest_image(self):
Expand Down
6 changes: 3 additions & 3 deletions docs/apache-airflow-providers-odbc/connections/odbc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Extra (optional)
.. code-block:: json
{
"Driver": "ODBC Driver 18 for SQL Server",
"Driver": "ODBC Driver 17 for SQL Server",
"ApplicationIntent": "ReadOnly",
"TrustedConnection": "Yes"
}
Expand All @@ -96,7 +96,7 @@ Extra (optional)

.. code-block:: bash
export AIRFLOW_CONN_MSSQL_DEFAULT='mssql-odbc://my_user:XXXXXXXXXXXX@1.1.1.1:1433/my_database?Driver=ODBC+Driver+18+for+SQL+Server&ApplicationIntent=ReadOnly&TrustedConnection=Yes'
export AIRFLOW_CONN_MSSQL_DEFAULT='mssql-odbc://my_user:XXXXXXXXXXXX@1.1.1.1:1433/my_database?Driver=ODBC+Driver+17+for+SQL+Server&ApplicationIntent=ReadOnly&TrustedConnection=Yes'
If you want to pass keyword arguments to ``pyodbc.connect``, you may supply a dictionary
under ``connect_kwargs``.
Expand All @@ -107,7 +107,7 @@ Extra (optional)
.. code-block:: json
{
"Driver": "ODBC Driver 18 for SQL Server",
"Driver": "ODBC Driver 17 for SQL Server",
"ApplicationIntent": "ReadOnly",
"TrustedConnection": "Yes",
"connect_kwargs": {
Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow/howto/set-up-database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ Official Docker image we have ODBC driver installed, so you need to specify the

.. code-block:: text
mssql+pyodbc://<user>:<password>@<host>[:port]/<db>[?driver=ODBC+Driver+18+for+SQL+Server]
mssql+pyodbc://<user>:<password>@<host>[:port]/<db>[?driver=ODBC+Driver+17+for+SQL+Server]
Other configuration options
Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow/installation/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ System dependencies
'''''''''''''''''''

You need certain system level requirements in order to install Airflow. Those are requirements that are known
to be needed for Linux system (Tested on Ubuntu Bullseye LTS) :
to be needed for Linux system (Tested on Ubuntu Buster LTS) :

.. code-block:: bash
Expand Down
2 changes: 1 addition & 1 deletion docs/apache-airflow/installation/prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ The work to add Windows support is tracked via `#10388 <https://github.com/apach
it is not a high priority. You should only use Linux-based distros as "Production" execution environment
as this is the only environment that is supported. The only distro that is used in our CI tests and that
is used in the `Community managed DockerHub image <https://hub.docker.com/p/apache/airflow>`__ is
``Debian Bullseye``.
``Debian Buster``.
2 changes: 1 addition & 1 deletion docs/apache-airflow/start/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Older versions of ``docker-compose`` do not support all the features required by

.. code-block:: bash
docker run --rm "debian:bullseye-slim" bash -c 'numfmt --to iec $(echo $(($(getconf _PHYS_PAGES) * $(getconf PAGE_SIZE))))'
docker run --rm "debian:buster-slim" bash -c 'numfmt --to iec $(echo $(($(getconf _PHYS_PAGES) * $(getconf PAGE_SIZE))))'
``docker-compose.yaml``
Expand Down
2 changes: 1 addition & 1 deletion docs/docker-stack/build-arg-ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Those are the most common arguments that you use when you want to build a custom
+------------------------------------------+------------------------------------------+---------------------------------------------+
| Build argument | Default value | Description |
+==========================================+==========================================+=============================================+
| ``PYTHON_BASE_IMAGE`` | ``python:3.7-slim-bullseye`` | Base python image. |
| ``PYTHON_BASE_IMAGE`` | ``python:3.7-slim-buster`` | Base python image. |
+------------------------------------------+------------------------------------------+---------------------------------------------+
| ``AIRFLOW_VERSION`` | :subst-code:`|airflow-version|` | version of Airflow. |
+------------------------------------------+------------------------------------------+---------------------------------------------+
Expand Down
4 changes: 2 additions & 2 deletions docs/docker-stack/build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ to make sure to update those requirements and rebuild the images to account for
Choosing Debian version when customizing the image
--------------------------------------------------

The reference Airflow image currently uses ``bullseye`` version of Debian (also known as Debian 10) as base
image, however when you want to build a custom image, you can also use ``buster`` version of base images.
The reference Airflow image currently uses ``buster`` version of Debian (also known as Debian 10) as base
image, however when you want to build a custom image, you can also use ``bullseye`` version of base images.
Airflow supports both versions of Debian. You choose which version of Debian to use by choosing the
right version of python base image:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cd "${AIRFLOW_SOURCES}"

# [START build]
export AIRFLOW_VERSION=2.2.2
export DEBIAN_VERSION="bullseye"
export DEBIAN_VERSION="buster"

docker build . \
--pull \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cd "${AIRFLOW_SOURCES}"

# [START build]
export AIRFLOW_VERSION=2.2.2
export DEBIAN_VERSION="bullseye"
export DEBIAN_VERSION="buster"

docker build . -f Dockerfile \
--pull \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -euo pipefail
AIRFLOW_SOURCES="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../" && pwd)"
cd "${AIRFLOW_SOURCES}"
# [START build]
export DEBIAN_VERSION="bullseye"
export DEBIAN_VERSION="buster"

docker build . \
--pull \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AIRFLOW_SOURCES="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../" && pwd)"
cd "${AIRFLOW_SOURCES}"

# [START build]
export DEBIAN_VERSION="bullseye"
export DEBIAN_VERSION="buster"

docker build . \
--pull \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AIRFLOW_SOURCES="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../../../" && pwd)"
cd "${AIRFLOW_SOURCES}"

# [START build]
export DEBIAN_VERSION="bullseye"
export DEBIAN_VERSION="buster"
docker build . \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.8-slim-${DEBIAN_VERSION}" \
Expand Down
Loading

0 comments on commit 8299ade

Please sign in to comment.