Skip to content

Data product with multiple domains is deleted when one domain is recursively deleted #29146

@harshach

Description

@harshach

Problem

A data product can belong to multiple domains, but recursive domain deletion currently treats each domain -> dataProduct containment edge as exclusive ownership.

If a data product belongs to Domain A and Domain B, deleting Domain A recursively can delete the data product even though Domain B still points to it. That removes visibility for a data product that still has a valid domain relationship.

Reproduction

  1. Create Domain A.
  2. Create Domain B.
  3. Create a data product with both Domain A and Domain B in domains.
  4. Hard-delete Domain A with recursive=true.
  5. Fetch or list the data product under Domain B.

Actual Behavior

The data product is deleted or disappears from the data product listing after deleting only one of its domains.

Expected Behavior

Deleting one domain should detach only that domain relationship. The data product should remain fetchable and visible under its remaining domains. It should be cascade-deleted only when all real domain containment relationships are being removed.

Test Coverage Added In PR

A backend integration repro has been added in DataProductResourceIT#test_deleteOneDomainForMultiDomainDataProduct_preservesDataProductUntilLastDomain.

Related to the domain-move deletion issue tracked in #29137 and PR #29138.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    In Review / QA 👀

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions