-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing image references with both tag and sha fails #351
Comments
I just bumped into this myself. My naive attempt at a fix was to embed Tag inside Digest instead of Repository, and to test for a tag when parsing the digest. This almost works, but a few of the reflective test fail as it adds a default |
I'm curious what the expected semantics of this reference are. Do you pull the image by the tag and error out if the digest is different? Is the tag just there as a "comment" that we can safely ignore? I'm leaning towards the latter to avoid breaking people when tags change. |
In my local tests with |
I've hit this with Skaffold, which catenates an image reference (like
|
...at least until google/go-containerregistry#351 is fixed
Fix test to use distinct digests when necessary. Without this, tests fail non- deterministically because some tests work with images which appear twice with distinct tags and stripping out the tags adds duplicate keys in the resolved image manifest (and the last one "wins") unless the images are given distinct digests. Move the workaround from the general image package to the image resolution command. Reuse reference.WithDigest and reference.TrimNamed. Fixes https://github.com/pivotal-cf/pfs/issues/230
name.ParseReference does not handle Docker image references like
ubuntu:latest@sha256:868fd30a0e47b8d8ac485df174795b5e2fe8a6c8f056cc707b232d65b8a1ab68
(which Docker supports). This causes GoogleContainerTools/kaniko#535.This could probably be fixed by adding some logic to
ParseReference
or implementing #78.The text was updated successfully, but these errors were encountered: