Skip to content

Commit 82b5c43

Browse files
vvolanddmcgowan
authored andcommitted
core/remotes: Handle attestations in MakeRefKey
Don't produce `reference for unknown type: application/vnd.in-toto+json` warning logs when pushing/fetching an image containing the attestation manifests. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com> (cherry picked from commit 3cdfc10) Signed-off-by: Derek McGowan <derek@mcg.dev>
1 parent 2c670e7 commit 82b5c43

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

remotes/handlers.go

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ func MakeRefKey(ctx context.Context, desc ocispec.Descriptor) string {
8181
return "layer-" + key
8282
case images.IsKnownConfig(mt):
8383
return "config-" + key
84+
case images.IsAttestationType(desc.MediaType):
85+
return "attestation-" + key
8486
default:
8587
log.G(ctx).Warnf("reference for unknown type: %s", mt)
8688
return "unknown-" + key

0 commit comments

Comments
 (0)