Skip to content

Conversation

@boaz0
Copy link
Collaborator

@boaz0 boaz0 commented Jan 7, 2018

This change gives a better error message when the commit fails because of bad authentication.

This fixes #254 and should be merged only after containers/image#390 is merged.

oErr := nErr[0]
for _, e := range nErr[1:] {
oErr = errors.Wrapf(e, oErr.Error())
}
Copy link
Member

Choose a reason for hiding this comment

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

Iteratively wrapping each error with a separate call to errors.Wrapf() is going to produce duplication in the call stack. Perhaps converting the errcode.Errors into a github.com/urfave/cli/MultiError with its NewMultiError() function and then wrapping that result by calling errors.Wrapf() once would produce something more readable?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I found out that errors.Wrapfing MultiError makes the error message a little bit confusing so I went with returning just MultiError instead.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I was wondering about that. Makes sense.

@rhatdan
Copy link
Member

rhatdan commented Jan 10, 2018

@ripcurld0 You have to sign your PR.

This change gives a better error message when the commit fails
because of bad authentication.

Signed-off-by: Boaz Shuster <[email protected]>
@rhatdan
Copy link
Member

rhatdan commented Jan 15, 2018

LGTM

@rhatdan
Copy link
Member

rhatdan commented Jan 15, 2018

@nalind @TomSweeneyRedHat PTAL

Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

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

LGTM

@rhatdan
Copy link
Member

rhatdan commented Jan 15, 2018

@rh-atomic-bot r+

@rh-atomic-bot
Copy link
Collaborator

📌 Commit 8ca2bdb has been approved by rhatdan

@rh-atomic-bot
Copy link
Collaborator

⚡ Test exempted: merge already tested.

@rhatdan
Copy link
Member

rhatdan commented Jan 15, 2018

This should not have been merged yet.

@nalind
Copy link
Member

nalind commented Jan 15, 2018

Until containers/image#390 gets merged (and vendored here), this should just produce the same behavior we have now, so no harm done, right?

@boaz0
Copy link
Collaborator Author

boaz0 commented Jan 15, 2018

@nalind correct.

@nalind
Copy link
Member

nalind commented Jan 15, 2018

Thanks!

@boaz0
Copy link
Collaborator Author

boaz0 commented Jan 15, 2018

@nalind no problem 👍

nalind pushed a commit that referenced this pull request Apr 2, 2018
When trying to tag an alias (tag) of an image using only the shortname
and no tag, we were unable to find the image in storage.  This corrects
that issue and adds an integration test to protect against regression. I
also updated the man page per the filed issue.

While writing the integration test, I discovered that inspect could also
not find a tagged image without its :tag.

Resolves Issue #385
Resolves Issue #384

Signed-off-by: baude <[email protected]>

Closes: #398
Approved by: mheon
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Commit has misleading error when creds are required but not supplied

5 participants