Skip to content

Backport #32011: Allow cross-domain Data Products when domain validation rule is disabled (1.13) - #32237

Merged
karanh37 merged 5 commits into
1.13from
backport/32011-cross-domain-data-products-1.13
Aug 31, 2026
Merged

karanh37 merged 5 commits into
1.13from
backport/32011-cross-domain-data-products-1.13

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Aug 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Backport of #32011 (Fixes #31329) to the 1.13 release branch.

  • When the "Data Product Domain Validation" data asset rule is disabled, the Data Product dropdown now lists products across all domains instead of scoping to the asset's own domain
  • Adds isRulesLoaded tracking to hold the strict domain-scoped default until entity rules actually load, preventing a flash of permissive behavior on initial page load
  • Applied to all Data Product assignment surfaces: DataProductsSection, DataProductsContainer, CommonWidgets, EntityRightPanel, and TestCaseResultTab
  • KnowledgePageDetailRightPanel was skipped (does not exist on 1.13)
  • DataProductsContainer.component.test.tsx was skipped (new file on main that references WidgetPlusButton/WidgetCard which don't exist on 1.13)

Adaptation notes

The main branch has undergone significant UI refactoring since 1.13 (WidgetCard, WidgetActionButton, lazy-loaded CommonWidgets, ui-core-components Typography). This backport applies the feature logic (domain-gating, isRulesLoaded, requireDomainForDataProduct prop) using the 1.13 component set (PlusIconButton, EditIconButton, ExpandableCard, antd Typography).

Test plan

  • TypeScript compiles cleanly (tsc --noEmit passes)
  • Jest unit tests pass for useEntityRules.test.ts and DataProductsSection.test.tsx
  • Playwright DataAssetRulesDisabled.spec.ts — cross-domain Data Product assignment works when rule disabled
  • Playwright DataAssetRulesEnabled.spec.ts — same-domain scoping enforced, other-domain products not listed
  • Manual: disable rule → assign cross-domain product ✓; re-enable rule → dropdown scoped ✓

🤖 Generated with Claude Code

Greptile Summary

The backport makes Data Product assignment domain-scoped only while the validation rule is enabled, retaining the restrictive behavior until entity rules finish loading.

  • Adds explicit rule-loaded state to the shared entity-rules hook and generic context.
  • Propagates conditional domain requirements across Data Product assignment surfaces.
  • Adds unit and Playwright coverage for enabled, disabled, and loading states.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/hooks/useEntityRules.ts Adds a loaded-state signal based on whether the provider has stored rules for the requested entity type.
openmetadata-ui/src/main/resources/ui/src/components/common/DataProductsSection/DataProductsSection.tsx Conditionally removes domain filtering and domain-presence gating after disabled rules load.
openmetadata-ui/src/main/resources/ui/src/components/DataProducts/DataProductsContainer/DataProductsContainer.component.tsx Adds a configurable domain requirement while preserving strict behavior by default.
openmetadata-ui/src/main/resources/ui/src/components/Customization/GenericProvider/GenericProvider.tsx Exposes entity-rule loading state through the generic entity context.
openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/TestCaseResultTab/TestCaseResultTab.component.tsx Applies conditional domain validation to Test Case Data Product assignment.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataAssetRulesDisabled.spec.ts Covers assigning a Data Product from another domain when validation is disabled.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataAssetRulesEnabled.spec.ts Covers exclusion of other-domain Data Products while validation is enabled.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Open Data Product selector] --> B{Entity rules loaded?}
  B -- No --> C[Require asset domain]
  B -- Yes --> D{Domain validation enabled?}
  D -- Yes --> C
  D -- No --> E[Search Data Products across all domains]
Loading

Reviews (5): Last reviewed commit: "test(ui): mock useEntityRules in TestCas..." | Re-trigger Greptile

…in validation rule is disabled (1.13)

Backport of PR #32011 (Fixes #31329) adapted for the 1.13 release branch.

When the "Data Product Domain Validation" data asset rule is disabled, the Data
Product dropdown now lists products across all domains instead of scoping to the
asset's own domain. Adds isRulesLoaded tracking to hold the strict default until
rules actually load, preventing a flash of permissive behavior.

Applied to all Data Product assignment surfaces: DataProductsSection,
DataProductsContainer, CommonWidgets, EntityRightPanel, and TestCaseResultTab.
Includes Jest unit tests and Playwright E2E tests for both enabled and disabled
rule states.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@anuj-kumary
anuj-kumary requested a review from a team as a code owner August 28, 2026 10:54
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added the UI UI specific issues label Aug 28, 2026
@anuj-kumary anuj-kumary self-assigned this Aug 28, 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 skip-pr-checks Bypass PR metadata validation check safe to test Add this label to run secure Github workflows on PRs labels Aug 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❌ UI Checkstyle Failed

❌ ESLint + Prettier + Organise Imports (src)

One or more source files have linting or formatting issues.

❌ Playwright - Guardrails + ESLint + Prettier + Organise Imports

Either a Playwright test file has linting/formatting issues, or a guardrail check failed: ESLint rule unit tests, a new guardrail violation, a stale suppression entry (its violation was fixed but the baseline was not pruned), a blanket eslint-disable, or a stale generated rule table. For the guardrail cases run yarn lint:playwright:suppressions in openmetadata-ui/src/main/resources/ui and commit the pruned eslint-suppressions.json, then yarn test:eslint-rules && node scripts/generate-playwright-rule-table.mjs --check.

Affected files

error Command "test:eslint-rules" not found.

❌ Core Components - I18n Sync

Core-components t() keys, locale files, or language-set are out of sync. Run yarn check-i18n-all locally.

❌ Tailwind Audit

Hardcoded Tailwind values found. Use a design-system utility (run yarn tw-audit:report for the token each value maps to).

❌ Antd + Less Deprecation Guard

A new antd import or new .less file was added. Use UntitledUI + Tailwind for new work.

Affected files

at Function._resolveFilename (node:internal/modules/cjs/loader:1401:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1057:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1062:22)
at Function._load (node:internal/modules/cjs/loader:1211:37)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:235:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
at node:internal/main/run_main_module:36:49 {


Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

TestCaseResultTab now calls useEntityRules, whose underlying
RuleEnforcementContext defaults to {}. Without a provider (or a mock)
getRulesForEntity is undefined, so all 20 specs in the suite threw
"getRulesForEntity is not a function".

Mock the hook the same way IncidentManagerPageHeader.test.tsx does.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.52% (61233/96393) 44.93% (33670/74932) 46.78% (10255/21918)

@sonarqubecloud

Copy link
Copy Markdown

@gitar-bot

gitar-bot Bot commented Aug 31, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Backport of cross-domain Data Products feature to 1.13 release branch. When the Data Product Domain Validation rule is disabled, the dropdown now lists products across all domains; isRulesLoaded prevents permissive behavior on initial load. Applied to all relevant Data Product assignment surfaces using 1.13 component patterns. No issues found.

Options

Display: compact → Showing less information.

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

@karanh37
karanh37 enabled auto-merge (squash) August 31, 2026 10:21
@karanh37
karanh37 merged commit 89a4d9e into 1.13 Aug 31, 2026
88 checks passed
@karanh37
karanh37 deleted the backport/32011-cross-domain-data-products-1.13 branch August 31, 2026 10:22

This branch was previously deployed

1 inactive deployment
test — b9b61f43 Deployed Aug 31, 2026 by anuj-kumary via playwright-ci-postgresql (1, 6) #76011
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 skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants