Repository navigation
fix(security): clear the remaining fixable CVEs in the ingestion images - #31338
Conversation
The 10 Aug scan of the release image reports 43 findings, only 5 of which have a fix available; the other 38 are Debian packages with no upstream fix in bookworm. This clears all 5. black -- CVE-2026-31900 (Critical), CVE-2026-32274 (High), CVE-2024-21503 (Medium) black is not installed in any release image; it is a dev extra only. The sole occurrence on disk is spacy/tests/package/requirements.txt, a test fixture inside the spaCy wheel that pins black==22.3.0 and that scanners parse as a dependency manifest. Strip it after the final pip install in every image that ships spaCy. This strip previously shipped inside patch_pyspark_jars.sh and was reverted along with it in #31074, because the jar-fetching half failed on sha mismatches. Nothing in this script fetches anything. It also cannot fail a build: every path exits 0, including python missing and an unexpected traceback, since the fixture is inert data and not worth blocking a release over. Walking sys.path rather than resolving spaCy once via find_spec is deliberate -- a user-site install shadows a system-site one, and find_spec would strip only the shadowing copy while the scanner kept reading the other, passing the build with the finding intact. apache-airflow 3.2.2 -> 3.3.0 -- CVE-2026-48891 (Medium) /ui/dependencies leaked Dag IDs the caller cannot read through the dep.source and dep.target fields, a residual gap in the CVE-2026-28563 fix. The pin, both base image tags, the vendored constraints file and the integration-test image move together. The constraints file is not a straight re-download. It carries two hand-patches marked "keep on regeneration" -- impyla and thrift at 0.24.0 for CVE-2026-66053 / CVE-2026-41608 / CVE-2026-48586 -- and upstream constraints-3.3.0 still ships impyla==0.22.0 and thrift==0.16.0. Both are re-applied, so the file diverges from upstream in exactly those two blocks and nothing else. A plain regeneration would have traded one airflow CVE for three thrift ones. setuptools 80.10.2 -> 84 -- CVE-2026-59890 (Medium) The setuptools<81 pin guards two separate things. cx_Oracle's setup.py imports pkg_resources, which 81.0.0 removed, and it has no cp312 wheel, so a source build is mandatory; that half of the pin stays. The other half, sqlalchemy-redshift 0.8.14, no longer applies: 1.0.0 moved to importlib.metadata and setup.py has pinned ~=1.0.0 since #27776. The 0.8.14 entries removed here are a regression rather than a decision. #27776 deleted them from all three install sites; #26896, branched before it and merged after, then rewrote the same line to drop sqlalchemy-databricks and carried the stale redshift entry back in. Being a single-line replacement, it merged without conflict. cx_Oracle and mysqlclient need pkg_resources only at build time -- once built, both import cleanly against 84 -- so the lift becomes a final layer after the last source build instead of replacing the pin. Co-Authored-By: Claude Opus 5 <[email protected]>
❌ 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 |
There was a problem hiding this comment.
Pull request overview
This PR aims to eliminate the remaining fixable CVE findings reported in ingestion-related Docker images by updating the Airflow baseline, removing a stale vulnerable pin, lifting the setuptools build-time pin after source builds, and stripping a spaCy test fixture that security scanners misinterpret as an installed black dependency.
Changes:
- Bump Apache Airflow references to
3.3.0across ingestion pins and integration-test images. - Remove the stale
sqlalchemy-redshift==0.8.14preinstall and rely on the intendedsqlalchemy-redshift~=1.0.0dependency. - Add a post-install strip step to remove spaCy’s
spacy/tests/**/requirements.txtfixture and add a final setuptools upgrade layer.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| ingestion/tests/integration/airflow/Dockerfile | Bumps the Airflow base image and pinned Airflow version used in integration tests. |
| ingestion/tests/integration/airflow/conftest.py | Updates the integration-test base image tag to Airflow 3.3.0. |
| ingestion/setup.py | Updates the Airflow pinned version used by ingestion extras. |
| ingestion/scripts/strip_spacy_test_fixture.sh | Adds a build-time script to remove spaCy’s scanner-triggering test fixture. |
| ingestion/operators/docker/Dockerfile.ci | Removes the stale redshift pin and adds setuptools lift + spaCy fixture strip to the operator CI image. |
| ingestion/operators/docker/Dockerfile | Adds setuptools lift + spaCy fixture strip to the operator image. |
| ingestion/Dockerfile.ci | Bumps Airflow image/constraints, removes stale redshift pin, and adds setuptools lift + spaCy fixture strip. |
| ingestion/Dockerfile | Bumps Airflow image/constraints URL and adds setuptools lift + spaCy fixture strip. |
| ingestion/airflow-constraints-3.3.0.txt | Updates the vendored Airflow 3.3.0 constraints content (including the impyla/thrift hand-patches). |
| .github/actions/setup-openmetadata-test-environment/action.yml | Aligns CI test environment setup by removing the stale redshift pin. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
@gitar-bot Good catch on the ordering — the comment only guarded against later pip layers, and The airflow base image already ships without So the state isn't new. Our Supporting scans:
Moved it anyway, since it was free. RUN airflow db migrate && rm -f /opt/airflow/airflow.db
RUN pip install --upgrade "setuptools>=83"
The two Residual, stated plainly: the migrate test ran on the bare base image, not on a fully-built |
Move the setuptools>=83 lift after `airflow db migrate` in both airflow images: the lift removes pkg_resources and migrate runs Airflow's import chain. Migrate is the last line in both files, so this costs nothing. Fall back to python3 in strip_spacy_test_fixture.sh when no `python` shim exists; without it the strip silently skips and the black findings survive a green build. `python` stays first -- pip installs into whichever interpreter it resolves to. Co-Authored-By: Claude Opus 5 <[email protected]>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
Suppressed comments (3)
ingestion/Dockerfile:146
- This comment says the spaCy strip “must run after the final pip install”, but this Dockerfile still runs additional steps afterwards (notably
airflow db migrateand the finalpip install --upgrade setuptools>=83). Since only spaCy reinstall would restore the fixture, consider clarifying the wording to avoid future confusion.
# Strip spaCy's bundled test fixture, which scanners misreport as an installed black.
# See ingestion/scripts/strip_spacy_test_fixture.sh for the rationale. Must run after the
# final pip install, or a later install restores the fixture.
ingestion/scripts/strip_spacy_test_fixture.sh:11
- The new script uses an Apache-2.0 license header, but ingestion scripts in this repo use the Collate Community License header (e.g., ingestion/ingestion_dependency.sh). This mismatch can break license checks and is inconsistent with the rest of the ingestion codebase.
#!/usr/bin/env bash
# Copyright 2021 Collate
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
ingestion/Dockerfile.ci:180
- This comment says the spaCy strip “must run after the final pip install”, but this Dockerfile continues with later steps (including the final
pip install --upgrade setuptools>=83). Since only a spaCy reinstall would restore the fixture, consider clarifying the wording to avoid implying it must be the literal last pip command.
# Strip spaCy's bundled test fixture, which scanners misreport as an installed black.
# See ingestion/scripts/strip_spacy_test_fixture.sh for the rationale. Must run after the
# final pip install, or a later install restores the fixture.
|
✅ Playwright Results — workflow succeededValidated commit ✅ 612 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 56m 44s ⏱️ Max setup 3m 10s · max shard execution 20m 14s · max shard-job elapsed before upload 24m 30s · reporting 5s 🌐 216.72 requests/attempt · 2.76 app boots/UI scenario · 16.56% common-shard skew Optimization targets still in progress:
🟡 1 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 |
| uv pip install "setuptools<81" | ||
| uv pip install --no-build-isolation "cx_Oracle>=8.3.0,<9" | ||
| uv pip install --no-deps "sqlalchemy-redshift==0.8.14" "sqlalchemy-ibmi==0.9.3" "pydoris-custom==1.1.0" | ||
| uv pip install --no-deps "sqlalchemy-ibmi==0.9.3" "pydoris-custom==1.1.0" |
There was a problem hiding this comment.
this was earlier removed as part of sqlalchemy 1.0.0 upgrade & databricks migration. later got introduced by merge changes. but should be ok to remove
Code Review ✅ Approved 1 resolved / 1 findingsClears remaining CVEs in ingestion images by upgrading Airflow and setuptools, updating constraints, and stripping spaCy test fixtures, addressing the airflow db migrate runs after pkg_resources is removed finding. No issues found. ✅ 1 resolved✅ Edge Case: airflow db migrate runs after pkg_resources is removed
OptionsDisplay: verbose → Showing more information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
…es (#31338) * fix(security): clear the remaining fixable CVEs in the ingestion images The 10 Aug scan of the release image reports 43 findings, only 5 of which have a fix available; the other 38 are Debian packages with no upstream fix in bookworm. This clears all 5. black -- CVE-2026-31900 (Critical), CVE-2026-32274 (High), CVE-2024-21503 (Medium) black is not installed in any release image; it is a dev extra only. The sole occurrence on disk is spacy/tests/package/requirements.txt, a test fixture inside the spaCy wheel that pins black==22.3.0 and that scanners parse as a dependency manifest. Strip it after the final pip install in every image that ships spaCy. This strip previously shipped inside patch_pyspark_jars.sh and was reverted along with it in #31074, because the jar-fetching half failed on sha mismatches. Nothing in this script fetches anything. It also cannot fail a build: every path exits 0, including python missing and an unexpected traceback, since the fixture is inert data and not worth blocking a release over. Walking sys.path rather than resolving spaCy once via find_spec is deliberate -- a user-site install shadows a system-site one, and find_spec would strip only the shadowing copy while the scanner kept reading the other, passing the build with the finding intact. apache-airflow 3.2.2 -> 3.3.0 -- CVE-2026-48891 (Medium) /ui/dependencies leaked Dag IDs the caller cannot read through the dep.source and dep.target fields, a residual gap in the CVE-2026-28563 fix. The pin, both base image tags, the vendored constraints file and the integration-test image move together. The constraints file is not a straight re-download. It carries two hand-patches marked "keep on regeneration" -- impyla and thrift at 0.24.0 for CVE-2026-66053 / CVE-2026-41608 / CVE-2026-48586 -- and upstream constraints-3.3.0 still ships impyla==0.22.0 and thrift==0.16.0. Both are re-applied, so the file diverges from upstream in exactly those two blocks and nothing else. A plain regeneration would have traded one airflow CVE for three thrift ones. setuptools 80.10.2 -> 84 -- CVE-2026-59890 (Medium) The setuptools<81 pin guards two separate things. cx_Oracle's setup.py imports pkg_resources, which 81.0.0 removed, and it has no cp312 wheel, so a source build is mandatory; that half of the pin stays. The other half, sqlalchemy-redshift 0.8.14, no longer applies: 1.0.0 moved to importlib.metadata and setup.py has pinned ~=1.0.0 since #27776. The 0.8.14 entries removed here are a regression rather than a decision. #27776 deleted them from all three install sites; #26896, branched before it and merged after, then rewrote the same line to drop sqlalchemy-databricks and carried the stale redshift entry back in. Being a single-line replacement, it merged without conflict. cx_Oracle and mysqlclient need pkg_resources only at build time -- once built, both import cleanly against 84 -- so the lift becomes a final layer after the last source build instead of replacing the pin. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(security): address review on the ingestion CVE cleanup Move the setuptools>=83 lift after `airflow db migrate` in both airflow images: the lift removes pkg_resources and migrate runs Airflow's import chain. Migrate is the last line in both files, so this costs nothing. Fall back to python3 in strip_spacy_test_fixture.sh when no `python` shim exists; without it the strip silently skips and the black findings survive a green build. `python` stays first -- pip installs into whichever interpreter it resolves to. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
…es (open-metadata#31338) * fix(security): clear the remaining fixable CVEs in the ingestion images The 10 Aug scan of the release image reports 43 findings, only 5 of which have a fix available; the other 38 are Debian packages with no upstream fix in bookworm. This clears all 5. black -- CVE-2026-31900 (Critical), CVE-2026-32274 (High), CVE-2024-21503 (Medium) black is not installed in any release image; it is a dev extra only. The sole occurrence on disk is spacy/tests/package/requirements.txt, a test fixture inside the spaCy wheel that pins black==22.3.0 and that scanners parse as a dependency manifest. Strip it after the final pip install in every image that ships spaCy. This strip previously shipped inside patch_pyspark_jars.sh and was reverted along with it in open-metadata#31074, because the jar-fetching half failed on sha mismatches. Nothing in this script fetches anything. It also cannot fail a build: every path exits 0, including python missing and an unexpected traceback, since the fixture is inert data and not worth blocking a release over. Walking sys.path rather than resolving spaCy once via find_spec is deliberate -- a user-site install shadows a system-site one, and find_spec would strip only the shadowing copy while the scanner kept reading the other, passing the build with the finding intact. apache-airflow 3.2.2 -> 3.3.0 -- CVE-2026-48891 (Medium) /ui/dependencies leaked Dag IDs the caller cannot read through the dep.source and dep.target fields, a residual gap in the CVE-2026-28563 fix. The pin, both base image tags, the vendored constraints file and the integration-test image move together. The constraints file is not a straight re-download. It carries two hand-patches marked "keep on regeneration" -- impyla and thrift at 0.24.0 for CVE-2026-66053 / CVE-2026-41608 / CVE-2026-48586 -- and upstream constraints-3.3.0 still ships impyla==0.22.0 and thrift==0.16.0. Both are re-applied, so the file diverges from upstream in exactly those two blocks and nothing else. A plain regeneration would have traded one airflow CVE for three thrift ones. setuptools 80.10.2 -> 84 -- CVE-2026-59890 (Medium) The setuptools<81 pin guards two separate things. cx_Oracle's setup.py imports pkg_resources, which 81.0.0 removed, and it has no cp312 wheel, so a source build is mandatory; that half of the pin stays. The other half, sqlalchemy-redshift 0.8.14, no longer applies: 1.0.0 moved to importlib.metadata and setup.py has pinned ~=1.0.0 since open-metadata#27776. The 0.8.14 entries removed here are a regression rather than a decision. open-metadata#27776 deleted them from all three install sites; open-metadata#26896, branched before it and merged after, then rewrote the same line to drop sqlalchemy-databricks and carried the stale redshift entry back in. Being a single-line replacement, it merged without conflict. cx_Oracle and mysqlclient need pkg_resources only at build time -- once built, both import cleanly against 84 -- so the lift becomes a final layer after the last source build instead of replacing the pin. Co-Authored-By: Claude Opus 5 <[email protected]> * fix(security): address review on the ingestion CVE cleanup Move the setuptools>=83 lift after `airflow db migrate` in both airflow images: the lift removes pkg_resources and migrate runs Airflow's import chain. Migrate is the last line in both files, so this costs nothing. Fall back to python3 in strip_spacy_test_fixture.sh when no `python` shim exists; without it the strip silently skips and the black findings survive a green build. `python` stays first -- pip installs into whichever interpreter it resolves to. Co-Authored-By: Claude Opus 5 <[email protected]> --------- Co-authored-by: Claude Opus 5 <[email protected]>
…pat 2.8.3 (CVE-2026-72522) (#31890) * fix(security): pull expat 2.8.3-1~deb13u1 into the ingestion-base image The image reports expat 2.8.2 for CVE-2026-72522 (DSA-6446-1: out-of-bounds read and resultant infinite loop in libexpat's *_toUtf16 surrogate handling); trixie-security has 2.8.3-1~deb13u1. expat is not in the python:3.12-slim-trixie base at all -- it comes in transitively from the top-of-file apt install -- and that layer is exactly why the image is stuck at 2.8.2: its cache key never changes, so it keeps resolving against the Debian index that was current when it was first built. Adding expat there would freeze the fix the same way. It goes in the late root layer instead, below the COPY and pip layers, where the index is re-read on every build -- the same reasoning that put util-linux there. expat rides in the existing dpkg source-package query rather than a second RUN, so one apt call covers both source packages and the next OS CVE is a one-line edit. The package set stays computed from dpkg rather than hand-listed for the reason already documented there: scanners report each binary of a source package separately, so a hand-written list silently leaves one behind. util-linux keeps its non-empty assert and expat deliberately does not get one. util-linux is Essential, so an empty query there means dpkg-query misbehaved and the build must stop; expat is transitive, so an empty query is a legitimate image with nothing to patch and failing on it would break the build for no reason. Asserting one of the two still covers the hazard the check exists for: `apt-get install --only-upgrade` with no package arguments exits 0, so an all-empty query would give a green build that shipped the vulnerable packages. Verified in a real build layer on python:3.12-slim-trixie: libexpat1 2.7.1-2 -> 2.8.3-1~deb13u1 and all nine util-linux binaries -> 2.41.5-0+deb13u1, exit 0. The expat-absent path was exercised on the bare base and also exits 0, upgrading util-linux alone. ingestion/Dockerfile gets no equivalent change because there is nothing to upgrade to, not because it is clean: apache/airflow:3.3.0-python3.12 is bookworm, Debian still marks bookworm and bookworm-security vulnerable, and the image already carries 2.5.0-1+deb12u2 -- the newest build either suite offers. It needs revisiting when Debian ships a bookworm fix. * fix(security): bump apache-airflow 3.3.0 -> 3.3.1 for CVE-2026-67587 / CVE-2026-54183 CVE-2026-67587 (High) -- the Task SDK rebuilt a Serde `Callback` by re-running its constructor, which imports the module named by the stored callback path. `SyncCallback` is an Airflow class, so it passes the default `allowed_deserialization_classes` allow-list and tightening that setting does not help. A Dag author controls a task instance's `next_kwargs`, so they can get an arbitrary module imported inside the scheduler process when the `awaiting_input` timeout sweep deserializes that value. No non-default configuration is required. CVE-2026-54183 (Medium) -- the secrets masker's recursion-depth limit did not descend into values nested inside a list, tuple or set, so a Variable holding a deeply nested sensitive value rendered unmasked in the Variables UI. Anyone who can see the Variable in the UI can already read it through the Variables REST API, so this is a shoulder-surfing defense rather than a disclosure boundary -- hence Medium. Both are fixed in 3.3.1 and nothing in the 3.3.0 line is clean. The pin, both base image tags, the vendored constraints file and the integration-test image move together, as they did for 3.2.2 -> 3.3.0 in #31338. The constraints file is a straight re-download this time. It carried two hand-patches marked "keep on regeneration" -- impyla and thrift at 0.24.0 for CVE-2026-66053 / CVE-2026-41608 / CVE-2026-48586, against upstream constraints-3.3.0 shipping impyla==0.22.0 and thrift==0.16.0 -- and upstream constraints-3.3.1 now ships both at 0.24.0 natively. Diffing the vendored 3.3.0 file against upstream constraints-3.3.0 confirms those two blocks were the only divergence, and the new file is byte-identical to upstream constraints-3.3.1 outside comments. The comments are kept, reworded to say the pin is now upstream-native, so a future regeneration off a branch that regressed either version still gets caught. Two comments that name a constraint were checked rather than blind-renumbered: - tests/integration/airflow/Dockerfile explains the constraints are deliberately not applied because they pin chardet against openmetadata-ingestion's chardet==4.0.0. Still true; the version moved 6.0.0.post1 -> 7.5.1, so the number is updated. - Dockerfile.ci's universal-pathlib workaround cites Airflow's >=0.3.8 floor. apache-airflow-core 3.3.1 still declares `universal-pathlib>=0.3.8` and constraints still pin 0.3.10, so only the Airflow version in the prose changes. Resolution verified with `uv pip compile --python-version 3.12 --extra airflow`: apache-airflow==3.3.1 co-installs with every transitive floor pin in the airflow extra (providers-http, -opensearch, -elasticsearch, tornado, Werkzeug, starlette, python-multipart) with no conflict. sqlparse resolves to 0.5.4 there via collate-sqllineage, unchanged by this PR -- the release images force 0.6.0 in ingestion/operators/docker/Dockerfile, which does not consume this constraints file. Folded in: drop the stale croniter<3 ceiling from the dagster extra `uv pip install ingestion[all]` + `[test]` in the CI test environment fails to resolve against apache-airflow 3.3.1: Because apache-airflow-core>=3.3.1 depends on croniter>=6.2.2 [...] and because openmetadata-ingestion[test]==2.0.0.0.dev0 depends on apache-airflow==3.3.1 and croniter<3, we can conclude that [...] requirements are unsatisfiable. apache-airflow-core raised its croniter floor from >=2.0.2 to >=6.2.2 between 3.3.0 and 3.3.1, so the ceiling that used to co-exist with airflow now excludes it. The ceiling is dead weight and predates this conflict -- it has been in the dagster extra since #6416 and survived the #15679 dependency cleanup: - dagster 1.13.18 (what `dagster_graphql>=1.8.0` resolves to) declares no croniter dependency at all; resolving dagster_graphql alone produces no croniter. - Nothing under ingestion/ imports croniter. The only importer in the repo is openmetadata-airflow-apis, a separate distribution that does not declare it and picks it up transitively from airflow. - That importer is already running croniter 6.2.x: constraints-3.3.0 pins croniter==6.2.2 and the airflow images install under it, so 6.x compatibility for `croniter.is_valid` / `get_prev` is established by the shipped image, not assumed here. The call site is also behind an `is_airflow_3_or_higher()` guard and unreachable on Airflow 3. Only the CI test environment resolved croniter 2.x, because it installs from the extras without the constraints file. Removing the ceiling makes it match the images. Verified with `uv pip compile --extra all --extra test` on both 3.10 and 3.12: resolves to apache-airflow==3.3.1, croniter==6.2.4, dagster==1.13.18 with no conflict. This was the only pin in the tree that collided with the airflow bump. * fix(ingestion): migrate NumPy and Pydantic dependency stack * fix(ingestion): separate Aadhaar recognizer change * fix: filter invalid date recognizer results --------- Co-authored-by: Pablo Takara <[email protected]>
`TestAirflowOps.setUpClass` passed `include_examples=False` to `DagBag`. Airflow 3.3 dropped that keyword -- DAG discovery is bundle based there, so example DAGs are no longer a constructor flag -- and Python raises `TypeError` for an unknown keyword. The call is in class setup, so all three tests in the class error before running. This is unrelated to the DagBag change in this branch: the test builds its own DagBag and never calls `get_dagbag`. It broke when the Airflow pin moved from 3.2.2 to 3.3.0 in #31338, and has failed on every branch that reached this job since. Fixed here only because the job has to be green for this branch to be validated; happy to split it out. Detect the keyword instead of assuming it, matching the `sync_to_db` and `bag_dag` compatibility checks already in this setup, so the test keeps working on Airflow 2.x and on 3.x. Not changed: the workflow's `paths` filter still only watches `openmetadata-airflow-apis/**`, so a pin bump in `ingestion/setup.py` cannot trigger the suite it affects -- which is why this went unnoticed. Widening it would run a 24 minute docker-stack job on a file that changed 26 times in the last 90 days against this module's 5, so that tradeoff is left to maintainers.
…line deploy (open-metadata#32005) * fix(airflow-apis): stop re-parsing the whole DAG folder on every deploy `get_dagbag` built a DagBag over the entire DAG folder and called `collect_dags`, so each deploy parsed every DAG in the deployment. That makes a single deploy cost O(total DAGs) and a bulk deploy O(total DAGs^2). On Airflow 2.x the folder was never actually walked: `read_dags_from_db=True` made both `collect_dags` and `collect_dags_from_db` early return, and DAGs came from the serialized-DAG table. The Airflow 3.x support gate dropped that kwarg, which turned an O(1) DB read into an O(N) filesystem walk. The deploy path does not need a populated bag. `refresh_session_dag` calls `process_file` on the DAG file it has just written and then asks for that single `dag_id`, and `process_file` bags the DAG itself. Build the bag with `collect_dags=False` instead. The kwarg exists on DagBag in both Airflow 2.x and 3.x, so the version branching goes away with it. The folder walk was also masking `process_file`: `collect_dags` stamps `file_last_changed` for every file it walks, including the one just written, so the following `process_file` hit its `only_if_updated` early return and returned no dags. The DAG was bagged by the folder walk as a side effect rather than by the call that intends to bag it. The pre-fix test run confirms this - `found_dags` did not contain the deployed dag. Drop the `dagbag size` log line, which would now always report 0. The adjacent `processed dags` line carries the same signal and starts reporting the real dag. The per-deploy `DagFileProcessorManager` fork in `scan_dags_job_background` is left alone deliberately. On Airflow 3 `DAG.sync_to_db` delegates to `bulk_write_to_db`, which writes DagModel and asset rows but does not call `SerializedDagModel.write_dag`, so that scan is what serializes a newly deployed DAG. Removing or skipping it would leave deployed pipelines unrunnable. Tests: `tests/unit/ingestion_pipeline/test_get_dagbag.py` - the bag comes back empty over a populated folder, `collect_dags` is never called, and `process_file` still bags the deployed DAG and only that DAG. All three fail before this change. * fix(airflow-apis): keep the pre-3.0 DagBag path unchanged `collect_dags` was only added to `DagBag.__init__` in Airflow 2.5 (absent in 2.4.0, present in 2.5.3), and the plugin declares `apache-airflow>=2.2.2`, so passing it unconditionally raised `TypeError` on 2.2 through 2.4 and failed every deploy there. Scope the change to Airflow >= 3.0, which is where the regression is. Below 3.0 the bag is still built with `read_dags_from_db=True`, which early returns out of `collect_dags`, so that path never walked the DAG folder and needs no change. Gate the new tests on Airflow 3 for the same reason. * fix(airflow-apis): unblock airflow-apis-tests on Airflow 3.3 `TestAirflowOps.setUpClass` passed `include_examples=False` to `DagBag`. Airflow 3.3 dropped that keyword -- DAG discovery is bundle based there, so example DAGs are no longer a constructor flag -- and Python raises `TypeError` for an unknown keyword. The call is in class setup, so all three tests in the class error before running. This is unrelated to the DagBag change in this branch: the test builds its own DagBag and never calls `get_dagbag`. It broke when the Airflow pin moved from 3.2.2 to 3.3.0 in open-metadata#31338, and has failed on every branch that reached this job since. Fixed here only because the job has to be green for this branch to be validated; happy to split it out. Detect the keyword instead of assuming it, matching the `sync_to_db` and `bag_dag` compatibility checks already in this setup, so the test keeps working on Airflow 2.x and on 3.x. Not changed: the workflow's `paths` filter still only watches `openmetadata-airflow-apis/**`, so a pin bump in `ingestion/setup.py` cannot trigger the suite it affects -- which is why this went unnoticed. Widening it would run a 24 minute docker-stack job on a file that changed 26 times in the last 90 days against this module's 5, so that tradeoff is left to maintainers.
* fix(security): airflow 3.3.1 (CVE-2026-67587 / CVE-2026-54183) and expat 2.8.3 (CVE-2026-72522) (#31890) * fix(security): pull expat 2.8.3-1~deb13u1 into the ingestion-base image The image reports expat 2.8.2 for CVE-2026-72522 (DSA-6446-1: out-of-bounds read and resultant infinite loop in libexpat's *_toUtf16 surrogate handling); trixie-security has 2.8.3-1~deb13u1. expat is not in the python:3.12-slim-trixie base at all -- it comes in transitively from the top-of-file apt install -- and that layer is exactly why the image is stuck at 2.8.2: its cache key never changes, so it keeps resolving against the Debian index that was current when it was first built. Adding expat there would freeze the fix the same way. It goes in the late root layer instead, below the COPY and pip layers, where the index is re-read on every build -- the same reasoning that put util-linux there. expat rides in the existing dpkg source-package query rather than a second RUN, so one apt call covers both source packages and the next OS CVE is a one-line edit. The package set stays computed from dpkg rather than hand-listed for the reason already documented there: scanners report each binary of a source package separately, so a hand-written list silently leaves one behind. util-linux keeps its non-empty assert and expat deliberately does not get one. util-linux is Essential, so an empty query there means dpkg-query misbehaved and the build must stop; expat is transitive, so an empty query is a legitimate image with nothing to patch and failing on it would break the build for no reason. Asserting one of the two still covers the hazard the check exists for: `apt-get install --only-upgrade` with no package arguments exits 0, so an all-empty query would give a green build that shipped the vulnerable packages. Verified in a real build layer on python:3.12-slim-trixie: libexpat1 2.7.1-2 -> 2.8.3-1~deb13u1 and all nine util-linux binaries -> 2.41.5-0+deb13u1, exit 0. The expat-absent path was exercised on the bare base and also exits 0, upgrading util-linux alone. ingestion/Dockerfile gets no equivalent change because there is nothing to upgrade to, not because it is clean: apache/airflow:3.3.0-python3.12 is bookworm, Debian still marks bookworm and bookworm-security vulnerable, and the image already carries 2.5.0-1+deb12u2 -- the newest build either suite offers. It needs revisiting when Debian ships a bookworm fix. * fix(security): bump apache-airflow 3.3.0 -> 3.3.1 for CVE-2026-67587 / CVE-2026-54183 CVE-2026-67587 (High) -- the Task SDK rebuilt a Serde `Callback` by re-running its constructor, which imports the module named by the stored callback path. `SyncCallback` is an Airflow class, so it passes the default `allowed_deserialization_classes` allow-list and tightening that setting does not help. A Dag author controls a task instance's `next_kwargs`, so they can get an arbitrary module imported inside the scheduler process when the `awaiting_input` timeout sweep deserializes that value. No non-default configuration is required. CVE-2026-54183 (Medium) -- the secrets masker's recursion-depth limit did not descend into values nested inside a list, tuple or set, so a Variable holding a deeply nested sensitive value rendered unmasked in the Variables UI. Anyone who can see the Variable in the UI can already read it through the Variables REST API, so this is a shoulder-surfing defense rather than a disclosure boundary -- hence Medium. Both are fixed in 3.3.1 and nothing in the 3.3.0 line is clean. The pin, both base image tags, the vendored constraints file and the integration-test image move together, as they did for 3.2.2 -> 3.3.0 in #31338. The constraints file is a straight re-download this time. It carried two hand-patches marked "keep on regeneration" -- impyla and thrift at 0.24.0 for CVE-2026-66053 / CVE-2026-41608 / CVE-2026-48586, against upstream constraints-3.3.0 shipping impyla==0.22.0 and thrift==0.16.0 -- and upstream constraints-3.3.1 now ships both at 0.24.0 natively. Diffing the vendored 3.3.0 file against upstream constraints-3.3.0 confirms those two blocks were the only divergence, and the new file is byte-identical to upstream constraints-3.3.1 outside comments. The comments are kept, reworded to say the pin is now upstream-native, so a future regeneration off a branch that regressed either version still gets caught. Two comments that name a constraint were checked rather than blind-renumbered: - tests/integration/airflow/Dockerfile explains the constraints are deliberately not applied because they pin chardet against openmetadata-ingestion's chardet==4.0.0. Still true; the version moved 6.0.0.post1 -> 7.5.1, so the number is updated. - Dockerfile.ci's universal-pathlib workaround cites Airflow's >=0.3.8 floor. apache-airflow-core 3.3.1 still declares `universal-pathlib>=0.3.8` and constraints still pin 0.3.10, so only the Airflow version in the prose changes. Resolution verified with `uv pip compile --python-version 3.12 --extra airflow`: apache-airflow==3.3.1 co-installs with every transitive floor pin in the airflow extra (providers-http, -opensearch, -elasticsearch, tornado, Werkzeug, starlette, python-multipart) with no conflict. sqlparse resolves to 0.5.4 there via collate-sqllineage, unchanged by this PR -- the release images force 0.6.0 in ingestion/operators/docker/Dockerfile, which does not consume this constraints file. Folded in: drop the stale croniter<3 ceiling from the dagster extra `uv pip install ingestion[all]` + `[test]` in the CI test environment fails to resolve against apache-airflow 3.3.1: Because apache-airflow-core>=3.3.1 depends on croniter>=6.2.2 [...] and because openmetadata-ingestion[test]==2.0.0.0.dev0 depends on apache-airflow==3.3.1 and croniter<3, we can conclude that [...] requirements are unsatisfiable. apache-airflow-core raised its croniter floor from >=2.0.2 to >=6.2.2 between 3.3.0 and 3.3.1, so the ceiling that used to co-exist with airflow now excludes it. The ceiling is dead weight and predates this conflict -- it has been in the dagster extra since #6416 and survived the #15679 dependency cleanup: - dagster 1.13.18 (what `dagster_graphql>=1.8.0` resolves to) declares no croniter dependency at all; resolving dagster_graphql alone produces no croniter. - Nothing under ingestion/ imports croniter. The only importer in the repo is openmetadata-airflow-apis, a separate distribution that does not declare it and picks it up transitively from airflow. - That importer is already running croniter 6.2.x: constraints-3.3.0 pins croniter==6.2.2 and the airflow images install under it, so 6.x compatibility for `croniter.is_valid` / `get_prev` is established by the shipped image, not assumed here. The call site is also behind an `is_airflow_3_or_higher()` guard and unreachable on Airflow 3. Only the CI test environment resolved croniter 2.x, because it installs from the extras without the constraints file. Removing the ceiling makes it match the images. Verified with `uv pip compile --extra all --extra test` on both 3.10 and 3.12: resolves to apache-airflow==3.3.1, croniter==6.2.4, dagster==1.13.18 with no conflict. This was the only pin in the tree that collided with the airflow bump. * fix(ingestion): migrate NumPy and Pydantic dependency stack * fix(ingestion): separate Aadhaar recognizer change * fix: filter invalid date recognizer results --------- Co-authored-by: Pablo Takara <[email protected]> * fix(pii): recognize separated Aadhaar numbers (#31900) * fix(ingestion): pin asammdf to the 8.2-8.7 window so arm64 builds get a wheel (#31950) * fix(ingestion): pin asammdf to the 8.2-8.7 window so arm64 builds get a wheel asammdf 8.0.x and 8.1.x publish no linux-aarch64 wheel, so on arm64 pip falls back to the 8.1.2 sdist, which builds with scikit-build-core + CMake and does not vendor ext/libdeflate: CMake Error at CMakeLists.txt:20 (add_subdirectory): add_subdirectory given source "ext/libdeflate" which is not an existing directory. Every arm64 image build that installs ./ingestion[all] from source fails at that step. 7.4.5 built from source fine because its sdist was plain setuptools.build_meta, which is why this only surfaced after the pin moved to ~=8.1.0. 8.2.0 is the first release with manylinux_2_17_aarch64 abi3 wheels. The upper bound stops at 8.8.0, which promoted chardet from an optional extra to a hard chardet>=7.0.0 dependency and so conflicts with the chardet==4.0.0 pin in base_requirements. Reverting to 7.4.5 is not an option: numpy>=2 is now required and 7.4.5 is numpy-1 only. * chore: trigger CI * fix(ingestion): drop the dead load_measured_data kwarg from the MF4 reader MDF takes **kwargs typed as Unpack[MdfKwargs], and load_measured_data is not one of its keys, so basedpyright reports four reportCallIssue errors once the pin resolves to 8.7.2: mf4.py:85:33 - error: No parameter named "load_measured_data" (reportCallIssue) The kwarg has been inert for years -- it dates from the 2.x/3.x memory options and is silently dropped by **kwargs, verified against 8.7.2 where MDF opens and returns the same header._common_properties with and without it. Removing it is behaviour preserving and clears the static-checks lane. --------- Co-authored-by: IceS2 <[email protected]> * Fixes #31742: strip trailing slash from Looker hostPort before the SDK concatenates onto it (#31761) * Fixes #31742: strip the trailing slash from Looker hostPort before the SDK concatenates onto it hostPort is a pydantic AnyUrl, which renders a URL with no path as "https://host/". looker_sdk builds the login URL by string concatenation (auth_session: f"{base_url}/api/{version}/login"), so that slash reached Looker as //api/4.0/login. Login is the gate for CheckAccess, so Test Connection failed before any other step ran, and Looker's 404 was diagnosed as rejected credentials - even though the same credentials worked via curl. Only login/logout are affected; every other endpoint goes through urljoin, which normalises itself. metadata.py already wraps clean_uri around all five of its concatenation sites - connection.py was the one place that did not. The existing test helper built a MagicMock whose hostPort was a plain str, so it never saw the trailing slash pydantic adds. It now builds a real LookerConnection, which is what made the bug visible. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * chore: empty commit to re-trigger CI Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]> * fix(pii): break weighted-score ties by confidence in the NER scanner (#31961) * fix(pii): break weighted-score ties by confidence in the NER scanner get_highest_score_label ranks candidates by "score * appearances * 0.8" and picks the winner with max(). On an exact tie max() returns whichever key was recorded first, so the classification depended on the order the sample rows happened to be scanned in rather than on the evidence. A column of dashed US SSNs hits that tie. The customised registry's us_driving_license patterns include ^\d{3}-\d{2}-\d{4}$ at 0.3, which matches every row, while US_SSN only matches a subset (a sequential-digit sample is rejected and another reads as US_ITIN): US_DRIVER_LICENSE 0.3 * 5 * 0.8 = 1.200 US_SSN 0.5 * 3 * 0.8 = 1.200 The first row produces only US_DRIVER_LICENSE, so it is recorded first and a weak 0.3 guess outranks a 0.5 match, tagging national IDs as driving licences. Adding the raw confidence as the secondary key makes the stronger match win and removes the dependency on insertion order. Where both the weighted total and the confidence are equal the outcome is unchanged, so the existing expectations hold. * fix(pii): demote the SSN-shaped driving-licence pattern The tie-break only engages when the weighted totals land on the same number. The SSN-shaped licence pattern matches every dashed 3-2-4 value unconditionally while US_SSN matches only the subset passing Presidio's validator, so the licence appearance count is always >= the SSN one. Solving 0.3n > 0.5k puts the crossover at 60%: any column where fewer than 60% of the sampled values validate was labelled a driving licence, which is ordinary for masked, placeholder or synthetic SSNs. ["000-12-3456", "666-45-6789", "111-00-2222", "333-44-0000", "543-21-0987"] US_DRIVER_LICENSE 0.3 * 5 * 0.8 = 1.200 <- wins outright, no tie US_SSN 0.5 * 1 * 0.8 = 0.400 Deleting the pattern is not the answer: Mississippi prints its nine-digit licence numbers in Social Security positions, so the shape is a real licence format and dropping it loses that detection entirely (a column of such values then matches nothing). Scoring it very weak instead keeps the licence reading available when nothing else claims the column, while a validated SSN match outranks it. Measured against build_analyzer_engine() with presidio 2.2.358, before -> after: dashed SSN, 3 of 5 validate US_SSN -> US_SSN masked SSN, 1 of 5 validate US_DRIVER_LICENSE -> US_SSN licence shape, none validate US_DRIVER_LICENSE -> US_DRIVER_LICENSE ordinary licences (A1234567) US_DRIVER_LICENSE -> US_DRIVER_LICENSE * test(pii): keep the tie-break comment accurate after the score demotion The 0.3 x 5 illustration is now synthetic rather than something the SSN-shaped licence pattern still produces, so describe the general shape of the tie instead of attributing it to that pair. * fix(ingestion): keep Airflow Elasticsearch transport compatible --------- Co-authored-by: Himanshu Khairajani <[email protected]> Co-authored-by: Mayur Singal <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…#32005) + scale the deploy-pipelines deadline (#31976) (#32101) * fix(airflow-apis): stop re-parsing the whole DAG folder on every pipeline deploy (#32005) * fix(airflow-apis): stop re-parsing the whole DAG folder on every deploy `get_dagbag` built a DagBag over the entire DAG folder and called `collect_dags`, so each deploy parsed every DAG in the deployment. That makes a single deploy cost O(total DAGs) and a bulk deploy O(total DAGs^2). On Airflow 2.x the folder was never actually walked: `read_dags_from_db=True` made both `collect_dags` and `collect_dags_from_db` early return, and DAGs came from the serialized-DAG table. The Airflow 3.x support gate dropped that kwarg, which turned an O(1) DB read into an O(N) filesystem walk. The deploy path does not need a populated bag. `refresh_session_dag` calls `process_file` on the DAG file it has just written and then asks for that single `dag_id`, and `process_file` bags the DAG itself. Build the bag with `collect_dags=False` instead. The kwarg exists on DagBag in both Airflow 2.x and 3.x, so the version branching goes away with it. The folder walk was also masking `process_file`: `collect_dags` stamps `file_last_changed` for every file it walks, including the one just written, so the following `process_file` hit its `only_if_updated` early return and returned no dags. The DAG was bagged by the folder walk as a side effect rather than by the call that intends to bag it. The pre-fix test run confirms this - `found_dags` did not contain the deployed dag. Drop the `dagbag size` log line, which would now always report 0. The adjacent `processed dags` line carries the same signal and starts reporting the real dag. The per-deploy `DagFileProcessorManager` fork in `scan_dags_job_background` is left alone deliberately. On Airflow 3 `DAG.sync_to_db` delegates to `bulk_write_to_db`, which writes DagModel and asset rows but does not call `SerializedDagModel.write_dag`, so that scan is what serializes a newly deployed DAG. Removing or skipping it would leave deployed pipelines unrunnable. Tests: `tests/unit/ingestion_pipeline/test_get_dagbag.py` - the bag comes back empty over a populated folder, `collect_dags` is never called, and `process_file` still bags the deployed DAG and only that DAG. All three fail before this change. * fix(airflow-apis): keep the pre-3.0 DagBag path unchanged `collect_dags` was only added to `DagBag.__init__` in Airflow 2.5 (absent in 2.4.0, present in 2.5.3), and the plugin declares `apache-airflow>=2.2.2`, so passing it unconditionally raised `TypeError` on 2.2 through 2.4 and failed every deploy there. Scope the change to Airflow >= 3.0, which is where the regression is. Below 3.0 the bag is still built with `read_dags_from_db=True`, which early returns out of `collect_dags`, so that path never walked the DAG folder and needs no change. Gate the new tests on Airflow 3 for the same reason. * fix(airflow-apis): unblock airflow-apis-tests on Airflow 3.3 `TestAirflowOps.setUpClass` passed `include_examples=False` to `DagBag`. Airflow 3.3 dropped that keyword -- DAG discovery is bundle based there, so example DAGs are no longer a constructor flag -- and Python raises `TypeError` for an unknown keyword. The call is in class setup, so all three tests in the class error before running. This is unrelated to the DagBag change in this branch: the test builds its own DagBag and never calls `get_dagbag`. It broke when the Airflow pin moved from 3.2.2 to 3.3.0 in #31338, and has failed on every branch that reached this job since. Fixed here only because the job has to be green for this branch to be validated; happy to split it out. Detect the keyword instead of assuming it, matching the `sync_to_db` and `bag_dag` compatibility checks already in this setup, so the test keeps working on Airflow 2.x and on 3.x. Not changed: the workflow's `paths` filter still only watches `openmetadata-airflow-apis/**`, so a pin bump in `ingestion/setup.py` cannot trigger the suite it affects -- which is why this went unnoticed. Widening it would run a 24 minute docker-stack job on a file that changed 26 times in the last 90 days against this module's 5, so that tradeoff is left to maintainers. * fix(ops): scale the deploy-pipelines chunk deadline with the chunk size (#31976) * fix(ops): scale the deploy-pipelines chunk deadline with the chunk size deploy-pipelines POSTs chunks of pipeline IDs to the bulk deploy endpoint, which registers each pipeline sequentially, but bounded the request with a fixed 2 minute deadline. At the default chunk size of 20 that budgets 6 seconds per pipeline, which a freshly restarted pipeline service does not meet, so the client abandoned requests whose work was still progressing. A client deadline does not cancel the server, so the abandoned chunk kept deploying while the command marked all 20 pipelines FAILED and exited 1. A Kubernetes restartPolicy of OnFailure then replayed the whole run on top of work still in flight, adding load to an operation that was already succeeding. On a catalog of 92 pipelines this reported failure while 90 were deployed. Budget the deadline per pipeline and multiply by the chunk size, so it no longer silently becomes too short as a catalog grows, and expose the chunk size and the per-pipeline budget as options. The command previously accepted none, so neither value was reachable from a deployment configuration. Extract the deadline calculation and the failure check as static functions so the scaling and the exit code are unit testable without a database. Reporting is left unchanged: an abandoned chunk is still recorded as failed. The persisted deployed flag cannot correct it, because the deploy path only ever sets it to true and never resets it, so it records whether a pipeline was ever deployed rather than what this run did. Reading it to clear a timeout would turn a genuine failure into a silent success on any redeploy. A per-run answer needs the deploy response itself, which is a separate change. * fix(ops): reject a non-positive deploy-pipelines chunk size Exposing --chunk-size made a value that was previously hardcoded to 20 reachable from outside, and chunkList advances its loop with i += chunkSize. A chunk size of 0 never advances, appending empty chunks until the heap is exhausted, and a negative size makes subList throw, which the surrounding handler turns into every pipeline being reported as FAILED. Validate both options before the deploy runs and report each offending value, rather than clamping, so a mistyped flag is not silently replaced by a different deadline. Guard chunkList as well, so a non-positive size fails loudly instead of spinning if another caller ever skips validation. A non-positive --seconds-per-pipeline was already safe, since the deadline floors at the previous fixed 2 minutes, but it is rejected too rather than silently falling back to the deadline this option exists to move away from. Drops the deployChunkTimeout(0, 30) assertion, which implied a chunk size of 0 was supported when it now fails validation. * test(ops): cover picocli binding for the deploy-pipelines options Parsing the command with picocli asserts the new options bind to the values passed on the command line and that the declared defaults still match the 20 and 30 the description documents. Neither was covered: the existing tests call the helpers directly, so a mistyped option name or a default drifting from its description would not have failed anything. Reads the defaults from the command spec rather than the parse result, since matchedOptionValue only reports options actually present on the command line. Needs no database, so it stays a unit test. * style: drop unused static imports flagged by spotless on 2.0 `TestCaseResolutionStatusResource` imports `CommonUtil.listOrEmpty` and `CommonUtil.nullOrEmpty` but no longer uses either, so `mvn spotless:check` fails and the `java-checkstyle` job is red for every PR targeting this branch -- #32095 and #32093 fail identically. The usages went away in #32017 while the imports stayed. Import-only change, produced by `mvn spotless:apply`; no logic touched. Needed here only so this backport can be validated. `main` needs no equivalent fix: both symbols are imported and used five times each in that file there. On `1.13` the imports do not exist. This is 2.0-only.
#32005) + scale the deploy-pipelines deadline (#31976) (#32100) * fix(airflow-apis): stop re-parsing the whole DAG folder on every pipeline deploy (#32005) * fix(airflow-apis): stop re-parsing the whole DAG folder on every deploy `get_dagbag` built a DagBag over the entire DAG folder and called `collect_dags`, so each deploy parsed every DAG in the deployment. That makes a single deploy cost O(total DAGs) and a bulk deploy O(total DAGs^2). On Airflow 2.x the folder was never actually walked: `read_dags_from_db=True` made both `collect_dags` and `collect_dags_from_db` early return, and DAGs came from the serialized-DAG table. The Airflow 3.x support gate dropped that kwarg, which turned an O(1) DB read into an O(N) filesystem walk. The deploy path does not need a populated bag. `refresh_session_dag` calls `process_file` on the DAG file it has just written and then asks for that single `dag_id`, and `process_file` bags the DAG itself. Build the bag with `collect_dags=False` instead. The kwarg exists on DagBag in both Airflow 2.x and 3.x, so the version branching goes away with it. The folder walk was also masking `process_file`: `collect_dags` stamps `file_last_changed` for every file it walks, including the one just written, so the following `process_file` hit its `only_if_updated` early return and returned no dags. The DAG was bagged by the folder walk as a side effect rather than by the call that intends to bag it. The pre-fix test run confirms this - `found_dags` did not contain the deployed dag. Drop the `dagbag size` log line, which would now always report 0. The adjacent `processed dags` line carries the same signal and starts reporting the real dag. The per-deploy `DagFileProcessorManager` fork in `scan_dags_job_background` is left alone deliberately. On Airflow 3 `DAG.sync_to_db` delegates to `bulk_write_to_db`, which writes DagModel and asset rows but does not call `SerializedDagModel.write_dag`, so that scan is what serializes a newly deployed DAG. Removing or skipping it would leave deployed pipelines unrunnable. Tests: `tests/unit/ingestion_pipeline/test_get_dagbag.py` - the bag comes back empty over a populated folder, `collect_dags` is never called, and `process_file` still bags the deployed DAG and only that DAG. All three fail before this change. * fix(airflow-apis): keep the pre-3.0 DagBag path unchanged `collect_dags` was only added to `DagBag.__init__` in Airflow 2.5 (absent in 2.4.0, present in 2.5.3), and the plugin declares `apache-airflow>=2.2.2`, so passing it unconditionally raised `TypeError` on 2.2 through 2.4 and failed every deploy there. Scope the change to Airflow >= 3.0, which is where the regression is. Below 3.0 the bag is still built with `read_dags_from_db=True`, which early returns out of `collect_dags`, so that path never walked the DAG folder and needs no change. Gate the new tests on Airflow 3 for the same reason. * fix(airflow-apis): unblock airflow-apis-tests on Airflow 3.3 `TestAirflowOps.setUpClass` passed `include_examples=False` to `DagBag`. Airflow 3.3 dropped that keyword -- DAG discovery is bundle based there, so example DAGs are no longer a constructor flag -- and Python raises `TypeError` for an unknown keyword. The call is in class setup, so all three tests in the class error before running. This is unrelated to the DagBag change in this branch: the test builds its own DagBag and never calls `get_dagbag`. It broke when the Airflow pin moved from 3.2.2 to 3.3.0 in #31338, and has failed on every branch that reached this job since. Fixed here only because the job has to be green for this branch to be validated; happy to split it out. Detect the keyword instead of assuming it, matching the `sync_to_db` and `bag_dag` compatibility checks already in this setup, so the test keeps working on Airflow 2.x and on 3.x. Not changed: the workflow's `paths` filter still only watches `openmetadata-airflow-apis/**`, so a pin bump in `ingestion/setup.py` cannot trigger the suite it affects -- which is why this went unnoticed. Widening it would run a 24 minute docker-stack job on a file that changed 26 times in the last 90 days against this module's 5, so that tradeoff is left to maintainers. * fix(ops): scale the deploy-pipelines chunk deadline with the chunk size (#31976) * fix(ops): scale the deploy-pipelines chunk deadline with the chunk size deploy-pipelines POSTs chunks of pipeline IDs to the bulk deploy endpoint, which registers each pipeline sequentially, but bounded the request with a fixed 2 minute deadline. At the default chunk size of 20 that budgets 6 seconds per pipeline, which a freshly restarted pipeline service does not meet, so the client abandoned requests whose work was still progressing. A client deadline does not cancel the server, so the abandoned chunk kept deploying while the command marked all 20 pipelines FAILED and exited 1. A Kubernetes restartPolicy of OnFailure then replayed the whole run on top of work still in flight, adding load to an operation that was already succeeding. On a catalog of 92 pipelines this reported failure while 90 were deployed. Budget the deadline per pipeline and multiply by the chunk size, so it no longer silently becomes too short as a catalog grows, and expose the chunk size and the per-pipeline budget as options. The command previously accepted none, so neither value was reachable from a deployment configuration. Extract the deadline calculation and the failure check as static functions so the scaling and the exit code are unit testable without a database. Reporting is left unchanged: an abandoned chunk is still recorded as failed. The persisted deployed flag cannot correct it, because the deploy path only ever sets it to true and never resets it, so it records whether a pipeline was ever deployed rather than what this run did. Reading it to clear a timeout would turn a genuine failure into a silent success on any redeploy. A per-run answer needs the deploy response itself, which is a separate change. * fix(ops): reject a non-positive deploy-pipelines chunk size Exposing --chunk-size made a value that was previously hardcoded to 20 reachable from outside, and chunkList advances its loop with i += chunkSize. A chunk size of 0 never advances, appending empty chunks until the heap is exhausted, and a negative size makes subList throw, which the surrounding handler turns into every pipeline being reported as FAILED. Validate both options before the deploy runs and report each offending value, rather than clamping, so a mistyped flag is not silently replaced by a different deadline. Guard chunkList as well, so a non-positive size fails loudly instead of spinning if another caller ever skips validation. A non-positive --seconds-per-pipeline was already safe, since the deadline floors at the previous fixed 2 minutes, but it is rejected too rather than silently falling back to the deadline this option exists to move away from. Drops the deployChunkTimeout(0, 30) assertion, which implied a chunk size of 0 was supported when it now fails validation. * test(ops): cover picocli binding for the deploy-pipelines options Parsing the command with picocli asserts the new options bind to the values passed on the command line and that the declared defaults still match the 20 and 30 the description documents. Neither was covered: the existing tests call the helpers directly, so a mistyped option name or a default drifting from its description would not have failed anything. Reads the defaults from the command spec rather than the parse result, since matchedOptionValue only reports options actually present on the command line. Needs no database, so it stays a unit test. * chore: re-trigger CI after linking issue #32114 * chore: re-trigger CI



Describe your changes:
available; the other 38 are Debian packages with no upstream fix in bookworm (expat 14,
perl 10, cups 5, libssh2 3, tar 2, p11-kit 1, util-linux 1, plus kerberos and couchbase
with no PyPI fix). This PR clears all 5.
black — CVE-2026-31900 (Critical), CVE-2026-32274 (High), CVE-2024-21503 (Medium)
black is not installed in any release image; it is a dev extra only. The sole occurrence on
disk is
spacy/tests/package/requirements.txt, a test fixture inside the spaCy wheel thatpins
black==22.3.0and that scanners parse as a dependency manifest. Newingestion/scripts/strip_spacy_test_fixture.shremoves it after the final pip install inevery image that ships spaCy.
This strip previously shipped inside
patch_pyspark_jars.shand was reverted along with itin Revert "fix(ingestion): patch PySpark-bundled CVE jars #31074, because the jar-fetching half failed on sha mismatches. Nothing in this script
fetches anything.
apache-airflow 3.2.2 → 3.3.0 — CVE-2026-48891 (Medium)
/ui/dependenciesleaked Dag IDs the caller cannot read viadep.source/dep.target, aresidual gap in the CVE-2026-28563 fix. The pin, both base image tags, the vendored
constraints file and the integration-test image move together.
setuptools 80.10.2 → 84 — CVE-2026-59890 (Medium)
setuptools<81guards two separate things. cx_Oracle'ssetup.pyimportspkg_resources(removed in 81.0.0) and has no cp312 wheel, so a source build is mandatory — that half
stays. The other half,
sqlalchemy-redshift 0.8.14, no longer applies: 1.0.0 moved toimportlib.metadataandsetup.pyhas pinned~=1.0.0since chore: update sqlalchemy to 1.0.0 #27776.Type of change:
High-level design:
Why the spaCy strip cannot fail a build. Every path exits 0 — including
pythonmissing and an unexpected traceback — because the fixture is inert data and not worth
blocking a release over. Problems surface as
WARNINGon stderr naming the surviving path.It walks
sys.pathrather than resolving spaCy once viafind_spec: a user-site installshadows a system-site one, and
find_specwould strip only the shadowing copy while thescanner kept reading the other — passing the build with the finding intact.
Why the constraints file is not a straight re-download. It carries two hand-patches
marked "keep on regeneration" —
impylaandthriftat 0.24.0 for CVE-2026-66053 /CVE-2026-41608 / CVE-2026-48586 — and upstream
constraints-3.3.0still shipsimpyla==0.22.0andthrift==0.16.0. Both are re-applied; the file diverges fromupstream in exactly those two blocks and nothing else. A plain regeneration would have
traded one airflow CVE for three thrift ones.
Why the redshift lines are deleted rather than bumped. They are a regression, not a
decision. chore: update sqlalchemy to 1.0.0 #27776 removed them from all three install sites; Migrate Databricks from sqlalchemy-databricks to databricks-sqlalchemy #26896 — branched before it,
merged after — rewrote the same line to drop
sqlalchemy-databricksand carried the staleredshift entry back in. As a single-line replacement it merged without conflict. Ordering
is why nobody noticed: in the
.cifiles the--no-depsline runs before.[all], so~=1.0.0overwrites it and the pin is inert upstream. It only bites in Collate, where thesame line runs after.
Why setuptools is lifted rather than unpinned. cx_Oracle and mysqlclient need
pkg_resourcesonly at build time; once built, both import cleanly against 84. So thelift becomes a final layer after the last source build instead of replacing the pin. That
layer must stay last — a later layer compiling a package that needs
pkg_resourceswillfail there, and the error will not look like a setuptools problem. Noted in-file.
Rollout: no source or API changes; Dockerfiles, one build script, one pin, and the
vendored constraints file only.
Tests:
Use cases covered
apache-airflow==3.3.0sqlalchemy-redshift 1.0.0Unit tests
Not applicable — Dockerfile, build-script and pin changes only.
Backend integration tests
Not applicable — no backend API changes.
Ingestion integration tests
ingestion/tests/integration/airflow/moves toapache/airflow:3.3.0-python3.10(Dockerfile +
conftest.py). Not run locally; needs CI.Playwright (UI) tests
Not applicable — no UI changes.
Manual testing performed
Verified in containers, not via a full image build:
(missing
click) → still found and stripped; idempotent re-run; shadowed + writable →strips both copies; shadowed + unwritable → WARNING, rc=0;
pythonmissing →WARNING, rc=0; python exits non-zero → WARNING, rc=0. spaCy still imports afterwards and
spacy.testsstays importable (677 other files untouched). Two realdocker buildsagainst the actual build context confirmed
PRE: fixture present → POST: fixture GONE.apache/airflow:3.2.2-python3.12and3.3.0-python3.12. Zero changed availability;the 6 unavailable ones are unavailable in both (pre-existing Airflow-2.x fallback
branches). Deprecation-warning sets are identical — no new deprecations.
apache-airflow → 3.3.0over 128 packages, noconflicts; provider floors resolve alongside (
http 6.0.4,opensearch 1.10.0,elasticsearch 6.7.0); hand-patches still bind (impyla → 0.24.0,thrift → 0.24.0).setuptools<81→ cx_Oracle--no-build-isolation→--no-depsdialects → redshift 1.0.0 →mysqlclient==2.1.1→setuptools>=83. Result: setuptools 84.0.0,pkg_resourcesabsent, andcx_Oracle,MySQLdb,sqlalchemy_redshift,sqlalchemy_ibmiall import OK.docker buildx build --check("no warnings found");action.ymlstill parses with all 12 steps.
Not yet verified — needs CI: a real image build against the 593 constraint deltas
(16 major-version changes, incl.
marshmallow 3→4; notenumpy 2.4.6 → 1.26.4resolves apre-existing conflict with this repo's
numpy<2), and the integration-test bump, whichexercises a live scheduler and API server.
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.