Skip to content

Deduping in catalog transfer drops mirrored components breaking relative OCM reference resolution #763

Description

@rebEllieous

Describe the bug
The catalog-transfer workflow deduplicates against the destination catalog using a key of ComponentVersion name + content fingerprint. Neither carries the registry sub-namespace. When the same OCM component at the same version exists under two different sub-namespace prefixes, only the first transfers; the second is classified already_present and never lands at its own specRepo path in the destination registry.
Two mirrors of the same component under different prefixes therefore produce an identical name and an identical fingerprint, differing only in Component.spec.repository.

To Reproduce
Steps to reproduce the behavior:

  1. Source catalog holds CV X twice: namespace ns-a and ns-b. Same OCM component, same version, same content.
  2. Item from ns-a transfers. ARC pushes under specRepo = mirror-a.
  3. Destination discovery creates CV X.
  4. Item from ns-b: $existing["X"] matches its fingerprint → already_present → skipped.
  5. Destination registry now has the blobs under mirror-a/ and nothing under mirror-b/.
  6. Any component resolving relative to mirror-b/'s repository context fails to find it. The destination catalog reports the component as available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageIssue that has not been reviewed

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions