buildpacks / imgutil

Helpful utilities for working with images
Apache License 2.0
24 stars 41 forks source link

Skip validating inspect ID after save #239

Closed natalieparellano closed 8 months ago

natalieparellano commented 8 months ago

Before #222, we calculated the sha of the config file that we sent to the daemon, and verified that we could inspect an image with that ID.

After #222, since the image ID may be the sha of the config file or the sha of the manifest file (depending on whether containerd storage is enabled), we still calculated the sha of the config file that we sent to the daemon, but instead of trying to inspect an image with that ID, we inspected the image by name, derived the config file from the data we got back from inspect, and then verified that the sha of the derived config file matches the sha of the config file that we sent in.

This check turned out to be brittle (see https://github.com/buildpacks/pack/issues/2000 and https://cloud-native.slack.com/archives/C0331B61A1Y/p1701976103265489) and we agreed that it should be safe to remove this check.