openconfig / gnoi

gRPC Network Operations Interface (gNOI) defines a set of gRPC-based microservices for executing operational commands on network devices.
Apache License 2.0
156 stars 67 forks source link

protoc-gen-go-grpc gRPC code generation plugin downgraded #173

Open aaronbee opened 4 months ago

aaronbee commented 4 months ago

In commit https://github.com/openconfig/gnoi/commit/64e82de6cfe3c26ea588cf98a2e44e0793dc318a the generated gRPC code looks to have started using a downgraded protoc plugin. It used to be the case that the protoc-gen-go plugin handled Go code generation for protobuf messages and gRPC services. The gRPC service code generation was later moved into protoc-gen-go-grpc. It seems that in that commit support went backwards.

This can be seen by the fact that *_grpc.pb.go files have been deleted, merging the gRPC service definitions into the other .pb.go and the line that exists in the deleted file:

const _ = grpc.SupportPackageIsVersion7

is now:

const _ = grpc.SupportPackageIsVersion6

Note the version has gone down.

This is a backwards incompatible change because certain symbols are deleted, such as UnimplementedCertificateManagementServer. In the current version of gRPC it is required that code references this when implementing a CertificateManagement service server, by removing it code that supported the current version of gRPC no longer compiles.

robshakir commented 4 months ago

Aaron -- thanks for flagging this. This looks like an error. Let me chase it up.

aaronbee commented 2 months ago

Fixed by #190

aaronbee commented 2 months ago

@marcushines #190 looks to have missed regeneration of packet_link_qualification and packet_capture. They are both missing _grpc.pb.go files.