-
Notifications
You must be signed in to change notification settings - Fork 10k
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
panic: runtime error: comparing uncomparable type map[string]interface {} #19700
Comments
Thanks @cruvie for raising the issue. |
@siyuanfoundation Hi, I made a pr which includes two unit tests and |
@cruvie The issue is on the grpc side, they should probably use Meanwhile, we should add @serathius @ahrtr Do you think it is necessary to revert back to google.golang.org/grpc v1.70.0? |
The See also #15145 from 2023. If you are using gRPC APIs that are clearly marked as experimental, you need to vendor gRPC, or you need to consider yourself experimental. If some functionality you need is experimental and there is no way to get it through stable APIs, then I'm always happy to discuss how we can make that happen. gRPC has pending changes we'd like to make to these packages that are mostly just blocked on etcd's lingering usages of these APIs. |
they are working on it grpc/grpc-go#8225 for etcd client next version, I think make a break change to remove
and add Attributes *attributes.Attributes likehttps://github.com/grpc/grpc-go/blob/ce35fd41c56908f4e703e3fd63cf85b2cba9d8f1/resolver/resolver.go#L107 is ok, since Metadata has not been fully tested for a long time?
|
I'm not sure what the right replacement is, until I understand what it is you need to do. It could be that you don't need a custom resolver at all anymore. With the advent of https://pkg.go.dev/google.golang.org/grpc#ClientConnInterface - added in Jan 2020 - I think most of the reasons for having a custom resolver can be replaced by using multiple gRPC channels and wrapping them, similar to how GCP does it: If that wouldn't work: why? |
In my use case, I overlooked the relation between So for my use case add |
etcd itself isn't affected by this problem. But I am not sure whether grpcproxy is affected, because the metadata is set as a struct (which I believe will be a map as well after marshaling & Unmarshaling). Given our grpcproxy related e2e / integration tests all pass, so I assume it isn't affected either. etcd/server/proxy/grpcproxy/register.go Line 75 in 3b66c82
etcd/server/proxy/grpcproxy/register.go Lines 94 to 98 in 3b66c82
So in general, I don't want to patch this local issue. Instead, we should spend more effort on #15145 to resolve such problems once for all. We need to have a summary on existing design/implementation first, and proposals to replace them later, and invite grpc's experts to review. Just updated the #15145 as well. cc. @fuweid @serathius |
Bug report criteria
What happened?
use grpc client made by etcd resolver with
google.golang.org/grpc v1.71.0
cause panicWhat did you expect to happen?
call rpc method successfully
How can we reproduce it (as minimally and precisely as possible)?
get a grpc client like this
and use the client call a method
Anything else we need to know?
go 1.24
google.golang.org/grpc v1.70.0 works fine
create a grpc client manually works fine
Etcd version (please run commands below)
deployed by docker
Etcd configuration (command line flags or environment variables)
default
Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)
standalone
Relevant log output
The text was updated successfully, but these errors were encountered: