Repository navigation
Backport #33710 to 1.13.5: append source tags when overrideMetadata is off - #33732
Conversation
… off [1.13] (#33710) * fix(ingestion): append source tags when overrideMetadata is off With Overwrite Metadata off, re-ingestion kept the stored tag list for any column that already carried a tag, so a tag added at the source after the first run never landed. Entity level tags went through the positional diff and survived only when the source happened to list them last. Tags are now merged rather than replaced or kept, matching what the server does for a PUT. overrideMetadata=true still replaces them. * test(ingestion): match the topology patch test to additive tags test_topology_patch_table_columns_with_random_order asserted that the source tag is discarded for the table and for column5, which is exactly the behaviour the fix removes. Both now carry the curated tag alongside the source one. The tag assertions also indexed into tags[0]/tags[1], but the server reads tags back with an ORDER BY tagFQN, so the index is a collation artifact once an entity holds more than one tag. They compare sorted FQN lists now.
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
Code Review ✅ No issues found🟡 Medium risk · Ingestion metadata patching changes tag retention and merge behavior across entities Backport of tag-merging fix for re-ingestion with OptionsDisplay: 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 #33710, for #33709.
With Overwrite Metadata off, re-ingestion kept the stored tag list for any column that already carried a tag, so a tag added at the source after the first run never landed. Tags are now merged rather than replaced or kept, which is what the server does for a PUT.
overrideMetadata=truestill replaces them.One deliberate difference from the merged commit: the cherry-pick also carries
TestBuildPatchTableAliases, which belongs to #33377 and is not on this branch. It asserts"aliases" in ALLOWED_COMMON_PATCH_FIELDS, and1.13.5has noaliasesentry, so that class is left out. The rest of the change is applied as-is.Type of change:
Checklist:
Fixes <issue-number>: <short explanation>TestBuildPatchTagAppendiningestion/tests/unit/metadata/ingestion/models/test_patch_request.py, plus the tag assertions iningestion/tests/integration/ometa/test_ometa_topology_patch.py, both as merged.The PR appears safe to merge; the additive tag behavior is aligned across patch construction, restricted-field filtering, server identity semantics, and regression coverage.
Summary
This backport changes non-override ingestion patches to merge source-provided tags with tags already stored in OpenMetadata instead of silently discarding newly discovered source tags.
overrideMetadatais enabled.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR Stored[Stored OpenMetadata tags] --> Mode{overrideMetadata?} Incoming[Ingested source tags] --> Mode Mode -->|No| Merge[Stored-first union by tagFQN and source] Mode -->|Yes| Replace[Use incoming tags] Merge --> Patch[Build JSON Patch] Replace --> Patch Patch --> Server[OpenMetadata server]Reviews (1) · Last reviewed commit: "Fixes #33709: [Ingestion] append source ..."