Skip to content

Backport #33710 to 1.13.6: append source tags when overrideMetadata is off - #33755

Merged
manerow merged 1 commit into
1.13.6from
backport/33710-to-1.13.6
Sep 22, 2026
Merged

manerow merged 1 commit into
1.13.6from
backport/33710-to-1.13.6

Conversation

@mohittilala

@mohittilala mohittilala commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Backport of #33710, for #33709. Same change already on 1.13 and 1.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=true still 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:

  • Bug fix

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed. No schema changes.
  • I have added a test that covers the exact scenario we are fixing.

TestBuildPatchTagAppend in ingestion/tests/unit/metadata/ingestion/models/test_patch_request.py, plus the tag assertions in ingestion/tests/integration/ometa/test_ometa_topology_patch.py, both as merged.

RetriggerConfidence Score: 5/5

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.

  • Adds server-compatible tag identity and union helpers.
  • Applies additive merging to entity-level tags and tags on nested array attributes such as columns and child columns.
  • Expands unit and integration coverage for source-added tags, user-curated tags, ordering differences, nested columns, and override behavior.
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 --> Patch
Loading

Reviews (1) · Last reviewed commit: "Fixes #33709: [Ingestion] append source ..."

… 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.
@mohittilala
mohittilala requested a review from a team as a code owner September 22, 2026 04:57
@mohittilala mohittilala added the skip-pr-checks Bypass PR metadata validation check label Sep 22, 2026
@mohittilala
mohittilala requested review from IceS2 and removed request for a team September 22, 2026 04:57
@mohittilala mohittilala self-assigned this Sep 22, 2026
@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Sep 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@gitar-bot

gitar-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown
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 overrideMetadata is off: tags are now merged with existing values instead of being replaced or discarded, matching server behavior. Clean cherry-pick with test coverage. No issues found.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@manerow
manerow merged commit a9987e6 into 1.13.6 Sep 22, 2026
118 of 169 checks passed
@manerow
manerow deleted the backport/33710-to-1.13.6 branch September 22, 2026 10:30

This branch was previously deployed

1 inactive deployment
test — 0666d7a2 Deployed Sep 22, 2026 by mohittilala via playwright-ci-postgresql (2, 6) #91500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants