Skip to content

Commit

Permalink
Upgrade gRPC version (#3472)
Browse files Browse the repository at this point in the history
* Upgrade gRPC version

* make gen-all-sdk-grpc

* Upgrade gRPC version

* Review updates

* Fix for cmake grpc dependency
* Updated all gRPC SDK code.

* Show all the differences

* Fixes for generated content drift

* Include the gRPC version in the `build_sdk_base_version` version such
that it automatically gets rebuilt whenever the gRPC version changes
without manual intervention.

Also updated the changes in the allocation gRPC code as well.

---------

Co-authored-by: Mark Mandel <markmandel@google.com>
  • Loading branch information
Kalaiselvi84 and markmandel authored Oct 31, 2023
1 parent dfd7e6b commit 01fc87b
Show file tree
Hide file tree
Showing 28 changed files with 9,197 additions and 8,001 deletions.
11 changes: 7 additions & 4 deletions build/includes/sdk.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@
# \__, |_| \_\_| \____| |_|\___/ \___/|_|_|_| |_|\__, |
# |___/ |___/

build_sdk_base_version = $(call sha,$(build_path)/build-sdk-images/tool/base/Dockerfile)
grpc_release_tag = v1.57.0

build_sdk_base_version = $(call sha,$(build_path)/build-sdk-images/tool/base/Dockerfile)_$(grpc_release_tag)
build_sdk_base_tag = agones-build-sdk-base:$(build_sdk_base_version)

# Calculate sha hash of sha hashes of all files in a specified SDK_FOLDER
build_sdk_version = $(call sha_dir,$(build_path)/build-sdk-images/$(SDK_FOLDER)/*)
build_sdk_base_remote_tag = $(REGISTRY)/$(build_sdk_base_tag)
build_sdk_prefix = agones-build-sdk-
grpc_release_tag = v1.53.0
sdk_build_folder = build-sdk-images/
examples_folder = ../examples/
SDK_FOLDER ?= go
Expand Down Expand Up @@ -236,13 +237,15 @@ test-gen-all-sdk-grpc:
make gen-all-sdk-grpc
@echo; \
echo "=== Diffing workspace after 'make gen-all-sdk-grpc'"; \
diff_output=$$(git diff --name-status HEAD -- ../sdks); \
diff_output_test_sdk=$$(git diff --name-status HEAD -- ../test/sdk); \
diff_output=$$(git diff HEAD -- ../sdks); \
diff_output_test_sdk=$$(git diff HEAD -- ../test/sdk); \
if [ -z "$$diff_output" ] && [ -z "$$diff_output_test_sdk" ]; then \
echo "+++ Success: No differences found."; \
else \
echo "*** Failure: Differences found:"; \
echo "Changes in ../sdks:"; \
echo "$$diff_output"; \
echo "Changes in ../test/sdk:"; \
echo "$$diff_output_test_sdk"; \
exit 1; \
fi
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ require (
golang.org/x/tools v0.13.0
google.golang.org/api v0.138.0
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d
google.golang.org/grpc v1.57.0
google.golang.org/grpc v1.57.1
google.golang.org/protobuf v1.31.0
gopkg.in/fsnotify.v1 v1.4.7
gopkg.in/natefinch/lumberjack.v2 v2.0.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,8 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw=
google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=
google.golang.org/grpc v1.57.1 h1:upNTNqv0ES+2ZOOqACwVtS3Il8M12/+Hz41RCPzAjQg=
google.golang.org/grpc v1.57.1/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
Expand Down
2 changes: 1 addition & 1 deletion pkg/allocation/go/allocation.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/allocation/go/allocation_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/sdk/alpha/alpha.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/sdk/alpha/alpha_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/sdk/beta/beta.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/sdk/beta/beta_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/sdk/sdk.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/sdk/sdk_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdks/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
set(CMAKE_DEBUG_POSTFIX "d")
set(AGONES_GRPC_VERSION "1.53.0")
set(AGONES_GRPC_VERSION "1.57.0")

# Platform specific stuff
if (WIN32)
Expand Down
4 changes: 2 additions & 2 deletions sdks/cpp/cmake/prerequisites.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ endif()

# gRPC repo and version
set(gRPC_GIT_REPO "https://github.com/gRPC/gRPC.git")
set(gRPC_GIT_TAG "v1.53.0")
set(gRPC_GIT_TAG "v1.57.0")

# OpenSSL required only for successful build gRPC
set(OPENSSL_GIT_REPO "https://github.com/openssl/openssl.git")
Expand Down Expand Up @@ -171,7 +171,7 @@ if (NOT ${gRPC_FOUND})
"-DCARES_STATIC=ON"
"-DCARES_SHARED=OFF"
)
invoke_cmake_build(Protobuf ${gRPC_SOURCE_DIR}/third_party/protobuf/cmake
invoke_cmake_build(Protobuf ${gRPC_SOURCE_DIR}/third_party/protobuf
"-DZLIB_ROOT=${zlib_DIR}"
"${ZLIB_PARAM}"
"-Dprotobuf_MSVC_STATIC_RUNTIME=OFF"
Expand Down
Loading

0 comments on commit 01fc87b

Please sign in to comment.