Skip to content

Commit

Permalink
Properly switch the "2.X.Y" image to point to "newest" Python
Browse files Browse the repository at this point in the history
The change #36003 attempted to change which Python version is used
for the "default" image ("2.8.0" and effectively "latest as well).

But it failed to do so - because of a bug. The changelog about this
have been removed in #36777 and we are bringing the change back
(this time properly implemented) and changelog - with aim to
release it in Airflow 2.9.0.

Fixes: #36740
  • Loading branch information
potiuk committed Jan 14, 2024
1 parent 3eed501 commit f0a0d9b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ def release_prod_images(
"--push",
]
run_command(docker_buildx_command)
if python == DEFAULT_PYTHON_MAJOR_MINOR_VERSION:
if python == ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS[-1]:
alias_image(
slim_image_name,
f"{dockerhub_repo}:slim-{airflow_version}",
Expand Down Expand Up @@ -1568,7 +1568,7 @@ def release_prod_images(
"--push",
]
run_command(docker_buildx_command)
if python == DEFAULT_PYTHON_MAJOR_MINOR_VERSION:
if python == ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS[-1]:
alias_image(image_name, f"{dockerhub_repo}:{airflow_version}")
# in case of re-tagging the images might need few seconds to refresh multi-platform images in DockerHub
time.sleep(10)
Expand Down
12 changes: 12 additions & 0 deletions docs/docker-stack/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ the Airflow team.
any Airflow version from the ``Airflow 2`` line. There is no guarantee that it will work, but if it does,
then you can use latest features from that image to build images for previous Airflow versions.

Airflow 2.9
~~~~~~~~~~~

* The "latest" image (i.e. default Airflow image when ``apache/airflow`` is used or
``apache/airflow:slim-latest``) uses now the newest supported Python version. Previously it was using
the "default" Python version which was Python 3.8 as of Airflow 2.8. With Airflow reference images
released for Airflow 2.9.0, the images are going to use Python 3.12 as this is the latest supported
version for Airflow 2.9 line. Users can use Python 3.8 by using ``apache/airflow:2.9.0-python3.8`` and
``apache/airflow:slim-2.9.0-python-3.8`` images respectively so while the change is potentially
breaking, it is very easy to switch to the previous behaviour.


Airflow 2.8
~~~~~~~~~~~

Expand Down

0 comments on commit f0a0d9b

Please sign in to comment.