yarpc / yarpc-go

A message passing platform for Go
MIT License
401 stars 101 forks source link

Gh proto/compatible n7 #2153

Closed gandhikrishna closed 1 year ago

gandhikrishna commented 1 year ago

This PR aims to add a template for yarpc's generated golang protobuf code.

codecov[bot] commented 1 year ago

Codecov Report

Merging #2153 (defca64) into gopal/GoGoDeprecation (3d06c09) will decrease coverage by 0.37%. The diff coverage is 0.00%.

@@                    Coverage Diff                    @@
##           gopal/GoGoDeprecation    #2153      +/-   ##
=========================================================
- Coverage                  84.14%   83.76%   -0.38%     
=========================================================
  Files                        261      263       +2     
  Lines                      14817    14883      +66     
=========================================================
- Hits                       12468    12467       -1     
- Misses                      1954     2021      +67     
  Partials                     395      395              
Impacted Files Coverage Δ
...rotobuf/protoc-gen-yarpc-go-v2/internal/lib/lib.go 0.00% <0.00%> (ø)
encoding/protobuf/protoc-gen-yarpc-go-v2/main.go 0.00% <0.00%> (ø)
peer/hashring32/internal/hashring32/hashring32.go 96.21% <0.00%> (-1.09%) :arrow_down:
transport/tchannel/peer.go 94.73% <0.00%> (+1.31%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

gandhikrishna commented 1 year ago

There are integration and unit tests which use current plugin generated code, I think we should include those unit and integration tests for the v2 plugin as well.

For example, below proto files are generated with v1:

https://github.com/yarpc/yarpc-go/blob/d51f0af248921d02cfd5920f0f44346e223647b8/etc/bin/generate.sh#L113-L117

This seems to be one of the integration tests with the v1 plugin:

https://github.com/yarpc/yarpc-go/blob/d51f0af248921d02cfd5920f0f44346e223647b8/encoding/protobuf/testing/testing_test.go#L46-L51

Added generated code with protoc grpc-go and yarpc-go-v2.