You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2022/08/17 01:08:16 UTC
[apisix] branch master updated: change: remove deprecated service_protocol in route (#7701)
This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new d41d9dfbe change: remove deprecated service_protocol in route (#7701)
d41d9dfbe is described below
commit d41d9dfbeac6307be1ef21a0da351f428fafaa7d
Author: tzssangglass <tz...@gmail.com>
AuthorDate: Wed Aug 17 09:08:12 2022 +0800
change: remove deprecated service_protocol in route (#7701)
---
apisix/init.lua | 4 ----
apisix/schema_def.lua | 3 ---
t/node/grpc-proxy-unary.t | 2 +-
t/node/grpc-proxy.t | 4 ++--
t/plugin/grpc-transcode.t | 2 --
5 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/apisix/init.lua b/apisix/init.lua
index 17f1740ef..5026ff6ba 100644
--- a/apisix/init.lua
+++ b/apisix/init.lua
@@ -520,10 +520,6 @@ function _M.http_access_phase()
core.log.info("enabled websocket for route: ", route.value.id)
end
- if route.value.service_protocol == "grpc" then
- api_ctx.upstream_scheme = "grpc"
- end
-
-- load balancer is not required by kafka upstream, so the upstream
-- node selection process is intercepted and left to kafka to
-- handle on its own
diff --git a/apisix/schema_def.lua b/apisix/schema_def.lua
index 3d721a4a4..1fc8dfacb 100644
--- a/apisix/schema_def.lua
+++ b/apisix/schema_def.lua
@@ -610,9 +610,6 @@ _M.route = {
service_id = id_schema,
upstream_id = id_schema,
- service_protocol = {
- enum = {"grpc", "http"}
- },
enable_websocket = {
description = "enable websocket for request",
diff --git a/t/node/grpc-proxy-unary.t b/t/node/grpc-proxy-unary.t
index 694ea6281..f1a063c54 100644
--- a/t/node/grpc-proxy-unary.t
+++ b/t/node/grpc-proxy-unary.t
@@ -70,8 +70,8 @@ routes:
methods: [
POST
]
- service_protocol: grpc
upstream:
+ scheme: grpc
nodes:
"127.0.0.1:50051": 1
type: roundrobin
diff --git a/t/node/grpc-proxy.t b/t/node/grpc-proxy.t
index c4338e77b..5c14e01d0 100644
--- a/t/node/grpc-proxy.t
+++ b/t/node/grpc-proxy.t
@@ -102,13 +102,13 @@ apikey: user-key
upstreams:
- id: 1
type: roundrobin
+ scheme: grpc
nodes:
"127.0.0.1:9088": 1
routes:
- id: 1
methods:
- POST
- service_protocol: grpc
uri: "/hello"
upstream_id: 1
#END
@@ -130,7 +130,6 @@ routes:
- id: 1
methods:
- POST
- service_protocol: grpc
uri: "/hello"
plugins:
key-auth:
@@ -139,6 +138,7 @@ routes:
- jack
upstream:
type: roundrobin
+ scheme: grpc
nodes:
"127.0.0.1:9088": 1
#END
diff --git a/t/plugin/grpc-transcode.t b/t/plugin/grpc-transcode.t
index caf902cda..a005c0113 100644
--- a/t/plugin/grpc-transcode.t
+++ b/t/plugin/grpc-transcode.t
@@ -606,7 +606,6 @@ passed
[[{
"methods": ["GET", "POST"],
"uri": "/grpctest",
- "service_protocol": "grpc",
"plugins": {
"grpc-transcode": {
"proto_id": "1",
@@ -771,7 +770,6 @@ failed to encode request data to protobuf
[[{
"methods": ["GET", "POST"],
"uri": "/grpctest",
- "service_protocol": "grpc",
"plugins": {
"grpc-transcode": {
"proto_id": "1",