mirror of
https://github.com/goharbor/harbor.git
synced 2026-10-23 10:08:57 +03:00
* 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>