Repository navigation
Fixes #35767: add domains from the Assets tab when multiple domains are allowed - #35768
Conversation
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
…ttps://github.com/open-metadata/OpenMetadata into anuj-kumary/multiple-domains-inconsistent-behavior
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. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
🚦 Removed from the merge queue —
|
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.assignTonow 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:
High-level design:
N/A — small change.
Tests:
Use cases covered
Backend integration tests
openmetadata-integration-tests/for new/changed API endpoints.DomainBulkAssetsDryRunIT— newtest_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: 0Playwright (UI) tests
UI screen recording:
Not applicable — backend-only fix; the dialog text comes from the server.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues were found.Summary
DomainRepositorynow adds domains beside an asset’s existing direct domains when multiple domains are allowed.Reviews (5) · Last reviewed commit: "Merge branch 'main' into anuj-kumary/mul..." · Reviewed by Greptile