Repository navigation
Backport #32011: Allow cross-domain Data Products when domain validation rule is disabled (1.13) - #32237
Conversation
…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]>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
|
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! |
❌ UI Checkstyle Failed❌ ESLint + Prettier + Organise Imports (src)One or more source files have linting or formatting issues. ❌ Playwright - Guardrails + ESLint + Prettier + Organise ImportsEither 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 Affected fileserror Command "test:eslint-rules" not found. ❌ Core Components - I18n SyncCore-components ❌ Tailwind AuditHardcoded Tailwind values found. Use a design-system utility (run ❌ Antd + Less Deprecation GuardA new Affected filesat Function._resolveFilename (node:internal/modules/cjs/loader:1401:15) Fix locally (fast - only checks files changed in this branch): make ui-checkstyle-changed |
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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]>
|
Code Review ✅ ApprovedBackport 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; OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |



Summary
Backport of #32011 (Fixes #31329) to the 1.13 release branch.
isRulesLoadedtracking to hold the strict domain-scoped default until entity rules actually load, preventing a flash of permissive behavior on initial page loadDataProductsSection,DataProductsContainer,CommonWidgets,EntityRightPanel, andTestCaseResultTabKnowledgePageDetailRightPanelwas skipped (does not exist on 1.13)DataProductsContainer.component.test.tsxwas skipped (new file on main that referencesWidgetPlusButton/WidgetCardwhich 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
tsc --noEmitpasses)useEntityRules.test.tsandDataProductsSection.test.tsxDataAssetRulesDisabled.spec.ts— cross-domain Data Product assignment works when rule disabledDataAssetRulesEnabled.spec.ts— same-domain scoping enforced, other-domain products not listed🤖 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.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
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]Reviews (5): Last reviewed commit: "test(ui): mock useEntityRules in TestCas..." | Re-trigger Greptile