images: provide better error for manifest list match error#2410
Merged
estesp merged 1 commit intocontainerd:masterfrom Jun 21, 2018
Merged
images: provide better error for manifest list match error#2410estesp merged 1 commit intocontainerd:masterfrom
estesp merged 1 commit intocontainerd:masterfrom
Conversation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #2410 +/- ##
=======================================
Coverage 44.99% 44.99%
=======================================
Files 92 92
Lines 9398 9398
=======================================
Hits 4229 4229
Misses 4486 4486
Partials 683 683
Continue to review full report at Codecov.
|
dmcgowan
reviewed
Jun 20, 2018
| return ocispec.Manifest{}, errors.Wrapf(errdefs.ErrNotFound, "manifest %v", image.Digest) | ||
| err := errors.Wrapf(errdefs.ErrNotFound, "manifest %v", image.Digest) | ||
| if wasIndex { | ||
| err = errors.Wrapf(errdefs.ErrNotFound, "no match for current platform %s in manifest %v", platforms.Format(p), image.Digest) |
Member
There was a problem hiding this comment.
Any reason not to just use platform here instead of reformatting?
Member
Author
There was a problem hiding this comment.
Parse() normalizes the platform so it becomes more clear.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Provide a better error if pull fails because there is no match for current platform in the manifest list.
Instead of returning early I remember manifest list in a bool to not break possible cases of nested manifest lists.
Error on pull:
Previously:
manifest sha256:32efb15cbb8a46f4b564857e534fd4c26a4a15813885f91b1a95b5758fea3fd5: not foundNew:
no match for current platform linux/arm/v7 in manifest sha256:32efb15cbb8a46f4b564857e534fd4c26a4a15813885f91b1a95b5758fea3fd5: not foundSigned-off-by: Tonis Tiigi tonistiigi@gmail.com