Skip to content

Install OS dependencies on hardened images after dhi.io renumbering - #76200

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-dhi-renumbered-packages
Nov 1, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:fix-dhi-renumbered-packages

Conversation

@potiuk

@potiuk potiuk commented Nov 1, 2026

Copy link
Copy Markdown
Member

The CI image build on main fails while installing OS dependencies on the hardened images, for example the arm64 / Python 3.13 build:

gcc-14 : Depends: gcc-14-base (= 14.2.0-19+deb13u0+dhi5) but 14.2.0-19+dhi5 is to be installed
libgmp-dev : Depends: libgmp10 (= 2:6.3.0+dfsg-3+deb13u0+dhi2) but 2:6.3.0+dfsg-3+dhi2 is to be installed

Docker renumbered its builds again (14.2.0-19+dhi5 became 14.2.0-19+deb13u0+dhi5, which sorts lower) and the dhi.io apt repository dropped the old numbers, while the base images pinned in #76023 still ship them (docker-hardened-images/catalog#689). At the dhi.io pin priority of 999, apt will not downgrade the image's copies, so everything depending on the exact new versions (gcc, libgomp1 via graphviz, libgmp-dev) becomes uninstallable.

Pinning the base image to a digest cannot prevent this: the image is frozen, but the apt repository it installs from is live. The install script now moves only the installed packages whose version no repository offers any more to dhi.io's current build, before installing anything else. Packages still available are left alone, so PGDG's newer libpq5 keeps resolving.

Tested in the pinned arm64 Python 3.13 base image: 10 renumbered packages (gcc-14-base, libgcc-s1, libstdc++6, libgmp10, libzstd1, tar, ...) were aligned, after which build-essential libgmp-dev graphviz libgomp1 resolved cleanly. shellcheck reports no findings.

Follow-up

This unblocks main, but CI builds still install system packages from a live repository, so the same commit can build a different image on a different day. A follow-up PR will pin the OS-dependency layer itself: a scheduled job builds the base image plus install_os_dependencies.sh and pushes it to GHCR by digest, the CI image starts from that digest, and the existing upgrade check moves the pin only after the full CI has passed. Day-to-day CI then no longer talks to dhi.io for system packages, and a dhi.io change can only break the upgrade PR, not main. Standalone builds of the Dockerfile with a custom base image keep installing live, protected by the change in this PR.


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

The dhi.io apt repository is live, so it keeps moving under a base image pinned to a digest. Docker renumbered its builds again ("14.2.0-19+dhi5" became "14.2.0-19+deb13u0+dhi5", which sorts lower) and dropped the old numbers, while the pinned images still ship them. apt will not downgrade the image's copies at the dhi.io pin priority, so gcc, libgomp1 and libgmp-dev become uninstallable and the CI image build fails on main (docker-hardened-images/catalog#689). Pinning the base image cannot prevent this, so the build has to cope with the repository moving on its own.

Generated-by: Claude Opus 5
potiuk added a commit that referenced this pull request Nov 1, 2026
…enumbering (#76200) (#76202)

The dhi.io apt repository is live, so it keeps moving under a base image pinned to a digest. Docker renumbered its builds again ("14.2.0-19+dhi5" became "14.2.0-19+deb13u0+dhi5", which sorts lower) and dropped the old numbers, while the pinned images still ship them. apt will not downgrade the image's copies at the dhi.io pin priority, so gcc, libgomp1 and libgmp-dev become uninstallable and the CI image build fails on main (docker-hardened-images/catalog#689). Pinning the base image cannot prevent this, so the build has to cope with the repository moving on its own.
(cherry picked from commit 72d752a)


Generated-by: Claude Opus 5

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@potiuk
potiuk requested a review from ashb as a code owner November 1, 2026 09:42
@boring-cyborg boring-cyborg Bot added area:dev-tools area:production-image Production image improvements and fixes backport-to-v3-4-test Backport to v3-4-test labels Nov 1, 2026
@potiuk
potiuk merged commit 72d752a into apache:main Nov 1, 2026
28 of 29 checks passed
@potiuk
potiuk deleted the fix-dhi-renumbered-packages branch November 1, 2026 09:53
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-4-test

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 PR Link

vatsrahul1001 pushed a commit that referenced this pull request Nov 4, 2026
…enumbering (#76200) (#76202)

The dhi.io apt repository is live, so it keeps moving under a base image pinned to a digest. Docker renumbered its builds again ("14.2.0-19+dhi5" became "14.2.0-19+deb13u0+dhi5", which sorts lower) and dropped the old numbers, while the pinned images still ship them. apt will not downgrade the image's copies at the dhi.io pin priority, so gcc, libgomp1 and libgmp-dev become uninstallable and the CI image build fails on main (docker-hardened-images/catalog#689). Pinning the base image cannot prevent this, so the build has to cope with the repository moving on its own.
(cherry picked from commit 72d752a)


Generated-by: Claude Opus 5

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants