-
Notifications
You must be signed in to change notification settings - Fork 11.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
Chore: Replace go-multierror with errors package #66432
Chore: Replace go-multierror with errors package #66432
Conversation
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.
Thank you for your contribution! I think that, now, after upgrading the target Go version to 1.20 we can merge it.
it would be nice to update also the go.mod (by syncing your branch with the latest main
and run go mod tidy
) so that the dependency becomes indirect.
@iSatVeerSingh have you closed it by accident? I think that we a few additional changes we could have merged it |
@iSatVeerSingh can you try to follow the instructions and resolve the conflict: the also can you please run |
b0a5653
to
3791574
Compare
@papagian I run go mod tidy. It is adding //indirect instead of removing package |
Hi! 👋 You have some lint errors that are causing the build to fail:
|
I think, that's fine; it's because another library we import uses it:
|
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.
I left some suggestions for fixing the tests
1641256
to
4b190ae
Compare
@papagian Added some changes. All the backend tests are passing on my local system. |
I don't know why it is getting lint errors. |
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.
regarding the lint failures I think it's fine to ignore them for the tests
I cannot reproduce the memcached integration test failure locally and I think it's not related to the changes (must be a flaky test): let's give it a 2nd try
var multierr *multierror.Error | ||
require.True(t, errors.As(err, &multierr)) | ||
require.Equal(t, multierr.Len(), 2) | ||
multierr, is := err.(interface{ Unwrap() []error }) |
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.
I think we hit a linter limitation here: in any case I think that it's fine to ignore the linter
multierr, is := err.(interface{ Unwrap() []error }) | |
//nolint:errorlint | |
multierr, is := err.(interface{ Unwrap() []error }) |
var multierr *multierror.Error | ||
require.True(t, errors.As(err, &multierr)) | ||
require.Equal(t, multierr.Len(), 1) | ||
multierr, is := err.(interface{ Unwrap() []error }) |
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.
same as above
multierr, is := err.(interface{ Unwrap() []error }) | |
//nolint:errorlint | |
multierr, is := err.(interface{ Unwrap() []error }) |
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.
thank you for your contribution!
* code refactor and type assertions added to tests * no-lint rule added for specific line
* code refactor and type assertions added to tests * no-lint rule added for specific line
What is this feature?
Replaced go-multierror package with errors package.
Why do we need this feature?
Who is this feature for?
Which issue(s) does this PR fix?:
Fixes #63686
Special notes for your reviewer:
Please check that: