Avoid calling NewImage() on the source reference when the ImageSource that we already have returns nil from its LayerInfosForCopy() method. For our container-as-image references, that causes a re-extraction of uncached blobs, recomputing their digests, rebuilding the config blobs and manifests. The image library's copy.Image() function then asks the source reference that we're wrapping for blobs that we listed in the rebuilt manifest, and if any of those values differ, we fail to read them. This would have only affected builds that specified a blob cache. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> |
||
|---|---|---|
| .. | ||
| blobcache.go | ||
| blobcache_test.go | ||