containers / image

Work with containers' images
Apache License 2.0
845 stars 366 forks source link

copy.Options.EnsureCompressionVariantsExist doesn’t detect existing variants with zstd:chunked #2318

Open mtrmac opened 4 months ago

mtrmac commented 4 months ago

Right now skopeo copy --add-compression=zstd:chunked doesn’t exist — but if it did, repeated copies would keep adding new zstd:chunked instances.

We detect whether the desired instance already exists by the io.github.containers.compression.zstd annotation, but that only means “zstd”; so the code never determines that a zstd:chunked instance exists.

We would either need to add a new annotation (annotation value? or a new key?), or to actually fetch the per-instance manifest to see whether all layers are chunked.

Cc: @giuseppe