-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Implement Wrapper interface for errors #1349
Implement Wrapper interface for errors #1349
Conversation
Hi @Adirio. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
03840bd
to
680fabd
Compare
@DirectXMan12 this is the PR I mentioned in #1375 (comment) |
This is the same interface for Go 1.13 errors, so it'll get us Seems conceptually reasonable to me. /ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skimmed. one obvious comment, otherwise generally seems good.
680fabd
to
2ffb426
Compare
2ffb426
to
f74cc02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work! I do think return errors.As(err, SomeError{})
is the way to go, other than that this looks great.
Signed-off-by: Adrian Orive <adrian.orive.oneca@gmail.com>
f74cc02
to
efc58e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/assign @DirectXMan12 I believe this is ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just revert the go.mod changes and a typo nit.
Then, all show greats for we move forward with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
Moving forward with.
I have just a nit concern about the go.mod but we can work to clean up it in #1454
PS.; The requested made for @DirectXMan12 was addressed as well.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Adirio, camilamacedo86 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
Most of the errors in
kubebuilder
are wrapping other errors. By implementing theWrapper
interface defined here we can makegomega.MatchError
be able to check wrapped errors.This behavior has been implemented for several wrapper errors. Gomega needs to be upgraded to v1.8.0+ to benefit from this behavior. Latest version as of today is v1.9.0.
Motivation
This PR is scoped under #1218