-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
*: use fmt.Errorf with %w/%v for Go 1.13 error wrapping #2355
*: use fmt.Errorf with %w/%v for Go 1.13 error wrapping #2355
Conversation
76a2698
to
84fc90b
Compare
@joelanford @jmrodri @jmccormick2001 |
@estroz can you please check the changes and let me know if additional changes are needed. Thanks |
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.
Great collab 🥇. Really tks for the contribution.
It shows fine, however, needs to be rebased with the master.
Could you please rebase for we are able to check if all are changed as requested?
f12a52f
to
4d96e44
Compare
@camilamacedo86 I have rebased and pre-submit checks have passed. PTAL. |
@@ -126,7 +126,7 @@ func verifyLeader(t *testing.T, namespace string, f *framework.Framework, labels | |||
return true, nil | |||
}) | |||
if err != nil { | |||
return nil, fmt.Errorf("error getting leader lock configmap: %v", err) |
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.
@nrchakradhar also nothing in test/
should be wrapped. Otherwise 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.
Changes done.
f8b2ea7
to
fc4f218
Compare
I hope I have addressed all the changes. @estroz @camilamacedo86 PTAL. Thanks. |
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
CHANGELOG.md
Outdated
@@ -22,7 +22,7 @@ | |||
- Added support for override values with environment variable expansion in the `watches.yaml` file for Helm-based operators. ([#2325](https://github.com/operator-framework/operator-sdk/pull/2325)) | |||
|
|||
### Changed | |||
|
|||
- Changed error wrapping according to Go version 1.13+ [error handling](https://blog.golang.org/go1.13-errors). ([#2355](https://github.com/operator-framework/operator-sdk/pull/2355)) |
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.
Hi @nrchakradhar,
We had a new release so it needs to be updated with the master and the CHANGELOG properly updated. Could you please do that for we are able to merge?
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.
Has /lgtm
Needs just rebase with master and updated properly the CHANGELOG.
fc4f218
to
7003190
Compare
New changes are detected. LGTM label has been removed. |
@estroz @camilamacedo86 Travis error shows that there is a mismatch in go module versions. |
@nrchakradhar merge your branch with master, that should resolve the issue. |
Use fmt.Errorf as per 1.13. Changed errors.Wrap and errors.Wrapf to use fmt.Errorf. Fixes operator-framework#2308
e4dac51
to
f72306f
Compare
The new failure seems to be different than the changes. Found broken url (#1571 -> #1571) at ./CHANGELOG.md:221 : 502 Bad Gateway May be there is some network issue during the build. How do I re-trigger the build? @estroz @camilamacedo86 |
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.
/gtm
/approved
Use fmt.Errorf as per 1.13. Changed errors.Wrap and errors.Wrapf to use fmt.Errorf.
Fixes #2308
Closes #2308
Description of the change:
As the code is upgraded to go 1.13, error handling has been changed. The PR addresses the same.
All fmt.Errorf() calls that wrap an error are changed as below:
fmt.Errorf("some context about my error: %w", err)
Motivation for the change:
Upgrade to go 1.13 version