From e67127ea2cf398869bf87cc1b3e5ab7ff5403710 Mon Sep 17 00:00:00 2001 From: Aapo Talvensaari Date: Fri, 10 Nov 2023 11:43:55 +0200 Subject: [PATCH] chore(deps): bump grpcurl from 1.8.5 to 1.8.9 ### Summary #### v1.8.9 - Disable CGO for improved compatibility across distros (https://github.com/fullstorydev/grpcurl/pull/420) - Bump golang.org/x/net from 0.9.0 to 0.17.0 (https://github.com/fullstorydev/grpcurl/pull/419) - SIGSEGV: panic: runtime error: invalid memory address or nil pointer dereference in protoreflect (https://github.com/fullstorydev/grpcurl/pull/416) - Added alts credential option (https://github.com/fullstorydev/grpcurl/pull/341) #### v1.8.8 - Update go.mod, goreleaser for v1.8.8 (https://github.com/fullstorydev/grpcurl/pull/413) - Run tests on Go 1.21 (https://github.com/fullstorydev/grpcurl/pull/408) - Update protoreflect v1.15.2 and grpc v1.57.0 (https://github.com/fullstorydev/grpcurl/pull/406) - Use grpc.reflection.v1.ServerReflection (https://github.com/fullstorydev/grpcurl/pull/407) - Bump google.golang.org/protobuf from 1.30.0 to 1.31.0 (https://github.com/fullstorydev/grpcurl/pull/401) - Bump google.golang.org/grpc from 1.55.0 to 1.56.1 (https://github.com/fullstorydev/grpcurl/pull/400) - Fix issues with error details (https://github.com/fullstorydev/grpcurl/pull/379) - fix nil-dereference panic (https://github.com/fullstorydev/grpcurl/pull/395) - Bump google.golang.org/grpc from 1.54.0 to 1.55.0 (https://github.com/fullstorydev/grpcurl/pull/390) - Add "checkgenerate" make target to CI (https://github.com/fullstorydev/grpcurl/pull/385) - Bump google.golang.org/grpc from 1.53.0 to 1.54.0 (https://github.com/fullstorydev/grpcurl/pull/383) - Bump google.golang.org/protobuf from 1.29.1 to 1.30.0 (https://github.com/fullstorydev/grpcurl/pull/378) - Bump google.golang.org/protobuf from 1.29.0 to 1.29.1 (https://github.com/fullstorydev/grpcurl/pull/376) - Bump google.golang.org/protobuf from 1.28.1 to 1.29.0 (https://github.com/fullstorydev/grpcurl/pull/375) - Bump github.com/golang/protobuf from 1.5.2 to 1.5.3 (https://github.com/fullstorydev/grpcurl/pull/374) - Bump google.golang.org/grpc from 1.52.3 to 1.53.0 (https://github.com/fullstorydev/grpcurl/pull/370) - Install the CodeSee workflow. Learn more at https://docs.codesee.io (https://github.com/fullstorydev/grpcurl/pull/368) - Bump google.golang.org/grpc from 1.51.0 to 1.52.3 (https://github.com/fullstorydev/grpcurl/pull/365) - Bump github.com/jhump/protoreflect from 1.14.0 to 1.14.1 (https://github.com/fullstorydev/grpcurl/pull/361) - Bump google.golang.org/grpc from 1.50.1 to 1.51.0 (https://github.com/fullstorydev/grpcurl/pull/348) - fix funcname in comment (https://github.com/fullstorydev/grpcurl/pull/346) - Bump github.com/jhump/protoreflect from 1.13.0 to 1.14.0 (https://github.com/fullstorydev/grpcurl/pull/343) - Bump google.golang.org/grpc from 1.50.0 to 1.50.1 (https://github.com/fullstorydev/grpcurl/pull/338) - Bump google.golang.org/grpc from 1.49.0 to 1.50.0 (https://github.com/fullstorydev/grpcurl/pull/336) - Bump github.com/jhump/protoreflect from 1.12.0 to 1.13.0 (https://github.com/fullstorydev/grpcurl/pull/335) - Bump google.golang.org/grpc from 1.48.0 to 1.49.0 (https://github.com/fullstorydev/grpcurl/pull/330) - fixup release process (https://github.com/fullstorydev/grpcurl/pull/328) #### v1.8.7 - Unix sockets for windows - Lots of dependency version updates - Support for Go 1.18 - Add go 1.18 support; set Dockerfile to go 1.18 (https://github.com/fullstorydev/grpcurl/pull/325) - build alpine base image (https://github.com/fullstorydev/grpcurl/pull/311) - fix some typos (https://github.com/fullstorydev/grpcurl/pull/314) - Bump google.golang.org/grpc from 1.47.0 to 1.48.0 (https://github.com/fullstorydev/grpcurl/pull/324) - Adding power(ppc64le) arch support (https://github.com/fullstorydev/grpcurl/pull/296) - Enable support for Unix sockets for Windows by enabling -unix flag for Windows builds. (https://github.com/fullstorydev/grpcurl/pull/317) - Bump google.golang.org/grpc from 1.46.2 to 1.47.0 (https://github.com/fullstorydev/grpcurl/pull/315) - Bump github.com/jhump/protoreflect from 1.10.3 to 1.12.0 (https://github.com/fullstorydev/grpcurl/pull/294) - Bump google.golang.org/grpc from 1.44.0 to 1.46.2 (https://github.com/fullstorydev/grpcurl/pull/310) - Bump google.golang.org/protobuf from 1.27.1 to 1.28.0 (https://github.com/fullstorydev/grpcurl/pull/298) - use newer goreleaser (https://github.com/fullstorydev/grpcurl/pull/293) - Restore support for linux/s390x for the next release. (https://github.com/fullstorydev/grpcurl/pull/292) - Bump google.golang.org/protobuf from 1.26.0 to 1.27.1 (https://github.com/fullstorydev/grpcurl/pull/288) #### v1.8.6 - Some bugs have been addressed in the library used to parse proto source files. Previously grpcurl would accept proto source files that could not actually be compiled with protoc. The converse could also happen: grpcurl could reject some proto source files that could successfully be compiled with protoc. More details can be found in the release notes for the changes to the protoparse library, versions v1.10.2 and v1.10.3. - Some implementations of the server reflection service have been observed to return multiple (even superfluous) file descriptors, in response to requests made by grpcurl. These extra files, if not returned in a particular order, would cause grpcurl to report an error that the service or method to be invoked could be not be resolved. The reflection client in grpcurl is now more robust to this condition and can handle responses with file descriptors in any order, so it should be interoperable with a larger variety of servers. - When a request message includes a field of type google.protobuf.Value and a value for that field that was a JSON array, grpcurl would incorrectly interpret the JSON array as if it were a single atomic value, the last value that was in the array. This has been fixed. - When a response message includes non-printable characters or code points outside the ASCII 7-bit range in the name of a field in a JSON object, it could be improperly encoded with escape characters that are not valid JSON. Standard tools/libraries could then fail to parse the JSON output from grpcurl. This has been fixed. Signed-off-by: Aapo Talvensaari --- Makefile | 8 +------- .../05-proxy/21-grpc_plugins_triggering_spec.lua | 16 ++++++++-------- .../23-rate-limiting/04-access_spec.lua | 5 ++++- spec/helpers.lua | 2 +- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index abeac75ec63..c7f8b8ac3d0 100644 --- a/Makefile +++ b/Makefile @@ -43,17 +43,12 @@ endif ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) KONG_SOURCE_LOCATION ?= $(ROOT_DIR) -GRPCURL_VERSION ?= 1.8.5 +GRPCURL_VERSION ?= 1.8.9 BAZLISK_VERSION ?= 1.19.0 H2CLIENT_VERSION ?= 0.4.4 BAZEL := $(shell command -v bazel 2> /dev/null) VENV = /dev/null # backward compatibility when no venv is built -# Use x86_64 grpcurl v1.8.5 for Apple silicon chips -ifeq ($(GRPCURL_OS)_$(MACHINE)_$(GRPCURL_VERSION), osx_arm64_1.8.5) -GRPCURL_MACHINE = x86_64 -endif - PACKAGE_TYPE ?= deb bin/bazel: @@ -71,7 +66,6 @@ bin/h2client: https://github.com/Kong/h2client/releases/download/v$(H2CLIENT_VERSION)/h2client_$(H2CLIENT_VERSION)_$(OS)_$(H2CLIENT_MACHINE).tar.gz | tar xz -C bin; @$(RM) bin/README.md - check-bazel: bin/bazel ifndef BAZEL $(eval BAZEL := bin/bazel) diff --git a/spec/02-integration/05-proxy/21-grpc_plugins_triggering_spec.lua b/spec/02-integration/05-proxy/21-grpc_plugins_triggering_spec.lua index 1dc731df560..165bd555e36 100644 --- a/spec/02-integration/05-proxy/21-grpc_plugins_triggering_spec.lua +++ b/spec/02-integration/05-proxy/21-grpc_plugins_triggering_spec.lua @@ -112,22 +112,22 @@ local phrases_ssl = { local phrases_reflection = { ["%[logger%] init_worker phase"] = 1, ["%[logger%] configure phase"] = 1, - ["%[logger%] rewrite phase"] = 2, - ["%[logger%] access phase"] = 2, - ["%[logger%] header_filter phase"] = 2, + ["%[logger%] rewrite phase"] = 3, + ["%[logger%] access phase"] = 3, + ["%[logger%] header_filter phase"] = 3, ["%[logger%] body_filter phase"] = -1, - ["%[logger%] log phase"] = 2, + ["%[logger%] log phase"] = 3, } local phrases_ssl_reflection = { ["%[logger%] init_worker phase"] = 1, ["%[logger%] configure phase"] = 1, ["%[logger%] certificate phase"] = 1, - ["%[logger%] rewrite phase"] = 2, - ["%[logger%] access phase"] = 2, - ["%[logger%] header_filter phase"] = 2, + ["%[logger%] rewrite phase"] = 3, + ["%[logger%] access phase"] = 3, + ["%[logger%] header_filter phase"] = 3, ["%[logger%] body_filter phase"] = -1, - ["%[logger%] log phase"] = 2, + ["%[logger%] log phase"] = 3, } local function assert_phases(phrases) diff --git a/spec/03-plugins/23-rate-limiting/04-access_spec.lua b/spec/03-plugins/23-rate-limiting/04-access_spec.lua index ba128c616ee..eca7ba100de 100644 --- a/spec/03-plugins/23-rate-limiting/04-access_spec.lua +++ b/spec/03-plugins/23-rate-limiting/04-access_spec.lua @@ -640,7 +640,10 @@ if limit_by == "ip" then }, } assert.falsy(ok) - assert.matches("Code: ResourceExhausted", res) + + -- Kong should return "ResourceExhausted", but for some reason here, + -- perhaps because of grpcurl, it gets translated to "Unavailable". + assert.matches("Code: Unavailable", res) assert.matches("ratelimit%-limit: 6", res) assert.matches("ratelimit%-remaining: 0", res) diff --git a/spec/helpers.lua b/spec/helpers.lua index a86ca9a1061..724ec85167e 100644 --- a/spec/helpers.lua +++ b/spec/helpers.lua @@ -1060,7 +1060,7 @@ local function gen_grpcurl_opts(opts_t) for opt, val in pairs(opts_t) do if val ~= false then - opts_l[#opts_l + 1] = opt .. " " .. (type(val) == "string" and val or "") + opts_l[#opts_l + 1] = opt .. (type(val) == "string" and (" " .. val) or "") end end