Repository navigation
Fixes #34840: remove compilers from ingestion-base, keep DB2 clidriverVersion working [Backport #34839 - 2.0] - #35257
Conversation
CVE-2026-95619 and CVE-2026-102010 (libstdc++) are reported on all 21 src:gcc-14 binaries in ingestion-base, and the compilers are build-only. - Dockerfile, Dockerfile.ci: purge build-essential and gcc in the final root stage, after the last compiling pip install; autoremove drops the rest (39 packages on amd64, 38 on arm64). Keep libstdc++6, libgcc-s1, gcc-14-base, libgomp1, xz-utils and bzip2. Fail the build if a compiler survives or MySQLdb, psycopg2, kerberos, _mysql_connector or ibm_db stop importing. Upgrade the remaining gcc runtime libs so Debian's fix ships on the next build. - DB2: clidriverVersion rebuilt ibm_db from source at connection time, which needs gcc. Download the requested clidriver (IBM, then its GitHub mirror) and swap it in under the prebuilt ibm_db instead. A failed download or swap keeps the bundled driver. 2.0: the import check runs after 2.0's setuptools>=83 layer and also covers cx_Oracle, which 2.0 still compiles before the purge. (cherry picked from commit d6265fe)
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved🟡 Medium risk · Purging compilers and swapping DB2 driver archives could leave ingestion images unable to load native connectors or the requested driver. Removes the C/C++ toolchain from the VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledOptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
Backport of #34839 (d6265fe) to
2.0. Fixes #34840 on 2.0.This removes the C/C++ toolchain from
ingestion-base, which clears CVE-2026-95619 and CVE-2026-102010 (libstdc++) from everysrc:gcc-14binary except the 4 runtime libraries that must stay. DB2clidriverVersionnow swaps in the requested driver instead of rebuildingibm_dbat connection time, so it no longer needs a compiler. For the design and the manual tests, see #34839.Differences from the main commit
Four files conflicted. Each was resolved as follows:
Dockerfile,Dockerfile.ci: 2.0 has apip install --upgrade "setuptools>=83"layer after the root stage. It lifts thesetuptools<81pin thatcx_Oracleneeds; main does that upgrade earlier instead. Both layers are kept, with the setuptools upgrade first and the import check second, so the check also runs after the upgrade. The setuptools upgrade installs a wheel and needs no compiler.cx_Oracle: 2.0 still compilescx_Oraclefrom source before the purge, so it belongs in the check. Importing it doesn't need the Oracle client, which is loaded when a connection is opened.db2/utils.py: uses main's version. The only 2.0-specific lines were# noqa: PLC0415markers on local imports that the rewrite removes. The marker on thesqlalchemy_ibmiimport is kept.db2/utils.pyentries that main removed (32 lines).The apt layers in main and 2.0 are identical, and both pin the same
ibm-db, so the purge removes the same packages that #34839 verified.Rollout
Dockerfileinstallsopenmetadata-ingestion~=${RI_VERSION}from PyPI. The image change and the DB2 change therefore have to ship in the same 2.0 release, as noted on #34839.Tests
pytest tests/unit/source/database/db2/on this branch: 37 passed, 5 skipped. The skipped tests are thesqlalchemy_ibmitests intest_connection.py, because that package isn't installed locally. Everytest_clidriver.pytest ran.ruff checkandruff format --checkon the changed Python files: clean.db2/utils.py: reports exactly what pristine2.0reports, with nothing new. The 4 removed baseline entries no longer fire.Type of change:
🤖 Generated with Claude Code