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
weightedtarget: return a more meaningful error when no child policy is reporting READY (#5391) #5711
Conversation
|
/easycla |
/easycla |
6286136
to
67db576
Compare
@@ -274,7 +279,8 @@ func (s) TestEDSPriority_SwitchPriority(t *testing.T) { | |||
} | |||
|
|||
// Should get an update with 1's old picker, to override 2's old picker. | |||
if err := testErrPickerFromCh(cc.NewPickerCh, balancer.ErrTransientFailure); err != nil { | |||
want := errors.New("last connection error: subConn connection error") | |||
if err := testErrPickerFromCh(cc.NewPickerCh, want); err != nil { |
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 was about to make the same comment as I did on the other file for here, but realized that testErrPickerFromCh
performs a reflect.DeepEqual()
on the got and want errors, instead of doing a strings.Contains()
. Would you mind fixing the implementation of testErrPickerFromCh
to do the latter instead. It doesn't have to be done in this PR. You can send another PR for that after this is merged. Thanks.
When all the child policies are in
TRANSIENT_FAILURE
, theweightedtarget
LB policy currently sends a picker which always returnsbalancer.ErrTransientFailure
error message. This error does not provide any info to the user regarding the underlying issue for the failure. With this change we are surfacing the underlying error by sending back the error picker.Fixes #5391
RELEASE NOTES: