-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Upgrade google.golang.org/grpc to 1.35.0 #2771
Comments
We may also want to include github.com/golang/protobuf -> 1.4.3 which also failed in #2774 due to deprecation. It will require regenerating proto types, which probably requires upgrading https://github.com/jaegertracing/docker-protobuf |
Had a look at this. I was able to fix the initial
After that, the following test fails upon upgrading google.golang.org/grpc to 1.35.0:
I think the panic is due to lack of support for marshalling structs like Tried adding Anyone have any ideas on how to solve this? |
@pavolloffay and I had similar problems in the past when trying to upgrade to 1.30, and I reckon Pavol did have a solution, but I can't remember exactly what it was. A change here would also imply a change to the protobuf image that we use to generate the IDL code. See: #2443 From what I remember, @bogdandrutu uses our protobuf as the base for OpenTelemetry's and recently rebased theirs. We could probably use that as reference. |
We're able to use custom types because of gogo. Unless gogo stopped supporting grpc completely, it probably requires simultaneous upgrade, because it looks like grpc serialization goes into normal proto instead of gogo. |
I was able to update the jaeger proto build image to use the latest gogo proto gen (v1.3.2), but I'm still running into this issue after regenerating all the proto. I will continue to hack on this as I have time. |
So I can get tests to pass, but that's about the end of the good news. There appears to be some incompatibilities between gogo proto, and gogo/protobuf#686 So I can get tests to pass by forcing GRPC to use gogoproto for encoding/decoding like this: master...joe-elliott:upgrade-grpc These tests passing/failing is independent of which version of gogoproto I use to generate the *.pb.go files. I've tried the current Jaeger image, my updated one and the otel one. What I can't figure out is why this used to work or how it is supposed to work. I'm guessing it's related to these Additionally, It also appears that gogoproto is looking for new ownership: gogo/protobuf#691. The correct path forward may be to drop any gogoproto custom functionality and use the standard tooling. |
Wow, bad news about gogo. I tend to agree with your proposal that we need to move off of it. The two biggest benefits we got from gogo are:
|
Do you still have the benchmark comparing the two cases? |
no, I don't recall committing it |
Would be good to create a benchmark for it then, as the advantages might not be enough to offset the dependency. |
It seems that moving to
Issues
Here's a diff showing the proto generated using the latest tooling: I also had to make some small changes in the |
And it doesn't look like this will improve anytime soon: golang/protobuf#1225 |
So I've gone down the path of attempting to modify the codebase to handle the new proto and it is turning into an enormous undertaking. There are field name changes, value to pointer types, lack of Equal/Compare methods, loss of custom gogo types (timestamp, descriptor, duration), and probably a bunch of things I haven't found yet. I think the only paths forward are:
|
Another alternative I was thinking of - doesn't OTEL Collector also solve this problem somehow? Afaik their internal domain model avoids pointers too. |
They do use gogofaster: but they don't use the "non-nullable" types: Whether or not the code generated by gogoprotobuf works with grpc 1.35 seems dependent on the features that were used. |
What does "forcing the codec" do? If it solves the problem that it looks fine to me. |
Yes
We do use non-nullable for bunch of places see https://github.com/open-telemetry/opentelemetry-collector/blob/e6319ac4c6fce274b8ba2d0e3b8e5eb0fd0d6142/proto_patch.sed Alternative solution is to make a custom grpc marshaler if you have troubles, but you should not have problems because that interface did not change |
@bogdandrutu what are your thoughts about this ticket? Is OTEL planning to stay with gogo, despite gogo being unsupported? |
@yurishkuro one of the reason we actually don't expose gogo public and rather developed our own internal format We will stick with gogo for at least the next 6+ months as our internal representation (behind the |
Thanks. We also do not expose gogo (well, almost, it does leak into grpc-plugin API), but right now it seems we're unable to upgrade to newer gRPC versions (unless I misunderstood Joe's comment about the custom codec). |
I remember that you are very behind with the generated |
Latest GRPC/protobuf is seemingly incompatible with only some features of gogoproto. The one that we stumbled upon was custom marshalling/unmarshalling, but in this comment I link to a few others:
We run into these issues whether we use the Jaeger proto builder or the latest otel builder. The below branch uses the latest otel protobuf builder and the original issues called out in this thread persist. I have not been able to dig into the exact mechanics, but grpc latest does not correctly "find" some of the gogo proto code and therefore fails on unmarshal/marshal. However, I have been able to reduce the changes quite a bit. If we use this function encoding.RegisterCodec then tests pass and the impact to the codebase is minimal. Note that the encoding package is marked "experimental". On this branch all tests pass: master...joe-elliott:upgrade-grpc
|
I'm hitting the following error which could be related to this issue:
When trying to use the import (
"github.com/jaegertracing/jaeger/model"
api "github.com/jaegertracing/jaeger/proto-gen/api_v2"
...
)
type Reader struct {
client api.QueryServiceClient
}
func (r *Reader) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Trace, error) {
req := api.GetTraceRequest{TraceID: traceID}
stream, error := r.cient.GetTrace(ctx, &req) // triggers the type error
...
} |
The dependabot PR #2765 ran into compatibility issue, needs manual upgrade
The text was updated successfully, but these errors were encountered: