Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ on: # yamllint disable-line rule:truthy
required: true
type: string
debian-version:
description: "Base Debian distribution to use for the build (bookworm)"
description: "Base Debian distribution to use for the build (trixie)"
type: string
default: "bookworm"
default: "trixie"
install-mysql-client-type:
description: "MySQL client type to use during build (mariadb/mysql)"
type: string
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prod-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ on: # yamllint disable-line rule:truthy
default: "false"
type: string
debian-version:
description: "Base Debian distribution to use for the build (bookworm)"
description: "Base Debian distribution to use for the build (trixie)"
type: string
default: "bookworm"
default: "trixie"
install-mysql-client-type:
description: "MySQL client type to use during build (mariadb/mysql)"
type: string
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push-image-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ on: # yamllint disable-line rule:truthy
required: true
type: string
debian-version:
description: "Base Debian distribution to use for the build (bookworm)"
description: "Base Debian distribution to use for the build (trixie)"
type: string
default: "bookworm"
default: "trixie"
install-mysql-client-type:
description: "MySQL client type to use during build (mariadb/mysql)"
type: string
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ARG AIRFLOW_USER_HOME_DIR=/home/airflow
# latest released version here
ARG AIRFLOW_VERSION="3.3.1"

ARG BASE_IMAGE="debian:bookworm-slim"
ARG BASE_IMAGE="debian:trixie-slim"
ARG AIRFLOW_PYTHON_VERSION="3.13.15"

# PYTHON_LTO: Controls whether Python is built with Link-Time Optimization (LTO).
Expand Down Expand Up @@ -374,7 +374,7 @@ function install_cosign() {
}

function install_python() {
# If system python (3.11 in bookworm) is installed (via automatic installation of some dependencies for example), we need
# If system python from the base image is installed (via automatic installation of some dependencies for example), we need
# to fail and make sure that it is not there, because there can be strange interactions if we install
# newer version and system libraries are installed, because
# when you create a virtualenv part of the shared libraries of Python can be taken from the system
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#
# Related: https://github.com/apache/airflow/issues/58337
ARG PYTHON_LTO="true"
ARG BASE_IMAGE="debian:bookworm-slim"
ARG BASE_IMAGE="debian:trixie-slim"

##############################################################################################
# This is the script image where we keep all inlined bash scripts needed in other segments
Expand Down Expand Up @@ -314,7 +314,7 @@ function install_cosign() {
}

function install_python() {
# If system python (3.11 in bookworm) is installed (via automatic installation of some dependencies for example), we need
# If system python from the base image is installed (via automatic installation of some dependencies for example), we need
# to fail and make sure that it is not there, because there can be strange interactions if we install
# newer version and system libraries are installed, because
# when you create a virtualenv part of the shared libraries of Python can be taken from the system
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,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 Bookworm`.
`Debian Trixie`.

<!-- END Requirements, please keep comment here to allow auto update of PyPI readme.md -->
<!-- START Getting started, please keep comment here to allow auto update of PyPI readme.md -->
Expand Down
2 changes: 1 addition & 1 deletion airflow-core/docs/howto/docker-compose/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Older versions of ``docker-compose`` do not support all the features required by

.. code-block:: bash
docker run --rm "debian:bookworm-slim" bash -c 'numfmt --to iec $(echo $(($(getconf _PHYS_PAGES) * $(getconf PAGE_SIZE))))'
docker run --rm "debian:trixie-slim" bash -c 'numfmt --to iec $(echo $(($(getconf _PHYS_PAGES) * $(getconf PAGE_SIZE))))'
.. warning::

Expand Down
4 changes: 2 additions & 2 deletions airflow-core/docs/installation/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ System dependencies
You need certain system level requirements in order to install Airflow.
Those are requirements that are known to be needed for Linux Debian distributions:

Debian Bookworm (12)
Debian Trixie (13)
====================

Debian Bookworm is our platform of choice for development and testing. It is the most up-to-date
Debian Trixie is our platform of choice for development and testing. It is the most up-to-date
Debian distribution and it is the one we use for our CI/CD system. It is also the one we recommend
for development and testing as well as production use.

Expand Down
2 changes: 1 addition & 1 deletion airflow-core/docs/installation/prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ While we recommend a minimum of 4GB of memory for Airflow, the actual requiremen
but it is not a high priority. You should only use Linux-based distributions as "Production environment"
as this is the only environment that is supported. The only distribution 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 Bookworm``.
``Debian Trixie``.
2 changes: 1 addition & 1 deletion airflow-core/docs/security/security_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ Supported deployment platforms
..............................

Apache Airflow officially supports Linux-based deployment environments only. The reference
deployment, the CI matrix, and the official Docker image are all Linux-targeted (Debian Bookworm).
deployment, the CI matrix, and the official Docker image are all Linux-targeted (Debian Trixie).
macOS is supported for local development but is not a deployment platform. Windows is not supported
for deployment - except WSL2 for develop (buy only with POSIX filesystem which is the same as Linux).

Expand Down
1 change: 1 addition & 0 deletions airflow-core/newsfragments/71650.significant.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switch official Docker images from Debian Bookworm to Debian Trixie.
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ 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 bookworm with Long Term Support) and rely on security fixes provided
by Debian for system dependencies.
* we can use a specific supported Debian base image 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
that in case of Airflow is a number of dependencies to manage and extremely weak cross-platform support
Expand Down
22 changes: 11 additions & 11 deletions dev/breeze/doc/ci/02_images.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ plugin installed.
``` bash
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-bookworm" \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-trixie" \
--build-arg ADDITIONAL_AIRFLOW_EXTRAS="jdbc" \
--build-arg ADDITIONAL_PYTHON_DEPS="pandas" \
--build-arg ADDITIONAL_DEV_APT_DEPS="gcc g++" \
Expand All @@ -396,7 +396,7 @@ comment](https://github.com/apache/airflow/issues/8605#issuecomment-690065621):
``` bash
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-bookworm" \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-trixie" \
--build-arg AIRFLOW_INSTALLATION_METHOD="apache-airflow" \
--build-arg ADDITIONAL_AIRFLOW_EXTRAS="slack" \
--build-arg ADDITIONAL_PYTHON_DEPS="apache-airflow-providers-odbc \
Expand All @@ -409,7 +409,7 @@ DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
rocketchat_API \
typeform" \
--build-arg ADDITIONAL_DEV_APT_DEPS="msodbcsql17 unixodbc-dev g++" \
--build-arg ADDITIONAL_DEV_APT_COMMAND="curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add --no-tty - && curl https://packages.microsoft.com/config/debian/12/prod.list > /etc/apt/sources.list.d/mssql-release.list" \
--build-arg ADDITIONAL_DEV_APT_COMMAND="curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add --no-tty - && curl https://packages.microsoft.com/config/debian/13/prod.list > /etc/apt/sources.list.d/mssql-release.list" \
--build-arg ADDITIONAL_DEV_ENV_VARS="ACCEPT_EULA=Y"
--tag my-image:0.0.1
```
Expand All @@ -421,7 +421,7 @@ can be used for CI images:

| Build argument | Default value | Description |
|-----------------------------------|-----------------------------|-------------------------------------------------------------------------------------------------------------------|
| `PYTHON_BASE_IMAGE` | `python:3.10-slim-bookworm` | Base Python image |
| `PYTHON_BASE_IMAGE` | `python:3.10-slim-trixie` | Base Python image |
| `PYTHON_MAJOR_MINOR_VERSION` | `3.10` | major/minor version of Python (should match base image) |
| `DEPENDENCIES_EPOCH_NUMBER` | `2` | increasing this number will reinstall all apt dependencies |
| `ADDITIONAL_PIP_INSTALL_FLAGS` | | additional `pip` flags passed to the installation commands (except when reinstalling `pip` itself) |
Expand Down Expand Up @@ -457,15 +457,15 @@ This builds the CI image in version 3.10 with default extras ("all").
``` bash
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-bookworm" --tag my-image:0.0.1
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-trixie" --tag my-image:0.0.1
```

This builds the CI image in version 3.10 with "gcp" extra only.

``` bash
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-bookworm" \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-trixie" \
--build-arg AIRFLOW_EXTRAS=gcp --tag my-image:0.0.1
```

Expand All @@ -474,7 +474,7 @@ This builds the CI image in version 3.10 with "apache-beam" extra added.
``` bash
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-bookworm" \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-trixie" \
--build-arg ADDITIONAL_AIRFLOW_EXTRAS="apache-beam" --tag my-image:0.0.1
```

Expand All @@ -484,7 +484,7 @@ added.
``` bash
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-bookworm" \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-trixie" \
--build-arg ADDITIONAL_PYTHON_DEPS="mssql" --tag my-image:0.0.1
```

Expand All @@ -494,7 +494,7 @@ apt dev dependencies added.
```
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-bookworm" \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-trixie" \
--build-arg ADDITIONAL_DEV_APT_DEPS="gcc g++" --tag my-image:0.0.1
```

Expand All @@ -504,7 +504,7 @@ This builds the CI image in version 3.10 with "jdbc" extra and
```
DOCKER_BUILDKIT=1 docker build . -f Dockerfile.ci \
--pull \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-bookworm" \
--build-arg PYTHON_BASE_IMAGE="python:3.10-slim-trixie" \
--build-arg AIRFLOW_EXTRAS=jdbc \
--tag my-image:0.0.1
```
Expand Down Expand Up @@ -561,7 +561,7 @@ percent-encoded when you access them via UI (/ = %2F)

| Image | Name | Description |
|--------------------------|----------------------------------------|---------------------------------------------------------------|
| Python image (DockerHub) | python:\<X.Y\>-slim-bookworm | Base Python image used by both production and CI image. |
| Python image (DockerHub) | python:\<X.Y\>-slim-trixie | Base Python image used by both production and CI image. |
| CI image | airflow/\<BRANCH\>/ci/python\<X.Y\> | CI image - this is the image used for most of the tests. |
| PROD image | airflow/\<BRANCH\>/prod/python\<X.Y\> | faster to build or pull. Production image optimized for size. |

Expand Down
2 changes: 1 addition & 1 deletion dev/breeze/src/airflow_breeze/branch_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@

AIRFLOW_BRANCH = "main"
DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH = "constraints-main"
DEBIAN_VERSION = "bookworm"
DEBIAN_VERSION = "trixie"
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ def import_mount_cache(
make_sure_builder_configured(params=BuildCiParams(builder=builder))
dockerfile = """
# syntax=docker/dockerfile:1.4
FROM python:3.10-slim-bookworm
FROM python:3.10-slim-trixie
ARG TARGETARCH
ARG DEPENDENCY_CACHE_EPOCH=<REPLACE_FROM_DOCKER_CI>
COPY cache.tar.gz /root/.cache.tar.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
option_python_image = click.option(
"--python-image",
help="If specified this is the base python image used to build the image. "
"Should be something like: python:VERSION-slim-bookworm.",
"Should be something like: python:VERSION-slim-trixie.",
envvar="PYTHON_IMAGE",
)
option_runtime_apt_command = click.option(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ def _build_ts_sdk_docs(generated_path: Path) -> int:
f"{AIRFLOW_ROOT_PATH}:/repo",
"-w",
"/repo/ts-sdk/docs",
f"node:{TYPESCRIPT_SDK_NODE_VERSION}-bookworm-slim",
f"node:{TYPESCRIPT_SDK_NODE_VERSION}-trixie-slim",
"sh",
"-c",
# `npm ci` keeps the lock file authoritative; `npm run build` strips the ASF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2437,7 +2437,7 @@ def release_prod_images(
for python in python_versions:
build_args = {
"AIRFLOW_CONSTRAINTS": "constraints-no-providers",
"BASE_IMAGE": "debian:bookworm-slim",
"BASE_IMAGE": "debian:trixie-slim",
"AIRFLOW_PYTHON_VERSION": ALL_PYTHON_VERSION_TO_PATCHLEVEL_VERSION.get(python, python),
"AIRFLOW_VERSION": airflow_version,
"INCLUDE_PRE_RELEASE": "true" if include_pre_release else "false",
Expand Down
2 changes: 1 addition & 1 deletion dev/breeze/src/airflow_breeze/global_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
OPENSEARCH_INTEGRATION = "opensearch"
OTHER_CORE_INTEGRATIONS = [STATSD_INTEGRATION, KEYCLOAK_INTEGRATION]
OTHER_PROVIDERS_INTEGRATIONS = [OPENLINEAGE_INTEGRATION, OPENSEARCH_INTEGRATION]
ALLOWED_DEBIAN_VERSIONS = ["bookworm"]
ALLOWED_DEBIAN_VERSIONS = ["trixie"]
ALL_CORE_INTEGRATIONS = sorted(
[
*TESTABLE_CORE_INTEGRATIONS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class CommonBuildParams:
dry_run: bool = False
version_suffix: str | None = None
verbose: bool = False
debian_version: str = "bookworm"
debian_version: str = "trixie"
build_arg_values: list[str] = field(default_factory=list)

@property
Expand Down
10 changes: 10 additions & 0 deletions dev/breeze/tests/test_build_ci_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,21 @@

import pytest

from airflow_breeze.global_constants import ALLOWED_DEBIAN_VERSIONS
from airflow_breeze.params.build_ci_params import BuildCiParams
from airflow_breeze.params.build_prod_params import BuildProdParams

INLINE_CACHE_FLAG = "--build-arg=BUILDKIT_INLINE_CACHE=1"


@pytest.mark.parametrize("params_class", [BuildCiParams, BuildProdParams])
def test_default_debian_version_uses_trixie(params_class: type[BuildCiParams | BuildProdParams]):
params = params_class()
assert ALLOWED_DEBIAN_VERSIONS == ["trixie"]
assert params.debian_version == "trixie"
assert params.python_base_image == "debian:trixie-slim"


@pytest.mark.parametrize(
("docker_cache", "inline_cache_expected"),
[
Expand Down
1 change: 1 addition & 0 deletions docker-stack-docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ the Airflow team.
Airflow 3.4.0
~~~~~~~~~~~~~

* The Docker image base was updated from Debian Bookworm to Debian Trixie.
* The ``tdsodbc`` package was added to the image so that the FreeTDS ODBC driver
(``libtdsodbc.so``) is available for connecting to Sybase/TDS databases via ODBC.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export DOCKER_BUILDKIT=1

docker build . \
--pull \
--build-arg BASE_IMAGE="debian:bookworm-slim" \
--build-arg BASE_IMAGE="debian:trixie-slim" \
--build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}" \
--build-arg AIRFLOW_PYTHON_VERSION="3.13.15" \
--build-arg ADDITIONAL_PYTHON_DEPS="mpi4py==4.1.1" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export DOCKER_BUILDKIT=1
docker build . -f Dockerfile \
--pull \
--platform 'linux/amd64' \
--build-arg BASE_IMAGE="debian:bookworm-slim" \
--build-arg BASE_IMAGE="debian:trixie-slim" \
--build-arg AIRFLOW_PYTHON_VERSION="3.13.15" \
--build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}" \
--build-arg ADDITIONAL_AIRFLOW_EXTRAS="slack,odbc" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export DOCKER_BUILDKIT=1

docker build . \
--pull \
--build-arg BASE_IMAGE="debian:bookworm-slim" \
--build-arg BASE_IMAGE="debian:trixie-slim" \
--build-arg AIRFLOW_PYTHON_VERSION="3.13.15" \
--build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}" \
--build-arg ADDITIONAL_AIRFLOW_EXTRAS="jdbc" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export DOCKER_BUILDKIT=1

docker build . \
--pull \
--build-arg BASE_IMAGE="debian:bookworm-slim" \
--build-arg BASE_IMAGE="debian:trixie-slim" \
--build-arg AIRFLOW_PYTHON_VERSION="3.13.15" \
--build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}" \
--build-arg ADDITIONAL_AIRFLOW_EXTRAS="mssql,hdfs" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export AIRFLOW_VERSION=3.0.3
export DOCKER_BUILDKIT=1

docker build . \
--build-arg BASE_IMAGE="debian:bookworm-slim" \
--build-arg BASE_IMAGE="debian:trixie-slim" \
--build-arg AIRFLOW_PYTHON_VERSION="3.13.15" \
--build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}" \
--tag "my-pypi-selected-version:0.0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export DOCKER_BUILDKIT=1

docker build . \
--pull \
--build-arg BASE_IMAGE="debian:bookworm-slim" \
--build-arg BASE_IMAGE="debian:trixie-slim" \
--build-arg AIRFLOW_PYTHON_VERSION="3.13.15" \
--build-arg AIRFLOW_INSTALLATION_METHOD="apache-airflow" \
--build-arg AIRFLOW_VERSION="${AIRFLOW_VERSION}" \
Expand Down
4 changes: 2 additions & 2 deletions docker-stack-docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ You have four options:
2. Wait for a new version of Airflow and upgrade to it. Airflow images are updated to latest "non-conflicting"
dependencies and use latest "base" image at release time, so what you have in the reference images
at the moment we publish the image / release the version is what is "latest and greatest"
available at the moment with the base platform we use (Debian Bookworm is the reference image we use).
available at the moment with the base platform we use (Debian Trixie is the reference image we use).
This is one of good strategies you can take - build a process to upgrade your Airflow version regularly
- quickly after it has been released by the community, this will help you to keep up with the latest
security fixes in the dependencies.

3. If the base platform we use (currently Debian Bookworm) does not contain the latest versions you want
3. If the base platform we use (currently Debian Trixie) does not contain the latest versions you want
and you want to use other base images, you can take a look at what system dependencies are installed
and scripts in the latest ``Dockerfile`` of Airflow and take inspiration from it and build your own image
or copy it and modify it to your needs. See the
Expand Down
2 changes: 1 addition & 1 deletion generated/PYPI_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,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 Bookworm`.
`Debian Trixie`.

## Getting started

Expand Down
Loading
Loading