Regenerate gRPC classes after removing grpc-gateway / grpc -> OpenAPI spec metadata #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Currently, the Java classes we generate from
vector_service.proto
include several lines of code which cause builds to fail, and are currently commented out.Example of build errors after generation:

The gist is it seems like the
grpc-gateway
package is unable to be resolved during generation.Solution
We generate the Java gRPC classes using
protoc
and a plugin:protoc-gen-grpc-java
. You can see the general approach here: https://github.com/pinecone-io/pinecone-protos/blob/main/scripts/sdk-grpc-generation/java/gen.shI talked with @haruska as I was having trouble getting the
grpc-gateway
to resolve, even though it seems to be provided in/thirdparty/
. I tried pulling in the thirdparty protos manually and updating the paths, but it seems like the Java plugin we use may not support grpc-gateway, although I haven't been able to confirm this.After talking with @haruska, he mentioned he had pulled out all of the grpc -> openapi spec information from the proto file before generation in the Go client: https://github.com/pinecone-io/go-pinecone/blob/main/apis/proto/pinecone/data/v1/vector_service.proto.
I went with re-generating the Java classes using this same approach. The grpc-gateway bits should not be needed for the client code as we don't care about the REST -> gRPC conversion.
Jason mentioned we may want to look at generating this version of the spec pre-codegen for Java and Go.
Type of Change
Test Plan
Build + Integration Tests via CI