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

grpc_cli reflection does not work with proto import public #13295

Open
sigmonsays opened this Issue Nov 7, 2017 · 4 comments

Comments

Projects
None yet
8 participants
@sigmonsays

sigmonsays commented Nov 7, 2017

What version of gRPC and what language are you using?

v1.7.x, specifically v1.7.1-4-g5cf4b44

What operating system (Linux, Windows, …) and version?

linux

What runtime / compiler are you using (e.g. python version or version of gcc)

latest go-grpc server
grpc_cli on client

What did you do?

make a grpc_cli call to a TestApi with imports

$ grpc_cli call localhost:5500 api.TestApi.Ping "Message: 'hi'"   
[libprotobuf ERROR google/protobuf/descriptor.cc:3457] Invalid proto descriptor for file "api/service.proto":
[libprotobuf ERROR google/protobuf/descriptor.cc:3460]   api/service.proto: Import "api/primitives/primitives.proto" was not found or had errors.
[libprotobuf ERROR google/protobuf/descriptor.cc:3460]   api/service.proto: Import "api/session/session.proto" was not found or had errors.
[libprotobuf ERROR google/protobuf/descriptor.cc:3460]   api.GetConfigResponse.User: "primitives.User" seems to be defined in "api/primitives/primitives.proto", which is not imported by "api/service.proto".  To use it here, please add the necessary import.
Method name not found

However if I make the call with the appropriate --protofiles and --proto_path flags, everything works. It
appears reflection does not work with "import public" statements.

$ grpc_cli call --proto_path=$PROTO_PATH --protofiles=api/service.proto  localhost:5500 api.TestApi.Ping "Message: 'hi'"   
connecting to localhost:5500
Message: "hi"

Rpc succeeded with OK status

What did you expect to see?

grpc_cli should be capable of using reflection with import

What did you see instead?

proto file include errors

@ejona86

This comment has been minimized.

Show comment
Hide comment
@ejona86
Member

ejona86 commented Nov 7, 2017

CC @yang-g

@dklempner

This comment has been minimized.

Show comment
Hide comment
@dklempner

dklempner Nov 7, 2017

Contributor

Assuming the issue is in fact as stated (that import public doesn't work) the issue here is probably in the go implementation of the reflection service.

Contributor

dklempner commented Nov 7, 2017

Assuming the issue is in fact as stated (that import public doesn't work) the issue here is probably in the go implementation of the reflection service.

@sigmonsays

This comment has been minimized.

Show comment
Hide comment
@sigmonsays

sigmonsays Nov 16, 2017

Any additional information to gather to determine what is not working on the go implementation?

sigmonsays commented Nov 16, 2017

Any additional information to gather to determine what is not working on the go implementation?

@yang-g

This comment has been minimized.

Show comment
Hide comment
@yang-g

yang-g Jun 8, 2018

Contributor

Likely we need an interop test for reflection service between go and grpc_cli.

Contributor

yang-g commented Jun 8, 2018

Likely we need an interop test for reflection service between go and grpc_cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment