Skip to content

Backport #35445 to 2.0: Drop PostgreSQL server packages from the operator images - #37615

Merged
mohittilala merged 1 commit into
2.0from
fix/2.0-ingestion-drop-postgres-server
Nov 12, 2026
Merged

mohittilala merged 1 commit into
2.0from
fix/2.0-ingestion-drop-postgres-server

Conversation

@mohittilala

Copy link
Copy Markdown
Contributor

Describe your changes:

Backports the operator image part of #35445 to 2.0, and with it the libxml2 purge that #36052 had to leave out of the 2.0 backport of #35940.

The 2.0 operator images still install the PostgreSQL server packages (postgresql, postgresql-contrib, and from pgdg postgresql-client, postgresql-common, postgresql, postgresql-contrib). Nothing in the image runs a PostgreSQL server or the client tools, and those packages are the only reason libxml2 could not be purged on 2.0, as the comment #36052 added says. This PR:

  • installs only libpq-dev from pgdg, as main does, and drops postgresql and postgresql-contrib from the Debian package list. libpq-dev stays, since pip install psycopg2 still compiles against it, and it keeps libpq5 installed.
  • adds libxml2 shared-mime-info back to the dpkg --purge list and libxml2 back to the ldd check, with main's comment.

Only ingestion/operators/docker/Dockerfile and Dockerfile.ci change, and the two diffs are identical. #35445 also removed the server from the Airflow images (ingestion/Dockerfile and Dockerfile.ci), bumped aiobotocore and boto3 and swapped the Elasticsearch client. None of that is needed here, and those images install libxml2 directly anyway, so they are left as they are.

Type of change:

  • Improvement

High-level design:

N/A, small change.

Tests:

Use cases covered

  • The 2.0 operator image builds, purges libxml2 and still imports its native extensions.

Manual testing performed

  1. Built ingestion/operators/docker/Dockerfile.ci with --build-arg INGESTION_DEPENDENCY=slim, as the nightly does, for linux/arm64 on Docker Desktop. The build passed, including the image's own dpkg --purge, native import and ldd checks.
  2. In the built image: no libxml2, shared-mime-info, postgresql* or libllvm* packages, no libxml2.so* on disk, and no psql or pg_dump. libpq5 and libpq-dev are installed, psycopg2 imports, and lxml works on its bundled libxml2.
  3. git grep of ingestion/src and ingestion/operators finds nothing that runs psql, pg_dump, pg_restore, pg_ctl or initdb.

Not run: the plain Dockerfile, whose diff is identical, and an amd64 build.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.
  • Self-review: I reviewed the final diff against REVIEW.md and found nothing to fix.
  • Decision check: no new decision, this ports main's existing behavior to 2.0.

- Ports the operator image part of #35445 to 2.0: only libpq-dev comes from pgdg, and postgresql and postgresql-contrib leave the Debian package list
- The server packages were all that kept libxml2 installed on 2.0, so libxml2 and shared-mime-info are purged again as on main (#35940), with libxml2 back in the ldd check
- libpq-dev stays for the psycopg2 source build and keeps libpq5 installed
- The Airflow images are left as they are, since they install libxml2 directly
@mohittilala
mohittilala requested a review from a team as a code owner November 12, 2026 03:49
@mohittilala mohittilala added Ingestion safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Nov 12, 2026
@mohittilala
mohittilala requested review from akashverma0786 and removed request for a team November 12, 2026 03:49
@gitar-bot

gitar-bot Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Removing PostgreSQL packages and purging libxml2 from operator images changes runtime dependencies and could break workloads that implicitly rely on them.

Drops the PostgreSQL server packages and keeps only libpq-dev from pgdg in the 2.0 operator Dockerfiles, then restores libxml2 and shared-mime-info to the purge list and the ldd check. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@mohittilala
mohittilala merged commit 889d909 into 2.0 Nov 12, 2026
68 of 73 checks passed
@mohittilala
mohittilala deleted the fix/2.0-ingestion-drop-postgres-server branch November 12, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants