gNMI server reflections is basically facing the same issue as mentioned in https://github.com/fullstorydev/grpcurl/issues/22. When the gnmi_ext.proto file gets compiled with path proto/gnmi_ext/gnmi_ext.proto, gNMI server reflection breaks with the following error:
Failed to resolve symbol "gnmi.gNMI": file "proto/gnmi/gnmi.proto" included an unresolvable reference to ".gnmi_ext.Extension"
The Proposal
If gnmi_ext.proto gets compiled with github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto, gNMI server reflections work. So, I modified the gnmi_ext.proto portion in compile_protos.sh to (only the go binding):
I assumed that the github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto path is under ${GOPATH}/src. $proto_imports_go includes ${GOPATH}/src so the go binding should be generated under ${GOPATH}/src/github.com/openconfig/gnmi/proto/gnmi_ext/.
Manual Testing
In my case, I have gnmi_ext.proto under /vendor/github.com/openconfig/gnmi/proto/gnmi_ext/. When I did
The generated go binding's source is identified as github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto and the gNMI server reflections work.
A Request
This is a message to the reviewer of this pull request. Please modify the python binding portion of compile_protos.sh if necessary. Also, please compile_protos.sh to modify gnmi_ext.pb.go under ${GOPATH}/src/github.com/openconfig/gnmi/proto/gnmi_ext/. Thank you.
The Problem
gNMI server reflections is basically facing the same issue as mentioned in https://github.com/fullstorydev/grpcurl/issues/22. When the
gnmi_ext.proto
file gets compiled with pathproto/gnmi_ext/gnmi_ext.proto
, gNMI server reflection breaks with the following error:The Proposal
If
gnmi_ext.proto
gets compiled withgithub.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto
, gNMI server reflections work. So, I modified thegnmi_ext.proto
portion incompile_protos.sh
to (only the go binding):I assumed that the
github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto
path is under${GOPATH}/src
.$proto_imports_go
includes${GOPATH}/src
so the go binding should be generated under${GOPATH}/src/github.com/openconfig/gnmi/proto/gnmi_ext/
.Manual Testing
In my case, I have
gnmi_ext.proto
under/vendor/github.com/openconfig/gnmi/proto/gnmi_ext/
. When I didThe generated go binding's source is identified as
github.com/openconfig/gnmi/proto/gnmi_ext/gnmi_ext.proto
and the gNMI server reflections work.A Request
This is a message to the reviewer of this pull request. Please modify the python binding portion of
compile_protos.sh
if necessary. Also, pleasecompile_protos.sh
to modifygnmi_ext.pb.go
under${GOPATH}/src/github.com/openconfig/gnmi/proto/gnmi_ext/
. Thank you.