Skip to content

Provide better error context on resolve failures#2011

Merged
estesp merged 1 commit intocontainerd:masterfrom
darstahl:ResolveErrors
Jan 17, 2018
Merged

Provide better error context on resolve failures#2011
estesp merged 1 commit intocontainerd:masterfrom
darstahl:ResolveErrors

Conversation

@darstahl
Copy link
Copy Markdown
Contributor

While debugging a failure to resolve Windows multi-manifested images, I found more context on the errors in resolve to be necessary. This adds that context on which operation is failing.

for example:

$ ctr images pull docker.io/library/go:nanoserver
<snip>
ctr: failed to resolve reference "docker.io/library/go:nanoserver": server message: insufficient_scope: authorization failed

Signed-off-by: Darren Stahl [email protected]

Copy link
Copy Markdown
Contributor

@mlaventure mlaventure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread client.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe errors.Wrapf(err, "failed to get fetcher for %q", name)

Comment thread client.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: errors.Wrapf(err, "failed to unpack image on snapshotter %s", pullCtx.Snapshotter)?

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jan 17, 2018

Codecov Report

Merging #2011 into master will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2011      +/-   ##
==========================================
+ Coverage   45.45%   45.48%   +0.03%     
==========================================
  Files          94       94              
  Lines        9315     9315              
==========================================
+ Hits         4234     4237       +3     
+ Misses       4372     4370       -2     
+ Partials      709      708       -1
Flag Coverage Δ
#linux 50.06% <ø> (ø) ⬆️
#windows 40.43% <ø> (+0.03%) ⬆️
Impacted Files Coverage Δ
content/local/store.go 50.79% <0%> (+0.79%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8c4219d...1338a4f. Read the comment docs.

@estesp
Copy link
Copy Markdown
Member

estesp commented Jan 17, 2018

I think @AkihiroSuda's added info is useful for more clarity; other than that, looks good

@darstahl
Copy link
Copy Markdown
Contributor Author

Changes sound good to me. Updated with extra context.

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@estesp estesp merged commit 80fc1f2 into containerd:master Jan 17, 2018
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 this pull request may close these issues.

5 participants