Fixes 30263: Add pkg-config to ingestion-base images so mysqlclient builds#30264
Conversation
🟡 Playwright Results — all passed (22 flaky)✅ 4530 passed · ❌ 0 failed · 🟡 22 flaky · ⏭️ 95 skipped
🟡 22 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
There was a problem hiding this comment.
Pull request overview
Adds the missing pkg-config system dependency to the ingestion operator base images (both CI and non-CI Dockerfiles) so mysqlclient can compile from source when building on python:3.10-slim-bookworm, unblocking openmetadata/ingestion-base builds for INGESTION_DEPENDENCY=all.
Changes:
- Install
pkg-configiningestion/operators/docker/Dockerfileandingestion/operators/docker/Dockerfile.ci. - Document why
pkg-configis required in slim-based images (mysqlclient 2.2+ build behavior).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| ingestion/operators/docker/Dockerfile.ci | Adds pkg-config to the apt dependency list for the operator CI image. |
| ingestion/operators/docker/Dockerfile | Adds pkg-config to the apt dependency list for the operator release/non-CI image. |
9036aa6 to
3ef5d20
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
ingestion/src/metadata/ingestion/source/database/sql_column_handler.py:223
- Instead of suppressing
reportOptionalIterablein the comprehension, coercepk_columnsto a non-optional iterable in the loop. This removes the type-checker ignore and also keeps the code safe ifpk_columnsis everNoneat runtime (e.g., from SQLAlchemy inspector implementations).
pk_columns = [
clean_up_starting_ending_double_quotes_in_string(pk_column)
for pk_column in pk_columns # pyright: ignore[reportOptionalIterable]
]
|
|
Failed to cherry-pick changes to the 1.13 branch. |
…uilds (#30264) * Fixes 30263: Add pkg-config to ingestion-base images so mysqlclient builds * fix: add pyright ignore[reportOptionalIterable] --------- Co-authored-by: harshsoni2024 <harshsoni2024@gmail.com> Co-authored-by: harshsoni2024 <64592571+harshsoni2024@users.noreply.github.com>
Code Review 👍 Approved with suggestions 0 resolved / 1 findingsAdds 💡 Quality: Empty-dict fallback for list-typed pk_columns is misleading📄 ingestion/src/metadata/ingestion/source/database/sql_column_handler.py:187-191 pk_columns semantically represents a list of primary-key column names, but the fallback branch now returns Fall back to an empty list, matching the list type of pk_columns.🤖 Prompt for agentsOptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
…uilds (#30264) * Fixes 30263: Add pkg-config to ingestion-base images so mysqlclient builds * fix: add pyright ignore[reportOptionalIterable] --------- Co-authored-by: harshsoni2024 <harshsoni2024@gmail.com> Co-authored-by: harshsoni2024 <64592571+harshsoni2024@users.noreply.github.com>



Describe your changes:
Fixes #30263
#30024 swapped the ingestion operator image base from
python:3.10-bookwormtopython:3.10-slim-bookworm. The full image ships/usr/bin/pkg-configviabuildpack-deps, the slim image does not, and the apt list never namedpkg-configexplicitly because it had never needed to..[all]pulls thedorisplugin,pydoris-custom>=1.0.2,<1.5, whose metadata requiresmysqlclient<3,>=2.1.0.mysqlclientpublishes no Linux wheels for any version, so pip always builds it from source on Linux, and 2.2.0 switched header discovery frommysql_configtopkg-config. Without the binary the build aborts:Adding
pkg-configto the apt list in both operator Dockerfiles.Both files are changed on purpose.
docker-openmetadata-ingestion-base.ymlbuilds the non-CIingestion/operators/docker/Dockerfile, so patching only the.civariant would leave the released image broken.ingestion/Dockerfileandingestion/Dockerfile.cineed no change. They build onapache/airflow:3.1.5-python3.10and3.2.1-python3.10, which shipmysqlclient2.2.7 and 2.2.8 preinstalled, so the requirement is already satisfied and it is never source-built there.This needs cherry-picking to
1.13and1.12.14, both of which carry the same defect.1.12.13and earlier are clean, they still used the fullpython:3.10-bookwormbase.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
openmetadata/ingestion-basebuilds onlinux/amd64andlinux/arm64withINGESTION_DEPENDENCY=allmysqlclientresolves and compiles from source inside the slim baseUnit tests
Not applicable, Dockerfile-only change.
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
Repro script committed at
z-local.log/.../test-scripts/repro.sh, RED/GREEN against the real slim base:pkg-configmysqlclient (2, 2, 8, 'final', 0)Ran the exact 57-line apt block from
ingestion/operators/docker/Dockerfile.cion both arches to confirm nothing is being removed by apt, and thatpkg-configis the only thing missing:default-libmysqlclient-devii 1.1.0, installedlibmariadb-devii 1:10.11.18-0+deb12u1, installed at the upgraded version.pcfileslibmariadb.pc,mariadb.pc,mysqlclient.pcall presentmysql_config/usr/bin/mysql_configpresentpkg-configBase image check:
Full
ingestion/operators/docker/Dockerfile.cibuild with[all]onlinux/arm64is running and will be reported here when it completes.UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Summary by Gitar
pk_columnsextraction logic inSqlColumnHandlerMixinby adding# pyright: ignore[reportOptionalIterable]to the list comprehension.pkg-configtoingestion/operators/docker/Dockerfileandingestion/operators/docker/Dockerfile.cito supportmysqlclientsource builds.This will update automatically on new commits.
Greptile Summary
This PR restores support for building
mysqlclientin the slim ingestion operator images. The main changes are:pkg-configto the production operator image.Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
pkg-configto the production ingestion operator image.pkg-configto the CI ingestion operator image.Reviews (4): Last reviewed commit: "Merge branch 'main' into fix/ingestion-b..." | Re-trigger Greptile
Context used (3)