Skip to content
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

Failure: TestParseReferenceWithTagAndDigest #189

Closed
cyphar opened this issue Dec 21, 2016 · 4 comments · Fixed by #190
Closed

Failure: TestParseReferenceWithTagAndDigest #189

cyphar opened this issue Dec 21, 2016 · 4 comments · Fixed by #190

Comments

@cyphar
Copy link
Contributor

cyphar commented Dec 21, 2016

Currently master fails with this error:

?       github.com/containers/image     [no test files]
ok      github.com/containers/image/copy        0.052s  coverage: 14.9% of statements
ok      github.com/containers/image/directory   0.052s  coverage: 78.1% of statements
ok      github.com/containers/image/directory/explicitfilepath  0.011s  coverage: 85.7% of statements
ok      github.com/containers/image/docker      4.481s  coverage: 47.1% of statements
ok      github.com/containers/image/docker/daemon       0.008s  coverage: 10.5% of statements
ok      github.com/containers/image/docker/policyconfiguration  0.010s  coverage: 94.7% of statements
--- FAIL: TestParseReferenceWithTagAndDigest (0.00s)
        reference_test.go:248: Error parsing reference: "busybox:latest@sha256:86e0e091d0da6bde2456dbb48306f3956bbeb2eae1b5b9a43045843f69fe4aaa" is not a valid repository/tag
FAIL
coverage: 69.9% of statements
FAIL    github.com/containers/image/docker/reference    0.005s
ok      github.com/containers/image/image       0.039s  coverage: 47.7% of statements
ok      github.com/containers/image/manifest    0.065s  coverage: 90.6% of statements
?       github.com/containers/image/oci [no test files]
ok      github.com/containers/image/oci/layout  0.011s  coverage: 45.4% of statements
ok      github.com/containers/image/openshift   0.005s  coverage: 4.0% of statements
ok      github.com/containers/image/signature   38.552s coverage: 94.2% of statements
ok      github.com/containers/image/storage     0.011s  coverage: 28.8% of statements
ok      github.com/containers/image/transports  0.007s  coverage: 92.9% of statements
?       github.com/containers/image/types       [no test files]
?       github.com/containers/image/version     [no test files]
make: *** [Makefile:18: test] Error 1
make test  11.77s user 2.23s system 33% cpu 41.214 total

However this error only happens if you update upstream to the latest version (go get -t). So I think this is actually some upstream change that we aren't handling properly. Do we want to vendor this code, or otherwise integrate it here? I'm not sure, but something is definitely broken.

@cyphar
Copy link
Contributor Author

cyphar commented Dec 21, 2016

Yeah, it looks like distreference.ParseNamed has changed. It's returning this error:

--- FAIL: TestParseReferenceWithTagAndDigest (0.00s)
        reference_test.go:248: Error parsing reference: "busybox:latest@sha256:86e0e091d0da6bde2456dbb48306f3956bbeb2eae1b5b9a43045843f69fe4aaa" is not a valid repository/tag: unsupported digest algorithm

We should note that our current usage of pkg/errors isn't quite right -- we should be using errors.Wrap everywhere.

@runcom
Copy link
Member

runcom commented Dec 21, 2016

@cyphar yup (I just woke up though and I'll be traveling today, I'll take a look at this as soon as I can)

Tracking upstream wasn't the best bet thought. Still we need that (also https://github.com/stevvooe/go-digest)

@cyphar
Copy link
Contributor Author

cyphar commented Dec 21, 2016

@runcom I figured it out, it's because we aren't loading the digest (like the Go library).

@cyphar cyphar mentioned this issue Dec 21, 2016
@cyphar
Copy link
Contributor Author

cyphar commented Dec 21, 2016

Fixed in #190.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants