Skip to content

[2.1] Fixes #38346: check derived FQN across all entity tables before moving tags - #38513

Merged
yan-3005 merged 1 commit into
2.1from
backport/2.1/pr-38383
Nov 24, 2026
Merged

yan-3005 merged 1 commit into
2.1from
backport/2.1/pr-38383

Conversation

@gh-bot-collate

@gh-bot-collate gh-bot-collate Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Automated backport of #38383 to 2.1.

Source PR #38383
Author @detail-app[bot]
Merge commit 585284f8c3f3b58851237baf9942e6365875ac8c
Method Clean cherry-pick — identical to the commit on main.

Opened from openmetadata-collate, which holds the credentials needed to open a PR here. It merges itself once this branch's required checks pass — no review needed. If a check fails it stays open and the author of #38383 is asked to look.

resolver run

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

The repair now checks whether another entity holds either the stored or derived fully qualified name before moving tags.

  • File repairs leave tags alone when either FQN is shared.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[File needs repair] --> B{Another context file holds derived name?}
  B -->|Yes| C[Leave file unchanged and retry later]
  B -->|No| D[Check both names across entity tables]
  D --> E{Either name shared or lookup failed?}
  E -->|Yes| F[Repair file name; leave tags; log details]
  E -->|No| G[Repair file name and move tags]
Loading

Reviews (1) · Last reviewed commit: "Fixes #38346: check derived FQN across a..." · Reviewed by Greptile

…g tags (#38383)

* fix(migration): check derived FQN across all entity tables before moving tags

* Address review: extract helpers, register fixtures for cleanup

- Extract the two collision LOG.warn blocks in ContextFileFqnRepair.repair
  into a logCollisions helper so the method stays short and does one thing.
- Extract fixture setup (createGlossary, createGlossaryTerm,
  glossaryTermNamedLikeTheFile) and shared after-repair assertions
  (assertTagsStayUnderTheirOwner) so each new test stays short.
- Register the new Context Center files with TestNamespace and add an
  @AfterEach that deletes the folders the new tests create (folders are
  not in TestNamespaceExtension's cleanup map), so runs leave no fixtures
  behind.

---------

Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com>
Co-authored-by: Ram Narayan Balaji <[email protected]>
(cherry picked from commit 585284f)
@gh-bot-collate
gh-bot-collate Bot requested a review from a team as a code owner November 23, 2026 15:52
@gh-bot-collate
gh-bot-collate Bot requested review from IceS2 and removed request for a team November 23, 2026 15:52
@gh-bot-collate gh-bot-collate Bot added the safe to test Add this label to run secure Github workflows on PRs label Nov 23, 2026
@gh-bot-collate

Copy link
Copy Markdown
Author

🤖 This backport will not merge itself: 2.1 has no required status checks, so there is nothing for auto-merge to wait on. Merge it by hand once CI is green.

@yan-3005 yan-3005 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean cherry-pick of #38383 (identical patch-id), verified on main.

@yan-3005
yan-3005 merged commit dcefd80 into 2.1 Nov 24, 2026
46 checks passed
@yan-3005
yan-3005 deleted the backport/2.1/pr-38383 branch November 24, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants