Repository navigation
Conversation
Image builds on the new hardened base images fail: the CI dev dependencies install dhi.io's postgresql-client-18, which puts psql and clusterdb straight into /usr/bin, and then PGDG, now on PostgreSQL 19, tries to install postgresql-client-common's wrappers at the same paths and dpkg refuses. The hardened repository's client is the one meant to receive the base image's security updates, so it is the better default; PGDG remains the fallback for the legacy flavor or a broken dhi.io package, and stays available on request for anyone who needs the newest client, e.g. a pg_dump matching a newer server. Generated-by: Claude Opus 5
potiuk
requested review from
amoghrajesh,
ashb,
bugraoz93,
gopidesupavan,
jason810496 and
jscheffl
as code owners
December 1, 2026 21:27
potiuk
enabled auto-merge (squash)
December 1, 2026 21:39
aaron-y-chen
approved these changes
Dec 1, 2026
aaron-y-chen
left a comment
Contributor
There was a problem hiding this comment.
I built the CI image's OS-dependencies stage (--target ci-os-deps) locally, from scratch on the default hardened base image (3.14.10-debian13-dev, linux/arm64). From this PR's base commit it fails with the same conflict:
dpkg: error processing archive .../postgresql-client-common_297.pgdg13+1_all.deb (--unpack):
trying to overwrite '/usr/bin/clusterdb', which is also in package postgresql-client-18 (18.7-3+dhi)With this PR it builds: psql, pg_dump and pg_config are 18.7 from dhi.io, libpq5 and libpq-dev are 18.7-3+dhi, dpkg --audit is clean, and psycopg2 builds from source against that libpq-dev.
amoghrajesh
approved these changes
Dec 2, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Image builds on the new hardened base images fail while installing the Postgres client, as seen on the
v3-4-testCI-environment upgrade (#77855):The CI dev dependencies install the hardened repository's (dhi.io)
postgresql-client-18, which putspsql,clusterdbetc. straight into/usr/bin.install_postgres.shthen adds PGDG at priority 1001, PGDG has moved to PostgreSQL 19, and itspostgresql-client-commonwrappers collide with those files.The client now comes from the hardened repository by default, the one that follows the base image's security updates:
INSTALL_POSTGRES_CLIENT_SOURCE=hardened(default) installs the newest versioned dhi.io client. dhi.io's unversionedpostgresql-clientmaps topostgresql-client-17, which leaves nothing onPATH. It falls back to PGDG when dhi.io has no client, the install fails,psqlis not onPATHafterwards, or an earlier build already set the image up from PGDG.INSTALL_POSTGRES_CLIENT_SOURCE=pgdgalways installs PGDG's newest client, e.g. for apg_dumpthat matches a newer server.The new build arg is part of the OS-dependencies marker inputs and is documented in the build-arg reference. The pinned OS-dependencies images and regular builds both use the default, so their markers still match.
Testing:
scripts/tests/docker/test_install_postgres.pycovers the client selection, the fallback triggers, the cleanup across dpkg states, and rejection of unknown sources, using stubbed apt/dpkg.sha256:4faac7ac…): CI and PROD paths with both sources, legacydebian:trixie-slim, a dhi.io client left unpacked, a rebuild on a PGDG-configured image, and a simulated broken dhi.io package. The old script reproduces theclusterdbfailure on the same image.breeze build-docs docker-stack, because image builds are unavailable in my environment.Once merged, the same change goes to
v3-4-testso #77855 can build.related: #77855
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Claude Opus 5) following the guidelines