From 5c323a9c562c6e886dbba460fc733a6f8590bf8b Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Sun, 18 Aug 2024 23:50:47 +0200 Subject: [PATCH] Remove debian bullseye support (#41568) --- .github/workflows/ci-image-build.yml | 2 +- .github/workflows/prod-image-build.yml | 2 +- .github/workflows/prod-image-extra-checks.yml | 21 -- .github/workflows/push-image-cache.yml | 2 +- Dockerfile | 19 +- Dockerfile.ci | 19 +- README.md | 12 +- dev/breeze/doc/ci/05_workflows.md | 1 - dev/breeze/doc/ci/06_diagrams.md | 1 - .../doc/images/output_ci-image_build.svg | 154 ++++++++------- .../doc/images/output_ci-image_build.txt | 2 +- .../doc/images/output_prod-image_build.svg | 180 +++++++++--------- .../doc/images/output_prod-image_build.txt | 2 +- .../src/airflow_breeze/global_constants.py | 2 +- .../howto/docker-compose/index.rst | 2 +- .../installation/dependencies.rst | 20 -- .../installation/prerequisites.rst | 3 +- docs/docker-stack/build.rst | 21 -- docs/docker-stack/changelog.rst | 4 + .../customizing/debian-bullseye.sh | 37 ---- generated/PYPI_README.md | 4 +- scripts/docker/install_os_dependencies.sh | 19 +- 22 files changed, 182 insertions(+), 347 deletions(-) delete mode 100755 docs/docker-stack/docker-examples/customizing/debian-bullseye.sh diff --git a/.github/workflows/ci-image-build.yml b/.github/workflows/ci-image-build.yml index 07ba028cf713..1c4b31b55a60 100644 --- a/.github/workflows/ci-image-build.yml +++ b/.github/workflows/ci-image-build.yml @@ -60,7 +60,7 @@ on: # yamllint disable-line rule:truthy default: "true" type: string debian-version: - description: "Base Debian distribution to use for the build (bookworm/bullseye)" + description: "Base Debian distribution to use for the build (bookworm)" type: string default: "bookworm" install-mysql-client-type: diff --git a/.github/workflows/prod-image-build.yml b/.github/workflows/prod-image-build.yml index c75701c4567d..75d9d0054ec7 100644 --- a/.github/workflows/prod-image-build.yml +++ b/.github/workflows/prod-image-build.yml @@ -63,7 +63,7 @@ on: # yamllint disable-line rule:truthy required: true type: string debian-version: - description: "Base Debian distribution to use for the build (bookworm/bullseye)" + description: "Base Debian distribution to use for the build (bookworm)" type: string default: "bookworm" install-mysql-client-type: diff --git a/.github/workflows/prod-image-extra-checks.yml b/.github/workflows/prod-image-extra-checks.yml index 380ecb5a67e6..82d327ba2f16 100644 --- a/.github/workflows/prod-image-extra-checks.yml +++ b/.github/workflows/prod-image-extra-checks.yml @@ -64,27 +64,6 @@ on: # yamllint disable-line rule:truthy required: true type: string jobs: - bullseye-image: - uses: ./.github/workflows/prod-image-build.yml - with: - runs-on-as-json-public: ${{ inputs.runs-on-as-json-public }} - build-type: "Bullseye" - upload-package-artifact: "false" - image-tag: bullseye-${{ inputs.image-tag }} - debian-version: "bullseye" - python-versions: ${{ inputs.python-versions }} - default-python-version: ${{ inputs.default-python-version }} - platform: "linux/amd64" - branch: ${{ inputs.branch }} - # Always build images during the extra checks and never push them - push-image: "false" - use-uv: ${{ inputs.use-uv }} - build-provider-packages: ${{ inputs.build-provider-packages }} - upgrade-to-newer-dependencies: ${{ inputs.upgrade-to-newer-dependencies }} - chicken-egg-providers: ${{ inputs.chicken-egg-providers }} - constraints-branch: ${{ inputs.constraints-branch }} - docker-cache: ${{ inputs.docker-cache }} - myssql-client-image: uses: ./.github/workflows/prod-image-build.yml with: diff --git a/.github/workflows/push-image-cache.yml b/.github/workflows/push-image-cache.yml index 1cdb5861e43a..0dc83a3fd66e 100644 --- a/.github/workflows/push-image-cache.yml +++ b/.github/workflows/push-image-cache.yml @@ -41,7 +41,7 @@ on: # yamllint disable-line rule:truthy required: true type: string debian-version: - description: "Base Debian distribution to use for the build (bookworm/bullseye)" + description: "Base Debian distribution to use for the build (bookworm)" type: string default: "bookworm" install-mysql-client-type: diff --git a/Dockerfile b/Dockerfile index 8c4a43274fd3..4aade68d5880 100644 --- a/Dockerfile +++ b/Dockerfile @@ -124,11 +124,7 @@ function get_runtime_apt_deps() { echo echo "DEBIAN CODENAME: ${debian_version}" echo - if [[ "${debian_version}" == "bullseye" ]]; then - debian_version_apt_deps="libffi7 libldap-2.4-2 libssl1.1 netcat" - else - debian_version_apt_deps="libffi8 libldap-2.5-0 libssl3 netcat-openbsd" - fi + debian_version_apt_deps="libffi8 libldap-2.5-0 libssl3 netcat-openbsd" echo echo "APPLIED INSTALLATION CONFIGURATION FOR DEBIAN VERSION: ${debian_version}" echo @@ -177,19 +173,6 @@ function install_debian_dev_dependencies() { echo echo "DEBIAN CODENAME: ${debian_version}" echo - if [[ "${debian_version}" == "bullseye" ]]; then - echo - echo "Bullseye detected - replacing dependencies in additional dev apt deps" - echo - # Replace dependencies in additional dev apt deps to be compatible with Bullseye - ADDITIONAL_DEV_APT_DEPS=${ADDITIONAL_DEV_APT_DEPS//libgcc-11-dev/libgcc-10-dev} - ADDITIONAL_DEV_APT_DEPS=${ADDITIONAL_DEV_APT_DEPS//netcat-openbsd/netcat} - echo - echo "Replaced bullseye dev apt dependencies" - echo "${ADDITIONAL_DEV_APT_COMMAND}" - echo - fi - # shellcheck disable=SC2086 apt-get install -y --no-install-recommends ${DEV_APT_DEPS} ${ADDITIONAL_DEV_APT_DEPS} } diff --git a/Dockerfile.ci b/Dockerfile.ci index 06a7343c82e2..4b49bf93d9e4 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -70,11 +70,7 @@ function get_runtime_apt_deps() { echo echo "DEBIAN CODENAME: ${debian_version}" echo - if [[ "${debian_version}" == "bullseye" ]]; then - debian_version_apt_deps="libffi7 libldap-2.4-2 libssl1.1 netcat" - else - debian_version_apt_deps="libffi8 libldap-2.5-0 libssl3 netcat-openbsd" - fi + debian_version_apt_deps="libffi8 libldap-2.5-0 libssl3 netcat-openbsd" echo echo "APPLIED INSTALLATION CONFIGURATION FOR DEBIAN VERSION: ${debian_version}" echo @@ -123,19 +119,6 @@ function install_debian_dev_dependencies() { echo echo "DEBIAN CODENAME: ${debian_version}" echo - if [[ "${debian_version}" == "bullseye" ]]; then - echo - echo "Bullseye detected - replacing dependencies in additional dev apt deps" - echo - # Replace dependencies in additional dev apt deps to be compatible with Bullseye - ADDITIONAL_DEV_APT_DEPS=${ADDITIONAL_DEV_APT_DEPS//libgcc-11-dev/libgcc-10-dev} - ADDITIONAL_DEV_APT_DEPS=${ADDITIONAL_DEV_APT_DEPS//netcat-openbsd/netcat} - echo - echo "Replaced bullseye dev apt dependencies" - echo "${ADDITIONAL_DEV_APT_COMMAND}" - echo - fi - # shellcheck disable=SC2086 apt-get install -y --no-install-recommends ${DEV_APT_DEPS} ${ADDITIONAL_DEV_APT_DEPS} } diff --git a/README.md b/README.md index f72e5ff9f7c5..7878d4d9ff5f 100644 --- a/README.md +++ b/README.md @@ -122,9 +122,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`. We also have support for legacy ``Debian Bullseye`` base image if you want to build a -custom image but it is deprecated and option to do it will be removed in the Dockerfile that -will accompany Airflow 2.9.3 so you are advised to switch to ``Debian Bookworm`` for your custom images. +`Debian Bookworm`. @@ -347,13 +345,9 @@ building and testing the OS version. Approximately 6 months before the end-of-re previous stable version of the OS, Airflow switches the images released to use the latest supported version of the OS. -For example since ``Debian Buster`` end-of-life was August 2022, Airflow switched the images in `main` branch -to use ``Debian Bullseye`` in February/March 2022. The version was used in the next MINOR release after -the switch happened. In case of the Bullseye switch - 2.3.0 version used ``Debian Bullseye``. -The images released in the previous MINOR version continue to use the version that all other releases -for the MINOR version used. Similar switch from ``Debian Bullseye`` to ``Debian Bookworm`` has been implemented +For example switch from ``Debian Bullseye`` to ``Debian Bookworm`` has been implemented before 2.8.0 release in October 2023 and ``Debian Bookworm`` will be the only option supported as of -Airflow 2.9.0. +Airflow 2.10.0. Users will continue to be able to build their images using stable Debian releases until the end of regular support and building and verifying of the images happens in our CI but no unit tests were executed using diff --git a/dev/breeze/doc/ci/05_workflows.md b/dev/breeze/doc/ci/05_workflows.md index 9ea39709c943..b70a81ef64ce 100644 --- a/dev/breeze/doc/ci/05_workflows.md +++ b/dev/breeze/doc/ci/05_workflows.md @@ -227,7 +227,6 @@ code. | Build CI images | Builds images in-workflow (not in the build images) | | Yes | Yes (1) | Yes (4) | | Generate constraints/CI verify | Generate constraints for the build and verify CI image | Yes (2) | Yes (2) | Yes (2) | Yes (2) | | Build PROD images | Builds images in-workflow (not in the build images) | | Yes | Yes (1) | Yes (4) | -| Build Bullseye PROD images | Builds images based on Bullseye debian | | Yes | Yes | Yes | | Run breeze tests | Run unit tests for Breeze | Yes | Yes | Yes | Yes | | Test OpenAPI client gen | Tests if OpenAPIClient continues to generate | Yes | Yes | Yes | Yes | | React WWW tests | React UI tests for new Airflow UI | Yes | Yes | Yes | Yes | diff --git a/dev/breeze/doc/ci/06_diagrams.md b/dev/breeze/doc/ci/06_diagrams.md index 89d6fc772c86..afe51a309e8e 100644 --- a/dev/breeze/doc/ci/06_diagrams.md +++ b/dev/breeze/doc/ci/06_diagrams.md @@ -379,7 +379,6 @@ sequenceDiagram Tests ->> GitHub Registry: Push PROD Images
[COMMIT_SHA] and Artifacts ->> Tests: Download source constraints - Note over Tests: Build Bullseye PROD Images
[COMMIT_SHA] and GitHub Registry ->> Tests: Pull CI Images
[COMMIT_SHA] Note over Tests: Run static checks diff --git a/dev/breeze/doc/images/output_ci-image_build.svg b/dev/breeze/doc/images/output_ci-image_build.svg index d2089f482e0e..131b618e403c 100644 --- a/dev/breeze/doc/images/output_ci-image_build.svg +++ b/dev/breeze/doc/images/output_ci-image_build.svg @@ -1,4 +1,4 @@ - +