1
0
mirror of https://github.com/goharbor/harbor.git synced 2026-10-23 10:08:57 +03:00
Files
stonezdj(Daojun Zhang) 533cfd7659 fix(replication): preserve artifact type for multi-tier accessories (#24200)
* fix(replication): preserve artifact type for multi-tier accessories

In getAccessoryArts, reassigning art when fetching accessory details
shadowed the parent artifact and caused sub-accessories (such as signatures
of an SBOM) to inherit Type "UNKNOWN" from the accessory artifact rather
than the subject artifact's type (e.g. "IMAGE"). Consequently, when a
replication policy configured a resource filter (e.g. "image"), the
sub-accessories were dropped by the artifact type filter.

Fix this by using a separate variable subArt to avoid shadowing art,
and propagate art.Type to subArt so nested accessories inherit the
root subject artifact's type.

Signed-off-by: stonezdj <stonezdj@gmail.com>

* test(replication): cover nested accessory type inheritance

Signed-off-by: stonezdj <stonezdj@gmail.com>

---------

Signed-off-by: stonezdj <stonezdj@gmail.com>
2026-10-23 03:03:30 +00:00
..
2026-10-06 13:53:09 +02:00
2023-07-12 17:35:14 +03:00
2026-10-22 15:02:31 +08:00
2026-10-22 15:02:31 +08:00