containers / image

Work with containers' images
Apache License 2.0
862 stars 377 forks source link

Fix manifest updates when we match a layer by TOC digest #2294

Closed mtrmac closed 7 months ago

mtrmac commented 7 months ago

Either return a compressed digest and compressed size, or an uncompressed digest and an uncompressed size (if we are allowed to change the manifest); if neither is possible, ignore the match and force a layer pull.

In almost all cases, a TOC match implies the layer has a TOC digest annotation, i.e. the input manifest is OCI, where the size field is mandatory; so this should not change which layers will be reused

Fixes https://github.com/containers/image/pull/2218#discussion_r1424652040 .

Cc: @giuseppe