Repository navigation
Fixes 34824: Add classification loading diagnostics, fetch resilience, and cache correctness - #34865
stout-yeoman wants to merge 3 commits into
Conversation
|
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! |
|
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! |
| if warning: | ||
| logger.warning(message) | ||
| if self.status is not None: | ||
| self.status.warning(name, message) | ||
| return |
There was a problem hiding this comment.
⚠️ Bug: Parse diagnostics as warnings never reach the saved run
This commit now reports classification and tag parse errors with status.warning(...) instead of status.failed(...). When the pipeline status is built (step.py:130), only warnings=len(step.status.warnings) is uploaded, and the warning text is dropped. The test confirms this: uploaded.status.root[0].failures is None. As a result, the saved run shows success with a bare warning count. The text naming the tag, recognizer and missing field (e.g. PII.SPI … supportedLanguage) only appears in the logs. That goes against the PR's stated goal that the run records an actionable SPI loading failure through the existing failure rendering, and it brings back the original complaint from #34824 that the stored run gives no usable detail. Two possible fixes: keep the diagnostic in failures, accepting the hit to the success threshold, or also record it as a StackTraceError entry that gets uploaded without counting as an error. Otherwise, update the PR description and tests to state that the details now live only in the logs.
Was this helpful? React with 👍 / 👎
|
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
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source
Describe your changes:
Fixes #34824
A malformed recognizer currently causes auto-classification to discard valid tags from the same classification, while the saved run can still show no errors. This change keeps valid candidates and records relevant classification/tag parsing warnings and fetch failures through the processor's existing run status. For example, PII can still classify
ACCT_NUMwhen SPI is missingsupportedLanguage, and the run records an actionable SPI loading warning.Type of change:
High-level design:
on_parse_errorcallback to SDK entity listing and forward it through every page. Strict parsing remains the default, existing skip-mode logging remains when no callback is supplied, and HTTP, pagination, and callback exceptions propagate.Statusso relevant failures appear in existing pipeline-status serialization and failure rendering. Malformed definitions use saved warnings; fetch failures use saved failures. Parsing warnings preserve success-threshold calculations, while fetch failures retain the existing threshold semantics. Diagnostics identify the entity, recognizer, and missing/invalid field without raw payload or exception values; clearly disabled or excluded entities are ignored. Precise recognizer/field explanations require generated-model inspection and revalidation; a simpler safe warning naming the malformed tag can be reviewed independently.all, and a comma-containing name from two separate names; these fixes are additional cache correctness work, separate from recovery.This reuses the existing status upload and success-threshold behavior. There are no server API, schema, or UI changes; saved diagnostics require an associated ingestion pipeline.
Tests:
Use cases covered
Regression tests cover valid neighbors around malformed tags, all-invalid middle pages, classification filters and enablement, recognizer-specific diagnostics, strict SDK defaults, propagation of callback/HTTP/paging errors, bounded caches, completed empty loads, partial results and retries. Processor tests exercise real SDK parsing,
ACCT_NUMpattern classification, pipeline-status upload, success-threshold calculations, and the first-10 detail limit with the full diagnostic count retained.Unit tests
test_classification_manager.py,test_tag_processor.py, andtest_ometa_listing_parse_errors.py.git diff --check origin/main...HEADpassed.pytestorpydantic. Runtime test results and coverage remain to be verified by CI or a configured ingestion environment.Targeted command:
Backend integration tests
Not applicable: no backend API changes.
Ingestion integration tests
No live ingestion integration run was performed during PR preparation. Added unit tests exercise generated models, real SDK parsing, scoring, and the existing pipeline-status upload boundary with mocked transport.
Playwright (UI) tests
Not applicable: no UI changes. Existing failure rendering is reused; live UI verification remains outstanding.
Manual testing performed
Current reviewed head is
4065ac475ed736a0f99c1d55715ae6385cd4994a: three commits and seven changed files. No code changes were made while splitting the issue and creating #34973. Its passing tests validate only the minimal recovery branch; they do not verify this broader head. No live server or UI verification was performed during PR preparation.UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>.Fixes #34824.