-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
balancer/base: keep address attributes for pickers #4253
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.
Thanks for the fix. And sorry for the delay.
This fix looks good to me.
Can you add a test to make sure that the pickers can get the attributes?
Thanks!
ok,I will add some tests |
@menghanl test cases added! |
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. Thanks for the fix!
t.Errorf("in picker.validate, got address %+v with nil attributes, want not nil", sc.Address) | ||
} | ||
foo, ok := sc.Address.Attributes.Value("foo").(string) | ||
if !ok || foo != "2233niang" { |
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.
🤦♂️
#4024 caused the Addresses.Attributes of readySCs obtained by pickerBuilder to be nil when regeneratePicker.
1.add subConnInfo struct which contains subConn and attributes.
2.add attributes to aNoAttrs when generate readySCs.
fixes #4276