-
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
xds/csds: populate new GenericXdsConfig field #4898
Conversation
ret := &v3statuspb.ClientStatusResponse{ | ||
Config: []*v3statuspb.ClientConfig{ | ||
{ | ||
Node: nodeProtoToV3(s.xdsClient.BootstrapConfig().NodeProto), | ||
XdsConfig: []*v3statuspb.PerXdsConfig{ |
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.
Should we keep setting this field to remain backward compatible? Did other languages do this, too?
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.
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.
Seems like a bad idea to me, but I assume almost nobody is using this yet, so at least there's that.
xds/csds/csds.go
Outdated
Details: errState.Err.Error(), | ||
VersionInfo: errState.Version, | ||
} | ||
func dumpToGenericXdsConfig(typeURL string, name string, d xdsclient.UpdateWithMD) *v3statuspb.ClientConfig_GenericXdsConfig { |
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.
If this does even more, the callers can remove some duplicate logic. E.g.
func dumpToGenericXdsConfig(typeURL string, getUpdate func() (string, map[string]UpdateWithMD)) *v3statuspb.ClientConfig_GenericXdsConfig {
...
}
func (s *ClientStatusDiscoveryServer) buildLDSPerXDSConfig() []*v3statuspb.ClientConfig_GenericXdsConfig {
return dumpToGenericXdsConfig(listenerTypeURL, s.xdsClient.DumpLDS)
}
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.
Done. I deleted buildLDSPerXDSConfig()
all together
xds/csds/csds_test.go
Outdated
a, b := out[i], out[j] | ||
if a == nil { | ||
return true | ||
} | ||
if b == nil { | ||
return true | ||
} |
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.
Combine? if a == nil || b == 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.
b == nil
should return false
. Fixed
Related
grpc/grpc#27794
grpc/proposal#267
grpc-ecosystem/grpcdebug#12
RELEASE NOTES:
GenericXdsConfig
instead ofPerXdsConfig