Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
https://insomnia.rest
Apache License 2.0
34.9k stars 1.97k forks source link

gRPC import directory doesn't work as expected #4038

Open guyguy333 opened 3 years ago

guyguy333 commented 3 years ago

Is there an existing issue for this?

Insomnia Version

2021.5.3

What operating system are you using?

macOS

Operating System Version

macOS Big Sur 11.6

Installation method

homebrew

Last Known Working Insomnia version

2021.5.3

Expected Behavior

Let's consider this proto hierarchy:

protos/
  common/
    common.proto
  microservicea/
    common.proto (include common/common.proto)
    a.proto (include common.proto)
  microserviceb/
    common.proto (include common/common.proto)
    b.proto (include common.proto)

I would like to be able to import my protos without issues.

Actual Behavior

Currently, when you Add Directory, in my case protos, it adds all proto files recursively. This is not what I expect / would like as it leads to a behaviour I can't fix as a.proto will be loaded, trying to include common.proto, except protos/microservicea was not added to import directory. It fails.

In Go and TS, we generate protos for each micro service including:

Reproduction Steps

See description in Expected behaviour to reproduce the issue.

Additional Information

Maybe a "Add Import Directory" (adding include path without importing protos) could solve the issue

handsomejack-kiwi commented 2 years ago

👍 for this

desired functionality can be e.g. found in grpcurl's --import-path

bu4ak commented 2 years ago

Same issue as in https://github.com/Kong/insomnia/issues/5095 "Send" button unresponsive in grpc request

filfreire commented 1 year ago

@guyguy333 @bu4ak you should be able to use gRPC server reflection on latest Insomnia version, which might help with these kinds of issues - https://github.com/Kong/insomnia/releases/tag/core%402022.7.5

pnquest commented 1 year ago

@filfreire I am running into this same issue. There are unfortunately cases where server reflection is not an option, so this renders the grpc features of the app completely unusable. This is a feature included in similar tools such as postman and bloomRPC, as well as grpccurl as @handsomejack-kiwi mentioned above.