Repository navigation
Backport #33710 to 1.13.6: append source tags when overrideMetadata is off - #33755
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 ✅ Approved🟡 Medium risk · Changes ingestion tag synchronization semantics for table and column metadata Backport of #33710 to 1.13.6 fixes tag handling during re-ingestion when 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. Same change already on
1.13and1.13.5.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.Clean cherry-pick, no conflicts: this branch already carries #33400, so the aliases tests the fix sits next to are present here.
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 consistent with server tag identity and is covered across entity, column, nested-column, and override scenarios.
Summary
This backport changes ingestion patch construction so source tags are appended to existing OpenMetadata tags when metadata override is disabled, while preserving replacement behavior when override is enabled.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR Stored[Stored OpenMetadata tags] --> Mode{overrideMetadata?} Incoming[Incoming source tags] --> Mode Mode -->|false| Merge[Merge by tagFQN and source] Mode -->|true| Replace[Use incoming tags] Merge --> Patch[Generate metadata patch] Replace --> PatchReviews (1) · Last reviewed commit: "Fixes #33709: [Ingestion] append source ..."