Skip to content

Explain a BASE_IMAGE without Python in hardened image builds - #76645

Merged
shahar1 merged 1 commit into
apache:mainfrom
potiuk:docker-hardened-base-image-check
Nov 7, 2026
Merged

shahar1 merged 1 commit into
apache:mainfrom
potiuk:docker-hardened-base-image-check

Conversation

@potiuk

@potiuk potiuk commented Nov 7, 2026

Copy link
Copy Markdown
Member

Passing a plain Debian BASE_IMAGE to the default hardened flavor stops the build with python3: command not found, which does not say what to change. A user hit this building a customized image with debian:trixie-slim.

The script now names the two ways out: a BASE_IMAGE with Python, or AIRFLOW_IMAGE_FLAVOR=legacy. The build args reference also says BASE_IMAGE has to provide Python, which so far was only in the changelog.

Tested: dev/breeze/tests/test_os_deps_images.py passes, and the new test fails on the old script. hadolint and shellcheck need Docker and did not run locally. breeze verify was not run.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Opus 5

Generated-by: Claude Opus 5 following the guidelines

🤖 Generated with Claude Code

Passing a plain Debian BASE_IMAGE to the default hardened flavor stopped the build with
`python3: command not found`, which does not say what to change. The script now names
the two ways out, and the build args reference says BASE_IMAGE has to provide Python,
which so far was only mentioned in the changelog.

Generated-by: Claude Opus 5
@shahar1
shahar1 merged commit 2adbce7 into apache:main Nov 7, 2026
441 of 447 checks passed
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-4-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
❌ v3-4-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 2adbce7 v3-4-test

This should apply the commit to the v3-4-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

shahar1 added a commit that referenced this pull request Nov 7, 2026
…lds (#76645) (#76659)

Passing a plain Debian BASE_IMAGE to the default hardened flavor stops the
build with "python3: command not found", which does not say what to change.

dev/breeze/tests/test_os_deps_images.py does not exist on this branch, and the
rest of it on main tests code that was not backported, so it holds only the
new test here. The script reaches the check using bash builtins alone, so the
tool stubs the test has on main are not needed.

(cherry picked from commit 2adbce7)

Claude-Session: https://claude.ai/code/session_01BVx6g8K9pmgvCdYRrKCGPk

Co-authored-by: Jarek Potiuk <[email protected]>
vatsrahul1001 pushed a commit that referenced this pull request Nov 9, 2026
…lds (#76645) (#76659)

Passing a plain Debian BASE_IMAGE to the default hardened flavor stops the
build with "python3: command not found", which does not say what to change.

dev/breeze/tests/test_os_deps_images.py does not exist on this branch, and the
rest of it on main tests code that was not backported, so it holds only the
new test here. The script reaches the check using bash builtins alone, so the
tool stubs the test has on main are not needed.

(cherry picked from commit 2adbce7)

Claude-Session: https://claude.ai/code/session_01BVx6g8K9pmgvCdYRrKCGPk

Co-authored-by: Jarek Potiuk <[email protected]>
vatsrahul1001 pushed a commit that referenced this pull request Nov 27, 2026
…lds (#76645) (#76659)

Passing a plain Debian BASE_IMAGE to the default hardened flavor stops the
build with "python3: command not found", which does not say what to change.

dev/breeze/tests/test_os_deps_images.py does not exist on this branch, and the
rest of it on main tests code that was not backported, so it holds only the
new test here. The script reaches the check using bash builtins alone, so the
tool stubs the test has on main are not needed.

(cherry picked from commit 2adbce7)

Claude-Session: https://claude.ai/code/session_01BVx6g8K9pmgvCdYRrKCGPk

Co-authored-by: Jarek Potiuk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools area:production-image Production image improvements and fixes backport-to-v3-4-test Backport to v3-4-test kind:documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants