Skip to content
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 gateway 2.7.0 #43

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Grpc gateway 2.7.0 #43

wants to merge 4 commits into from

Conversation

ahrtr
Copy link
Owner

@ahrtr ahrtr commented Sep 27, 2022

Changes:
1. Replace github.com/grpc-ecosystem/grpc-gateway with github.com/grpc-ecosystem/grpc-gateway/v2
   in all golang source files and in scripts/genproto.sh.
2. The only exception is to manually replace github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
   with github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2.

Signed-off-by: Benjamin Wang <[email protected]>
Firstly run the following commands under `api` and `tools/mod` directories respectively:
1. go get github.com/grpc-ecosystem/grpc-gateway/[email protected]
2. go mod tidy

Secondly run command below,
  ./scripts/fix.sh

Signed-off-by: Benjamin Wang <[email protected]>
@ahrtr ahrtr force-pushed the grpc_gateway_2.7.0 branch 3 times, most recently from 442f06f to a8a8ae5 Compare September 27, 2022 02:45
The third_party/googleapis has been removed from github.com/grpc-ecosystem/grpc-gateway/v2,
and the solution for now is to get them included in etcd repo directly. Please refer to
grpc-ecosystem/grpc-gateway#1065 (comment)

In the future, we may consider to manage the protobuf dependencies using
https://github.com/bufbuild/buf. Please see
grpc-ecosystem/grpc-gateway#1065 (comment).

Signed-off-by: Benjamin Wang <[email protected]>
@ahrtr ahrtr force-pushed the grpc_gateway_2.7.0 branch 2 times, most recently from 9ce5bb7 to 9a1c1ba Compare September 27, 2022 08:08
…o on command line

The value of `go_package` in google/protobuf/descriptor.proto is "descriptor",
which isn't supported by protoc-gen-grpc-gateway v2. The error message is:
```
stderr: protoc-gen-grpc-gateway: invalid Go import path "descriptor" for "google/protobuf/descriptor.proto"
stderr:
stderr: The import path must contain at least one period ('.') or forward slash ('/') character.
```

The solution is to specify the go import path on command line in format: M${PROTO_FILE}=${GO_IMPORT_PATH}.

Signed-off-by: Benjamin Wang <[email protected]>
@ahrtr ahrtr force-pushed the grpc_gateway_2.7.0 branch from 9a1c1ba to 57b0060 Compare September 27, 2022 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant