Repository navigation
Fixes #37053: Data Product Domain Validation with inherited domains and stale data product domain links (2.0) - #37109
Conversation
…nd 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)
❌ 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 |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
Code Review ✅ Approved🔴 High risk · The 2.0.8 migration rewrites data-product domain relationships, and incorrect link repair could misassign products or alter domain-validation outcomes. Backports the data product domain validation fix to 2.0: rule checks now account for inherited domains, deferred validation for assets whose domain comes from their parent, and a 2.0.8 migration that repairs stale data product CONTAINS links. 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 |
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.
Describe your changes:
Fixes #37053
Backport of #37006 and #37096 to
2.0. The automated backport of #37006 could not resolve its conflicts, so this ports both changes by hand onto 2.0's code.Rules see inherited domains
setInheritedFieldsside effects (alert templates, team domains merged into users) never reach the stored entity.RuleEngine.dependsOnInheritedDomains), so an asset whose domain comes from its schema is no longer rejected. Bulk PUT checks before restoring a soft-deleted entity.Data migration (2.0.8)
DataProductDomainContainmentRepairrewrites a data product's CONTAINS link to the domain it shows. Products moved to another domain before 1.12.12 / 1.13.1 kept the old domain in CONTAINS, which the "Data Product Domain Validation" rule reads, so every edit to their assets was rejected.2.0-specific differences from main
IdBatches(keyset id batching for data migrations) is ported from main with its unit test; 2.0 did not have it.CollectionDAOon 2.0.Type of change:
High-level design:
Same design as #37006 and #37096; see those PRs.
Tests:
Use cases covered
Unit tests
RuleEngineTest15/0,DataProductDomainContainmentRepairTest6/0,IdBatchesTest2/0.Integration tests
DataProductDomainContainmentMigrationIT,DataProductResourceIT,UserResourceIT#test_removingOwnDomainAlsoGivenByTeamDropsIt,NegatedListRuleMigrationIT:Tests run: 278, Failures: 0, Errors: 0Tests run: 278, Failures: 0, Errors: 0SystemResourceIT#test_taskPatchKeepsItsTargetsInheritedDomainsForTheRules(global-state lane): 1/0 on MySQL + Elasticsearch and Postgres + OpenSearch.Playwright
DataAssetRulesEnabled.spec.ts(CI): asset with an inherited domain and a data product can be edited.Checklist:
Fixes <issue-number>: <short explanation>