-
Notifications
You must be signed in to change notification settings - Fork 826
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
Migrade from github.com/golang/protobuf to google.golang.org/protobuf #2644
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: govargo The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -64,6 +64,7 @@ Table of Contents | |||
* [make gen-embedded-openapi](#make-gen-embedded-openapi) | |||
* [make gen-crd-client](#make-gen-crd-client) | |||
* [make gen-sdk-grpc](#make-gen-sdk-grpc) | |||
* [make gen-allocation-grpc](#make-gen-allocation-grpc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make gen-allocation-grpc
is defined in Makefile, but this was not described in build/README.md
@@ -16,35 +16,48 @@ | |||
|
|||
set -ex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aligned to build/build-sdk-images/go/gen.sh
protoc -I ${googleapis} -I ${gatewaygrpc} -I ${sdk} --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` --grpc_out=${protoc_intermediate} sdk.proto | ||
protoc -I ${googleapis} -I ${gatewaygrpc} -I ${sdk} --cpp_out=dllexport_decl=AGONES_EXPORT:${protoc_intermediate} sdk.proto ${googleapis}/google/api/annotations.proto ${googleapis}/google/api/http.proto ${gatewaygrpc}/protoc-gen-openapiv2/options/annotations.proto ${gatewaygrpc}/protoc-gen-openapiv2/options/openapiv2.proto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unified order of -I
Build Failed 😱 Build Id: 555bb65d-3145-4857-838d-d96acb91a075 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
# Remove protoc-gen-openapiv2 definitions because C# package doesn't support grpc-gateway | ||
sed -i -e 's/import "protoc-gen-openapiv2\/options\/annotations.proto";//' ${protoc_intermediate}/sdk/sdk.proto | ||
sed -i -e 's/option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {//' ${protoc_intermediate}/sdk/sdk.proto | ||
sed -i -e 's/info: {//' ${protoc_intermediate}/sdk/sdk.proto | ||
sed -i -e 's/title: "sdk.proto";//' ${protoc_intermediate}/sdk/sdk.proto | ||
sed -i -z 's/version: "version not set";\n };//' ${protoc_intermediate}/sdk/sdk.proto | ||
sed -i -e 's/schemes: HTTP;//' ${protoc_intermediate}/sdk/sdk.proto | ||
sed -i -e 's/consumes: "application\/json";//' ${protoc_intermediate}/sdk/sdk.proto | ||
sed -i -z 's/produces: "application\/json";\n};//' ${protoc_intermediate}/sdk/sdk.proto | ||
sed -i -e 's/bool disabled = 1.*/bool disabled = 1;/' ${protoc_intermediate}/sdk/sdk.proto | ||
|
||
sed -i -e 's/import "protoc-gen-openapiv2\/options\/annotations.proto";//' ${protoc_intermediate}/sdk/alpha/alpha.proto | ||
sed -i -e 's/option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {//' ${protoc_intermediate}/sdk/alpha/alpha.proto | ||
sed -i -e 's/info: {//' ${protoc_intermediate}/sdk/alpha/alpha.proto | ||
sed -i -e 's/title: "alpha.proto";//' ${protoc_intermediate}/sdk/alpha/alpha.proto | ||
sed -i -z 's/version: "version not set";\n };//' ${protoc_intermediate}/sdk/alpha/alpha.proto | ||
sed -i -e 's/schemes: HTTP;//' ${protoc_intermediate}/sdk/alpha/alpha.proto | ||
sed -i -e 's/consumes: "application\/json";//' ${protoc_intermediate}/sdk/alpha/alpha.proto | ||
sed -i -z 's/produces: "application\/json";\n};//' ${protoc_intermediate}/sdk/alpha/alpha.proto | ||
sed -i -e 's/bool bool = 1.*/bool bool = 1;/' ${protoc_intermediate}/sdk/alpha/alpha.proto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is workaround. Remove protoc-gen-openapiv2 definitions from C# sdk image because C# package doesn't support grpc-gateway
# swagger gen has a bug wherein it doesn't generate the file, so we're providing it by hand | ||
cp ./model_xstreamdefinitionssdkgameserver.go.nolint ./swagger/model_xstreamdefinitionssdkgameserver.go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed model_xstreamdefinitionssdkgameserver.go.nolint
file because latest protoc-gen-swagger
and protoc-gen-openapiv2
doesn't support x-stream-definitions
.
Ref: grpc-ecosystem/grpc-gateway#1112
cd third_party/protobuf/cmake && \ | ||
mkdir -p build && cd build && \ | ||
cmake -Dprotobuf_BUILD_TESTS=OFF \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
.. && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to use cmake instead of make because the latest protobuf doesn't suppor make installing.
#7 651.7
#7 651.7 Installing via 'make' is no longer supported. Use cmake or bazel instead.
#7 651.7
#7 651.7 Please consult BUILDING.md to get more information.
#7 651.7
#7 651.7 make: *** [Makefile:694: stop] Error 1
@@ -21,7 +21,7 @@ FROM debian:buster | |||
|
|||
RUN apt-get update && apt-get install -y \ | |||
build-essential autoconf libtool git pkg-config curl \ | |||
automake libtool curl make g++ unzip moreutils \ | |||
automake libz-dev curl make cmake g++ unzip moreutils \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add zlib package because the following error happened.
#7 477.7 src/core/lib/compression/message_compress.cc:25:10: fatal error: zlib.h: No such file or directory
#7 477.7 #include <zlib.h>
#7 477.7 ^~~~~~~~
#7 477.7 compilation terminated.
#7 477.7 make: *** [Makefile:810: /var/local/git/grpc/objs/opt/src/core/lib/compression/message_compress.o] Error 1
"tags": [ | ||
{ | ||
"name": "AllocationService" | ||
} | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tags is generated by protoc-gen-openapiv2
. This is always printed and cannot be disabled.
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { | ||
info: { | ||
title: "proto/allocation/allocation.proto"; | ||
version: "version not set"; | ||
}; | ||
schemes: HTTPS; | ||
consumes: "application/json"; | ||
produces: "application/json"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger
definition is used in swagger.json definition
@@ -124,7 +135,7 @@ message Count { | |||
|
|||
// Store a boolean result | |||
message Bool { | |||
bool bool = 1; | |||
bool bool = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {format: "boolean"}]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {format: "boolean"}]
is not defined, the output of swagger.json is missing format: "boolean"
.
@@ -4,7 +4,7 @@ fn main() { | |||
.build_server(false) | |||
.compile( | |||
&["proto/sdk/alpha/alpha.proto", "proto/sdk/sdk.proto"], | |||
&["proto/googleapis", "proto/sdk/alpha", "proto/sdk"], | |||
&["proto/googleapis", "proto/grpc-gateway", "proto/sdk/alpha", "proto/sdk"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add build path, but rust sdk use tonic
instread of protoc
. So there are not many changes due to this PR
#2112
@@ -229,7 +234,16 @@ | |||
"200": { | |||
"description": "A successful response.(streaming responses)", | |||
"schema": { | |||
"$ref": "#/x-stream-definitions/sdkGameServer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#/x-stream-definitions is not supported by latest protoc-gen-swagger
and protoc-gen-openapiv2
. It moved to inline definitions.
https://github.com/grpc-ecosystem/grpc-gateway/pull/1112/files
"googlerpcStatus": { | ||
"type": "object", | ||
"properties": { | ||
"result": { | ||
"$ref": "#/definitions/sdkGameServer" | ||
"code": { | ||
"type": "integer", | ||
"format": "int32" | ||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
"error": { | ||
"$ref": "#/definitions/runtimeStreamError" | ||
"details": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/protobufAny" | ||
} | ||
} | ||
} | ||
}, | ||
"protobufAny": { | ||
"type": "object", | ||
"properties": { | ||
"@type": { | ||
"type": "string" | ||
} | ||
}, | ||
"title": "Stream result of sdkGameServer" | ||
"additionalProperties": {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is workaround. Add jq logic to sdks/swagger/sdk.swagger.json because protoc-gen-openapiv2 doesn't work well in Stream and doesn't generate nessesary definitions.
It seems that the bug occurs if both stream definition and --openapiv2_opt=disable_default_errors=true
exist.
If --openapiv2_opt=disable_default_errors=false
(default behaviour), googlerpcStatus
and protobufAny
are outputed.
# hard coding because protoc-gen-openapiv2 doesn't work well in Stream and doesn't generate 'googlerpcStatus' and 'protobufAny' definitions | ||
cat sdks/swagger/sdk.swagger.json | jq '.definitions |= .+{"googlerpcStatus": {"type": "object", "properties": { "code": { "type": "integer", "format": "int32"}, "message": { "type":"string"}, "details": { "type": "array", "items": { "$ref": "#/definitions/protobufAny"}}}}}' | sponge sdks/swagger/sdk.swagger.json | ||
cat sdks/swagger/sdk.swagger.json | jq '.definitions |= .+{"protobufAny": { "type": "object", "properties": { "@type": { "type": "string" }}, "additionalProperties": {}},}' | sponge sdks/swagger/sdk.swagger.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is workaround. Add jq logic to sdks/swagger/sdk.swagger.json because protoc-gen-openapiv2 doesn't work well in Stream and doesn't generate nessesary definitions.
It seems that the bug occurs if both stream definition and --openapiv2_opt=disable_default_errors=true
exist.
If --openapiv2_opt=disable_default_errors=false
(default behaviour), googlerpcStatus
and protobufAny
are outputed.
@@ -154,7 +154,7 @@ func main() { | |||
|
|||
if count, _, err := alphaCli.SDKApi.GetPlayerCount(ctx); err != nil { | |||
log.Fatalf("Error retrieving player count: %s", err) | |||
} else if count.Count != "" { // "" is 0, which is empty. This is what the generated client gives us. | |||
} else if count.Count != "0" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed retCode
@@ -15,6 +15,7 @@ | |||
package main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- setLabel API
When I tested this code of the old version, the test was not passed.
In this test, the setLabel API was called, however, the test mode of LocalSDKServer always reject unless specified label is.
{"message":"expected to receive '1655898932' as value for 'setlabel' request but received 'true'","sdkName":"restapi","severity":"error","source":"*sdkserver.LocalSDKServer","time":"2022-06-22T20:55:54.507127+09:00"}
https://github.com/googleforgames/agones/blob/main/pkg/sdkserver/localsdk.go#L197-L213
I changed to use reserved API instead of setLabel API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- go routine
This test used go routine, however, test result often changed because there is no block with paralell processing(the execution order is not guranteed).
The following test flow expected is watchGameserver → setLabel → receiveMessage, however, actual flow was wachGameserver → receiveMessage
+ cd /go/src/agones.dev/agones/test/sdk/websocket-watch
+ go run ws-watch-test.go
2022/06/22 12:28:09 Connecting to ws://localhost:9101/watch/gameserver
{"message":"Connected to watch GameServer...","sdkName":"restapi","severity":"info","source":"*sdkserver.LocalSDKServer","time":"2022-06-22T12:28:09.1496994Z"}
2022/06/22 12:28:09 Received message from websocket: {"result":{"object_meta":{"name":"local","namespace":"default","uid":"3133294039362009907","resource_version":"v1","generation":"1","creation_timestamp":"1655900878","annotations":{"agones.dev/sdk-UID":"3133294039362009907","annotation":"true"},"labels":{"agones.dev/sdk-creationTimestamp":"1655900878","islocal":"true"}},"spec":{"health":{"period_seconds":3,"failure_threshold":5,"initial_delay_seconds":10}},"status":{"state":"Shutdown","address":"127.0.0.1","ports":[{"name":"default","port":7777}],"players":{"capacity":"10"}}}}
2022/06/22 12:28:09 Could not find label 'agones.dev/sdk-testws' in message
time="2022-06-22T12:28:09Z" level=warning msg="error reading websocket message: websocket: close 1006 (abnormal closure): unexpected EOF"
exit status 1
make[2]: *** [run-sdk-command] Error 1
I rewrite this test due to the reason 1&2.
@@ -228,7 +229,7 @@ func runGrpc(grpcServer *grpc.Server, grpcEndpoint string) { | |||
|
|||
// runGateway runs the grpc-gateway | |||
func runGateway(ctx context.Context, grpcEndpoint string, mux *gwruntime.ServeMux, httpServer *http.Server) { | |||
conn, err := grpc.DialContext(ctx, grpcEndpoint, grpc.WithBlock(), grpc.WithInsecure()) | |||
conn, err := grpc.DialContext(ctx, grpcEndpoint, grpc.WithBlock(), grpc.WithTransportCredentials(insecure.NewCredentials())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is added because make lint
failed with the following error.
cmd/sdk-server/main.go:231:69: SA1019: grpc.WithInsecure is deprecated: use WithTransportCredentials and insecure.NewCredentials() instead. Will be supported throughout 1.x. (staticcheck)
conn, err := grpc.DialContext(ctx, grpcEndpoint, grpc.WithBlock(), grpc.WithInsecure())
@@ -57,7 +58,7 @@ func NewSDK() (*SDK, error) { | |||
// Block for at least 30 seconds. | |||
ctx, cancel := context.WithTimeout(s.ctx, 30*time.Second) | |||
defer cancel() | |||
conn, err := grpc.DialContext(ctx, addr, grpc.WithBlock(), grpc.WithInsecure()) | |||
conn, err := grpc.DialContext(ctx, addr, grpc.WithBlock(), grpc.WithTransportCredentials(insecure.NewCredentials())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is added because make lint
failed with the following error.
sdks/go/sdk.go:60:61: SA1019: grpc.WithInsecure is deprecated: use WithTransportCredentials and insecure.NewCredentials() instead. Will be supported throughout 1.x. (staticcheck)
conn, err := grpc.DialContext(ctx, addr, grpc.WithBlock(), grpc.WithInsecure())
echo "--- installing absl for grpc build stability ---" && \ | ||
cd /var/local/git/grpc/third_party/abseil-cpp && \ | ||
mkdir -p build && cd build && \ | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE .. && \ | ||
make -j4 && make install && make clean && ldconfig && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Install absl because the log recommended when build
Targets not yet defined:
gRPC::absl_algorithm;gRPC::absl_atomic_hook;gRPC::absl_bad_optional_access;gRPC::absl_base;gRPC::absl_base_internal;gRPC::absl_bits;gRPC::absl_compressed_tuple;gRPC::absl_config;gRPC::absl_core_headers;gRPC::absl_dynamic_annotations;gRPC::absl_endian;gRPC::absl_inlined_vector;gRPC::absl_inlined_vector_internal;gRPC::absl_int128;gRPC::absl_log_severity;gRPC::absl_memory;gRPC::absl_optional;gRPC::absl_raw_logging_internal;gRPC::absl_span;gRPC::absl_spinlock_wait;gRPC::absl_strings;gRPC::absl_strings_internal;gRPC::absl_throw_delegate;gRPC::absl_type_traits;gRPC::absl_utility;gRPC::absl_meta;gRPC::grpc_cronet
Call Stack (most recent call first):
.build/gRPC/lib/cmake/grpc/gRPCConfig.cmake:20 (include)
CMakeLists.txt:77 (find_package)
All CI passed |
Wheee! Lots of work! A couple of questions before I dig into in detail.
|
Yes. I regenerated by
I observed these breaking changes in protoc-gen-openapiv2 and latest protoc-gen-swagger. 1. Change OperationId to
ref: grpc-ecosystem/grpc-gateway#1193 This behaviour can change by 2. Add the package name to the tags
ref: grpc-ecosystem/grpc-gateway#860 This behaviour cannot change. Any option is not provided, however, this doesn't affect API behaviour, because Tags is used for the uniqueness, I think. 3. Add default error response field
ref: https://github.com/grpc-ecosystem/grpc-gateway/1141 This behaviour can change by 4. Remove boolean format
ref1: grpc-ecosystem/grpc-gateway#1598 This change is by OpenAPI specification(See ref2). 5. x-stream-definitions change to the inline definitions example
ref: grpc-ecosystem/grpc-gateway#1112 This behaviour cannot change. Any option is not provided. So we have to accept this change to upgrade to protoc-gen-openapiv2. 6. camelCase JSON names by default
ref1: grpc-ecosystem/grpc-gateway#540 This behaviour can change by @markmandel |
I tested Are these using grpc files? If so, I think I should fix these. |
So as a general statement: We're post 1.0, so our API should be stable, and not break. If have to, we should have a deprecation period with plenty of time for migration. So everything should ideally work between Agones releases -- this is definitely going to break this in its current form (this is what always scared me about upgrading grpc-gateway). Personally I'm less concerned with the swagger output being different between versions somehow (as you pointed out, it was broken for streaming anyway), since that can't break active code, but very concerned that the underlying REST API is now different between versions. Or to put it another way - if someone hand wrote a REST API to use against any of our APIS that go through grpc-gateway (SDK, Allocation, etc) it should still work with no modification between this release and the upcoming one. Is that possible with this upgrade? |
Thank you for your comment.
I see. I agree with that API should be stable.
I'm less concerned with that REST API behaviour changes if this PR merged.
This change was created by golang json decode specification(by the following line), not grpc-gateway. I also changed I recognize that I should include https://grpc-ecosystem.github.io/grpc-gateway/docs/development/grpc-gateway_v2_migration_guide/#we-now-use-the-camelcase-json-names-by-default in order to reduce difference with current codebase.
|
From memory, the REST client generated from the swagger spec on each test: Because if it didn't, the conversion to This is kind what scares me 😬 (although it does make sense for the test - it checks both the swagger spec and the REST api is valid). I wonder if we could do a simple smoke test manually - generate the client for the version on Even as a one time thing, I think it would go a long way to making me feel safer. Thoughts? |
A smoke test looks good idea. How about this idea?
It may take some time, but I'm willing to work on this to ensure safety. |
The good news is - we have e2e tests for the allocation REST endpoints (although now I'm curious how they didn't fail 🤔 ) agones/test/e2e/allocator_test.go Line 249 in 9ba7a35
agones/test/e2e/allocator_test.go Line 313 in 9ba7a35
So we know that those are (somehow?) the same between grpc-gateway versions.
|
Thank you! It's good news.
The difference between current code and this PR is the only following.
I'll separate and send the PR which run E2E test for the client using REST API.
Thank you always too for your review and comments😄 |
Just wanted to gently bump this, see where things had landed 😄 |
I just realised something for doing testing to make sure the SDK Rest API is the same 😄 that I think will actually be relatively straightforward d to test with. We have A way to test that everything is compliant is to build the Sound like a good idea? |
Currently, I'm working to the E2E test now(In private, I moved to new house this week, so there was no time to implement)
I think of making restapi-simple by referring to nodejs-simple.
Using Go's http library, I'll check the returned value and validation for restapi result. |
Sorry, still working |
No worries - it's a big chunk of work, just wanted to touch base and see where things where at. |
Just gently checking in 😄 |
Looking at all the conflicts, should we close this PR for now? Also since you have some new ones incoming? |
It's OK to close this PR once. |
What type of PR is this?
/kind breaking
/kind cleanup
/kind feature
What this PR does / Why we need it:
I found that the
github.com/golang/protobuf
will be deprecated in the future when I executedmake gen-all-sdk-grpc
.This PR has many changes for migration to
google.golang.org/protobuf
.Added
proto/grpc-gateway
allocation_grpc.pb.go
,alpha_grpc.pb.go
,beta_grpc.pb.go
,sdk_grpc.pb.go
,protoc-gen-openapiv2/options/annotations.pb.h
,protoc-gen-openapiv2/options/openapiv2.pb.h
,protoc-gen-openapiv2/annotations.pb.cc
,protoc-gen-openapiv2/openapiv2.pb.cc
)absl
installation for grpc build stability to sdk-base-imagegrpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger
to proto files in order to define swagger.json definitionsprotoc-gen-openapiv2
protoc-gen-openapiv2/options
file's installation tosdks/cpp/CMakeLists.txt
sdks/cpp/sources.cmake
proto/grpc-gateway
tosdks/rust/build.rs
make gen-allocation-grpc
Changed
github.com/golang/protobuf
togoogle.golang.org/protobuf
(v1.28)github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
v1 togithub.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway
(v2.10.3)protoc
command options (e.g.--go_out=plugins=grpc
is not supported. use--go-grpc_opt
)github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
instead ofprotoc-gen-swagger
google.golang.org/grpc/cmd/protoc-gen-go-grpc
v1.2google.golang.org/grpc
v1.44.0 to v1.46.2grpc_release_tag
v1.27.1 to v1.46.3 for sdk-base-imagegrpc_release_tag
v1.27.1 to v1.46.3 forsdks/cpp/cmake/prerequisites.cmake
gen.sh
which has difference between each languageswagger-codegen-cli
2.4.10 to v3(3.0.34) for restapi testgrpc-tools
1.8.1 to 1.11.2 for nodejs sdk@grpc/grpc-js
1.5.4 to 1.6.7 andgoogle-protobuf
3.19.4 to 3.20.1 for nodejs sdkGoogle.Protobuf
3.11.4 to 3.19.4,Grpc
Grpc.Core
Grpc.Tools
2.28.1 to 2.45.0 in csharp sdksdks/rust/proto
which is copied for rust sdksdks/swagger/sdk.swagger.json
, which is changed byprotoc_gen_openapiv2
(x-stream-definitions is not already supported)test/sdk/restapi/http-api-test.go.nolint
code because return code was changedtest/sdk/websocket-watch/ws-watch-test.go
code because the test was not passed with the old codetools.go
dependenciesalpha.pb.go
,alpha.pb.gw.go
,beta.pb.go
,beta.pb.gw.go
,sdk.pb.go
,sdk.pb.gw.go
,sdk.grpc.pb.h
,sdk.pb.h
,google/api/annotations.pb.h
,google/api/http.pb.h
,sdk.grpc.pb.cc
,sdk.pb.cc
,google/annotations.pb.cc
,google/http.pb.cc
,Alpha.cs
,AlphaGrpc.cs
,Sdk.cs
,SdkGrpc.cs
,alpha_grpc_pb.js
,alpha_pb.js
,sdk_grpc_pb.js
,sdk_pb.js
)Deleted
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
Workaround
sdks/swagger/sdk.swagger.json
because protoc-gen-openapiv2 doesn't work well in Stream and doesn't generate nessesary definitions. It seems that the bug occurs if both stream definition and--openapiv2_opt=disable_default_errors=true
exist.Which issue(s) this PR fixes:
Closes #2462
Special notes for your reviewer:
This is large PR. I am very careful for this change, but if you have any suggestions, please let me know.
Thank you.