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