grpc-go
grpc-go copied to clipboard
move from github.com/golang/protobuf to google.golang.org/protobuf/proto
This is the second part of #6736 which is moving away from github.com/golang/protobuf in favor of google.golang.org/protobuf/proto
RELEASE NOTES:
- Use google.golang.org/protobuf/proto instead of github.com/golang/protobuf.
@dfawley please check this PR. It might need another code review just to be sure that after merging with the new updates, it is still ok.
Codecov Report
Merging #6919 (ea987eb) into master (5051eea) will decrease coverage by
0.14%. Report is 1 commits behind head on master. The diff coverage is62.50%.
:exclamation: Current head ea987eb differs from pull request most recent head b837411. Consider uploading reports for the commit b837411 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #6919 +/- ##
==========================================
- Coverage 83.81% 83.68% -0.14%
==========================================
Files 287 287
Lines 30930 30932 +2
==========================================
- Hits 25925 25884 -41
- Misses 3952 3981 +29
- Partials 1053 1067 +14
| Files | Coverage Δ | |
|---|---|---|
| balancer/grpclb/grpclb.go | 81.84% <ø> (+1.36%) |
:arrow_up: |
| balancer/grpclb/grpclb_remote_balancer.go | 82.46% <ø> (-1.24%) |
:arrow_down: |
| balancer/rls/config.go | 83.22% <100.00%> (ø) |
|
| credentials/credentials.go | 87.87% <ø> (ø) |
|
| encoding/proto/proto.go | 62.50% <ø> (ø) |
|
| internal/binarylog/method_logger.go | 87.31% <100.00%> (ø) |
|
| internal/binarylog/sink.go | 11.42% <ø> (ø) |
|
| internal/status/status.go | 90.52% <100.00%> (ø) |
|
| internal/transport/handler_server.go | 85.91% <ø> (+0.34%) |
:arrow_up: |
| internal/transport/http2_server.go | 89.31% <ø> (-0.29%) |
:arrow_down: |
| ... and 16 more |
@dfawley this should be done
Oh sorry, it looks like there is a new merge conflict; can you resolve it please @Clement-Jean ?
@dfawley I believe this is solved
Sorry, I broke you again. :) I think I fixed it here, though.
A few comments @Clement-Jean -- PTAL.
While you are taking a look, could you also look at the merge conflict?
@arvindbr8 I'm not entirely sure about the "unresolved" comment. What did you mean?
@dfawley There seem to be still some work to do to remove the old package. Could you take a look at the remaining usages (channelz, credentials, internal/pretty, and xds/internal/xdsclient/bootstrap) and tell me if any of these can be translated with the protoadapt package? If yes, I'll work on that.
@arvindbr8 I'm not entirely sure about the "unresolved" comment. What did you mean?
I think he meant status.WithDetails's method signature which I thought when I looked yesterday did not use protoadapt.MessageV1, but maybe I was misreading. Anyway it looks right to me now. :shrug:
There seem to be still some work to do to remove the old package. Could you take a look at the remaining usages (channelz, credentials, internal/pretty, and xds/internal/xdsclient/bootstrap) and tell me if any of these can be translated with the protoadapt package? If yes, I'll work on that.
Oh true, there is still more to do.
I have a huge PR reworking channelz, so please still wait on that. But the other ones should be fine if you are willing to work on them. Thank you!
The remaining mention to github.com/golang/protobuf seems to be indirect dependency, some mentions in scripts and channelz.
Could you take a look at the changes? especially in reflection/grpc_testing_not_regenerate, I'm not sure if it is correct. I splitted the testv3.go into two files (pb and grpc) but if you need to merge them let me know.
Would you mind reverting all those changes since the last review so we can submit the already-reviewed code without delay? You can move them into another branch and we can go from there.
Thanks!
@dfawley This should be reverted
Hi, I don't know whether there is a third phase planned to this task, but in my application there is one remaining place where i see the deprecated dependency being brought in. Credentials.go in google.golang.org/grpc/credentials (https://github.com/grpc/grpc-go/blob/5ccf176a08abbb41c17c5de5930aa5bb18f2563b/credentials/credentials.go#L31) still has an import on github.com/golang/protobuf/proto . Can this be removed also? I can attempt a PR if it helps.
@RJKeevil We cannot remove that just yet because of possible conflicts due to a rewrite. However it's planned and I will work on it ASAP 😊
Just noticed issue #6969 is closed. Does this mean, we can do the last bit of work? @dfawley
Yes, I think we're all clear now to finish it.
Unfortunately, it looks like we'll still keep the dependency in perpetuity because of testing in https://github.com/grpc/grpc-go/blob/cce163274b6cb9de2b2bf0bc742384e5755fee42/reflection/grpc_testing_not_regenerate/testv3.go#L41C9-L41C41