Repository navigation
Fixes 34972: Recover valid tags beside malformed definitions - #34973
Conversation
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
|
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! |
Code Review ✅ Approved🟡 Medium risk · Enabling skip_on_failure for classification and tag loading lets ingestion pass malformed definitions, which could omit their recognizers and leave matching sensitive columns untagged. Fixes malformed classification definitions blocking valid tags from loading by enabling 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 |
|
🚦 Removed from the merge queue —
|



Describe your changes:
Fixes #34972
Related to open-metadata/openmetadata-collate#7111 (partial fix: recovers valid tags; saved warnings and remaining diagnostics are tracked separately in #34824).
One malformed recognizer currently prevents valid tags from the same classification from loading. Opt the two existing
ClassificationManager.list_all_entitiescalls into the SDK's existingskip_on_failure=Truebehavior so valid PII still classifiesACCT_NUMbeside SPI missingsupportedLanguage, and loading continues through invalid entities and pages.This is the minimal recovery stage extracted from #34865. The complete scope remains tracked in #34824: saved loading warnings, cleaner diagnostics, fetch resilience, and cache correctness are separate further work. Existing SDK parsing-error logs are reused; saved loading-warning counts and behavior after a later network failure are unchanged.
Type of change:
High-level design:
Small change: exactly two production lines in
classification_manager.py, plus focused regression tests and an existing mock signature update to accept the skip flag. Strict SDK defaults, filtering, enablement, scoring, and cache behavior are preserved.Tests:
Use cases covered
ACCT_NUMcolumn tag label beside malformed SPI; the all-valid control loads both tags.Unit tests
ingestion/tests/unit/metadata/pii/test_classification_manager.pyandingestion/tests/unit/metadata/pii/test_tag_processor.py.metadata.pii.classification_manager(65 statements, zero missed).make py_format_checkpassed across ingestion and airflow APIs (3023 files formatted); targeted basedpyright on the changed production module passed with zero errors or warnings;git diff --checkpassed.Python 3.11, generated models, Presidio 2.2.358, NumPy 2.2.6, and spaCy
en_core_web_md3.8.0 were used. Test transport is mocked; SDK parsing and tag scoring are real. The new column-name regression supplies the NLP boundary explicitly and needs no model download.Reproduce from the repository root with the ingestion test dependencies installed:
Backend integration tests
Not applicable: no backend API changes.
Ingestion integration tests
Live local-stack validation completed on 2026-10-08 using this PR's exact head
93527031dbe3433c0911ab43adcc8aa6039c231b. A freshly generated, noneditable ingestion wheel ran inside an isolated Python 3.11 Docker environment against the existing upstream OpenMetadata2.0.0-SNAPSHOTserver (revisioncc5b208051307c5ec76efcd7797db065660a350e) and a disposable PostgreSQL 16 source.ACCT_NUMremained untagged while the saved pipeline reported Success, zero warnings, zero errors.supportedLanguage.Only the owned malformed tag's raw HTTP response and the pagination request size were controlled. The source connector, SDK parsing, workflow, scoring, sink, status upload, and persistence were real. The baseline alteration affected only the isolated installed manager and was restored/hash-verified afterward. The repository code stayed unchanged. All owned server/source fixtures were deleted, existing PII tags were preserved, and the stack's original running/stopped state was restored.
No live UI, scheduler/Airflow deployment, or later network-failure resilience was tested. Runtime dependencies were reused from an existing upstream environment; this is not fresh release dependency resolution certification.
Playwright (UI) tests
Not applicable: no UI changes.
Manual testing performed
Reviewed the diff against current
main(545614e388), reproduced the malformed-data failures before the flags, and verified passing recovery tests afterward. Confirmed the production diff is exactly the two skip flags. The subsequent live server ingestion/classification runs and cleanup are described above; no live UI verification was performed.UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>.Fixes #34972.GitHub checks
The
safe to testlabel has been added to enable normal Python CI. The remaining PR metadata requirement is to add #34972 to Shipping with the inherited customer-issue fields documented there. The current GitHub token lacks theprojectwrite scope; an authorized project editor must set the fields and re-run the metadata check.