Skip to content

Fixes #35767: add domains from the Assets tab when multiple domains are allowed - #35768

Merged
anuj-kumary merged 6 commits into
mainfrom
anuj-kumary/multiple-domains-inconsistent-behavior
Oct 20, 2026
Merged

anuj-kumary merged 6 commits into
mainfrom
anuj-kumary/multiple-domains-inconsistent-behavior

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #35767

With the Multiple Domains are not allowed rule off, the asset page lets an asset hold several domains, but adding an asset from a domain's Assets tab always replaced its domains, so the asset was moved instead of added. DomainRepository.assignTo now reads the rule: with it on, the asset moves as before; with it off, the domain is added beside the domains the asset holds itself.

The dry run behind the Confirm Asset Move dialog follows the same rule: it reports "will be added" instead of "will be moved from", and only lists data products as removed when the asset's domains after the add no longer cover them. It also reads all of the asset's own domains instead of a single one, which failed with "Impact could not be computed" for an asset already in two domains.

Known limit, unchanged from before: with the rule on, entity types the rule ignores (user, team, persona, bot, query) are still replaced rather than appended.

Type of change:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Rule off: adding a table that is in domain A to domain B previews "will be added" with no side effects, and the table ends up in both A and B.
  • Rule on (default): the existing move, dry-run and data-product-warning cases are unchanged.

Backend integration tests

  • I added integration tests in openmetadata-integration-tests/ for new/changed API endpoints.
  • Files added/updated: DomainBulkAssetsDryRunIT — new test_add_withMultipleDomainsAllowed_keepsExistingDomains. The class now holds @ResourceLock("MULTI_DOMAIN_RULE"), because its move tests rely on the global rule state the new test toggles.

DomainBulkAssetsDryRunIT (-Pmysql-elasticsearch, parallel lane): Tests run: 7, Failures: 0, Errors: 0, Skipped: 0

Playwright (UI) tests

  • Not applicable (no UI changes).

UI screen recording:

Not applicable — backend-only fix; the dialog text comes from the server.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • I have added a test that covers the exact scenario we are fixing.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable issues were found.

Summary

DomainRepository now adds domains beside an asset’s existing direct domains when multiple domains are allowed.

  • Adding an asset from a domain keeps its other domains when allowed.

Reviews (5) · Last reviewed commit: "Merge branch 'main' into anuj-kumary/mul..." · Reviewed by Greptile

@anuj-kumary
anuj-kumary requested a review from a team as a code owner October 19, 2026 15:12
@anuj-kumary anuj-kumary self-assigned this Oct 19, 2026
@anuj-kumary
anuj-kumary requested a review from IceS2 October 19, 2026 15:12
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions github-actions Bot added the UI UI specific issues label Oct 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Oct 19, 2026
@anuj-kumary
anuj-kumary enabled auto-merge October 20, 2026 04:27
@gitar-bot

gitar-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Changing domain assignment based on the multi-domain rule could leave assets or data-product associations attached to unintended domains.

Fixes adding assets from a domain's Assets tab when multiple domains are allowed: the domain is now appended beside the asset's existing domains instead of replacing them, and the Confirm Asset Move dry run reports "will be added" accordingly. 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

@anuj-kumary
anuj-kumary added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-10-20T14:14:58Z)

Blocked the queue: integration-tests-mysql-elasticsearch, integration-tests-postgres-opensearch

@anuj-kumary
anuj-kumary added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 9d44fa8 Oct 20, 2026
93 checks passed
@anuj-kumary
anuj-kumary deleted the anuj-kumary/multiple-domains-inconsistent-behavior branch October 20, 2026 20:28
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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Domain Assets tab replaces an asset's domain even when multiple domains are allowed

4 participants