Repository navigation
fix(ingestion): resolve uv.lock Dependabot alerts (brotlicffi, virtualenv, black, pytest, tornado) - #36641
Conversation
Fixes GHSA-9v8h-qqgm-4m35 (brotlicffi, Dependabot #794) and GHSA-cx6f-vjhg-g3cc (virtualenv, Dependabot #795) in ingestion/uv.lock.
…lock black only reached the lock through datamodel-code-generator. Fixing GHSA-3936-cmfr-pm3m and GHSA-cg8m-r9f2-5wm2 needs black >= 26.3.1, whose pathspec >= 1.0 floor forces runtime dbt-core 1.11 -> 1.12. Codegen now formats with ruff (generated models are AST-identical) and black is excluded.
… context Fixes GHSA-6w46-j5rx-g56g (pytest, Dependabot #791). The service source bases declared the topology context at class level, so every source of a type in one process shared it. pytest 8.2+ builds unittest TestCase instances lazily, which exposed the leak as cross-file test failures. The context is now a per-instance cached_property on TopologyRunnerMixin. Tests that chained context between methods set their own, and subTest labels are plain strings so xdist can serialize pytest 9's subtest reports.
Fixes GHSA-pcg2-g6cj-q92c, GHSA-r4j5-9xpp-3985 and GHSA-pw9p-v7r6-gx4p where it can: tornado 6.6 needs Python 3.11 and there is no 6.5.x backport, so the Python 3.10 fork stays on 6.5.10.
❌ 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 |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
The class-level queue on TopologyRunnerMixin and the *_source_state sets on every service base were shared by all sources of a type in one process, so a second source or run inherited the FQNs the first one saw and mark-deleted could never find those entities stale. They are now PerSourceState descriptors, created per instance with vars(instance).setdefault because worker threads can touch them first. Also uninstall black after codegen in the CI Dockerfiles, since pip still pulls it in with datamodel-code-generator.
…production lineage timeout in tests
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
MemoryLimitExceeded is raised only after the function returns, so the memory scenario ran all its sleeps (about 2.5s) under the 3s timeout and timed out on a slow runner. Shorten the per-chunk sleep; the peak is still sampled during the parse_time sleep.
Code Review ✅ Approved 1 closed / 1 findings🔴 High risk · Moving ingestion contexts and seen-entity sets to per-source state changes mark-deleted scope; incorrect state could mark live catalog entities deleted. Resolves ingestion uv.lock Dependabot alerts by bumping brotlicffi, virtualenv, pytest, tornado, and pyasn1, and removing black with codegen moved to ruff. Per-source state now uses per-instance descriptors to stop shared topology context leaking between sources. Resolved the finding that the per-source state rule lacked a decision record. No open issues found. ✅ 1 closed✅ Quality: Per-source state rule from PR description has no decision record
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. 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:
Resolves the ingestion
uv.lockDependabot alerts that have a usable fix.ruff check --select I --fix+ruff format --isolated. The generated models are semantically equivalent to the black + isort output: across all 1248 files the only AST difference is in 55 files where ruff merges a duplicatefrom ...type importline that isort kept separate. The CI Dockerfiles uninstall black along with the generator, since pip still pulls it in there.context = TopologyContextManager(topology)at class level, so every source of a type in one process shared it (dashboard was fixed the same way in Fix dashboard topology context leaking between sources #35001). The context is now a per-instancecached_propertyonTopologyRunnerMixin. The same leak existed in the class-levelqueueonTopologyRunnerMixinand in every*_source_stateset that mark-deleted compares against: a second source (or second run) in one process inherited the FQNs the first one saw, so it could never find those entities stale. These are nowPerSourceStatedescriptors, created per instance on first access withvars(instance).setdefault, because worker threads can touch them first andcached_propertytakes no lock on Python 3.12+.test_per_source_state.pycovers every service base, andtableau/test_backfill.pyno longer patches the class to work around it. Tests that relied on the shared context set their own, andsubTestlabels are strings so xdist can serialize pytest 9's subtest reports.setup.pyfloor, and the Airflow constraints file the images install from.Not fixable while
requires-python >= 3.10: filelock (#796–#809) and dnspython (#799) have no patched release for 3.10, and the tornado alerts stay open for the 3.10 entry.Type of change:
Checklist:
make unit_ingestionpasses on Python 3.10 with pytest 9.0.3 (14636 passed).🤖 Generated with Claude Code