diff --git a/Makefile b/Makefile index abeac75ec637..7e2cdbc4d592 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.9.1 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 daaedb55d92c..21241960aea3 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 @@ -101,22 +101,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 140dcf0e0ac5..92104df4417d 100644 --- a/spec/03-plugins/23-rate-limiting/04-access_spec.lua +++ b/spec/03-plugins/23-rate-limiting/04-access_spec.lua @@ -604,7 +604,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 cea72bad2b71..bef86557b689 100644 --- a/spec/helpers.lua +++ b/spec/helpers.lua @@ -1061,7 +1061,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