Skip to content

Fixes 37053: Run the data product domain containment repair in 2.0.8 - #37096

Merged
yan-3005 merged 1 commit into
mainfrom
fix/37053-move-containment-repair-to-208
Nov 5, 2026
Merged

yan-3005 merged 1 commit into
mainfrom
fix/37053-move-containment-repair-to-208

Conversation

@yan-3005

@yan-3005 yan-3005 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #37053

#37006 added the data product domain containment repair to the 2.0.9 migration. The repair ships with the next 2.0 release, 2.0.8, so this moves it to 2.0.8:

  • DataProductDomainContainmentRepair (and its unit test) move from migration/utils/v209 to migration/utils/v208.
  • The step runs in the MySQL and Postgres 2.0.8 migrations. MySQL 2.0.9 drops it; the Postgres 2.0.9 class held only this step, so it is removed and 2.0.9 falls back to the default migration process.
  • 2.1.0 keeps re-running the repair: a database already at 2.1.0 reprocesses 2.0.8 for its SQL only. The repair rewrites only links that disagree, so a second run changes nothing.

No behavior change in the repair itself.

Type of change:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Upgrading through 2.0.8 repairs a data product whose CONTAINS link still names its old domain, so edits to its assets pass the "Data Product Domain Validation" rule.
  • Upgrading a 2.1.0 database still runs the repair.

Unit tests

  • DataProductDomainContainmentRepairTest 6/0, IngestionPipelineMigrationEntryPointTest 2/0 (service unit run: 269 tests, 0 failures).

Integration tests

  • DataProductDomainContainmentMigrationIT (3), NegatedListRuleMigrationIT (2), ConnectionSecretsMigrationIT (21):
    • MySQL + Elasticsearch: Tests run: 26, Failures: 0, Errors: 0, Skipped: 0
    • Postgres + OpenSearch: Tests run: 26, Failures: 0, Errors: 0, Skipped: 0

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.

The repair ships with the next 2.0 release, 2.0.8, so it belongs to that
version's migration instead of 2.0.9. Databases already at 2.1.0 reprocess
2.0.8 for its SQL only, so 2.1.0 keeps running the repair as well.
@yan-3005
yan-3005 requested a review from a team as a code owner November 5, 2026 05:26
@yan-3005
yan-3005 requested a review from harshach November 5, 2026 05:26
@yan-3005 yan-3005 added the To release Will cherry-pick this PR into the release branch label Nov 5, 2026
Copilot AI balanced review requested due to automatic review settings November 5, 2026 05:26

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Nov 5, 2026
@gitar-bot

gitar-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🔴 High risk · Moving the containment repair into 2.0.8 rewrites stored domain links during upgrades; a misapplied repair could associate data products with incorrect domains.

Moves the data product domain containment repair from the 2.0.9 migration to 2.0.8 so it ships with the next 2.0 release, and removes the now-empty Postgres 2.0.9 class. The repair logic itself is unchanged, and 2.1.0 still re-runs it. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

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

@yan-3005
yan-3005 merged commit 56db9c1 into main Nov 5, 2026
93 of 94 checks passed
@yan-3005
yan-3005 deleted the fix/37053-move-containment-repair-to-208 branch November 5, 2026 05:37
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.0 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@gh-bot-collate

gh-bot-collate Bot commented Nov 5, 2026

Copy link
Copy Markdown

🤖 Not backported to 2.0. Claude looked at the conflict and declined to resolve it:

Backport aborted: PR #37096 onto 2.0

Reason

PR #37096 ("Run the data product domain containment repair in 2.0.8") only
relocates an existing migration step — the data product domain containment
repair — from the v209 migration to the v208 migration on main. It
does this by:

  • Moving DataProductDomainContainmentRepair from
    migration.utils.v209 to migration.utils.v208.
  • Removing the runOnce(...) call for it from mysql/postgres
    v209/Migration.java.
  • Adding the runOnce(...) call to mysql/postgres v208/Migration.java.
  • Updating the v210 migrations and tests to import the class from its new
    v208 package instead of v209.

This presupposes that the repair itself — introduced by PR #37006 ("Fixes
37053: Data Product Domain Validation with inherited domains and stale data
product domain links") — already exists on the target branch under v209.

It does not. On 2.0 (branch backport/2.0/pr-37096, before this
cherry-pick):

So PR #37006 itself was never backported to 2.0. Cherry-picking #37096 in
isolation would mean inventing the entire DataProductDomainContainmentRepair
feature from scratch to resolve the conflicts, which is not "porting this
change and nothing else" — it would be porting a different, much larger
change under this PR's name.

Recommendation

If the data product domain containment repair is wanted on 2.0, backport
PR #37006 first (as its own backport, landing the repair under whatever
migration version is appropriate for 2.0's release line — most likely
directly into v208 to match where it ends up on main after #37096).
Once that lands, PR #37096 either becomes a no-op on 2.0 (if the repair is
placed directly in v208) or can be reconsidered.

State left behind

The cherry-pick (git cherry-pick -x 56db9c1e4410a05b02f679bebecfec9c20ec86e7)
was left in progress, mid-conflict, exactly as started — no files were
staged, edited, or resolved. Run git cherry-pick --abort to return to a
clean 2.0 tree before taking any other action on this branch.

resolver run

yan-3005 added a commit that referenced this pull request Nov 5, 2026
…nd stale data product domain links (2.0) (#37109)

* Fixes #37053: Data Product Domain Validation with inherited domains and stale data product domain links (2.0)

Backport of #37006 and #37096 to 2.0.

- Rules on PATCH, create, PUT and bulk PUT see the domains an entity
  inherits from its parent, so an asset whose domain comes from its schema
  and carries a data product of that domain is no longer rejected.
- The 2.0.8 migration rewrites a data product's CONTAINS link to the domain
  it shows. Products moved to another domain before 1.12.12 / 1.13.1 kept
  their old domain there, which the rule reads, so every edit to their
  assets was rejected. The repair walks data products in id batches
  (IdBatches, ported from main) and only rewrites links that disagree.

(cherry picked from commit 16b6974)

* chore(playwright): auto-refresh impact-map.generated.json

* Stub the containment repair in the 2.0.8 entry-point test

The test runs the 2.0.8 data migration against a mocked handle, so the
repair step now in that migration needs stubbing like the other steps.

---------

Co-authored-by: Sriharsha Chintalapani <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Data Product domain relationships are not synchronized when moving Data Products between Domains

3 participants