You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2019/12/24 12:26:52 UTC

[GitHub] [incubator-apisix] membphis opened a new pull request #998: feature: supported `priority` for route.

membphis opened a new pull request #998: feature: supported `priority` for route.
URL: https://github.com/apache/incubator-apisix/pull/998
 
 
   - [ ] doc

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] juzhiyuan commented on a change in pull request #998: feature: supported `priority` for route.

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #998: feature: supported `priority` for route.
URL: https://github.com/apache/incubator-apisix/pull/998#discussion_r361242807
 
 

 ##########
 File path: doc/admin-api.md
 ##########
 @@ -56,6 +56,7 @@ Table of contents
 |remote_addr|False |Match Rules|The client requests an IP address: `192.168.1.101`, `192.168.1.102`, and CIDR format support `192.168.1.0/24`. In particular, APISIX also fully supports IPv6 address matching: `::1`, `fe80::1`, `fe80::1/64`, etc.|"192.168.1.0/24"|
 |remote_addrs|False |Match Rules|The `remote_addr` in the form of a list indicates that multiple different IP addresses are allowed, and match any one of them.|{"127.0.0.1", "192.0.0.0/8", "::1"}|
 |methods  |False |Match Rules|If empty or without this option, there are no `method` restrictions, and it can be a combination of one or more: `GET`,`POST`,`PUT`,`DELETE`,`PATCH`, `HEAD`,`OPTIONS`,`CONNECT`,`TRACE`.|{"GET", "POST"}|
+|priority  |False |Match Rules|If different routes contain the same `uri`, determine which route is matched first based on the attribute` priority`. Default value is `0`.|priority = 10|
 
 Review comment:
   The default value is xxx

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] juzhiyuan commented on a change in pull request #998: feature: supported `priority` for route.

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #998: feature: supported `priority` for route.
URL: https://github.com/apache/incubator-apisix/pull/998#discussion_r361242682
 
 

 ##########
 File path: doc/admin-api-cn.md
 ##########
 @@ -57,6 +57,7 @@
 |remote_addr|可选 |匹配规则|客户端请求 IP 地址: `192.168.1.101`、`192.168.1.102` 以及 CIDR 格式的支持 `192.168.1.0/24`。特别的,APISIX 也完整支持 IPv6 地址匹配:`::1`,`fe80::1`, `fe80::1/64` 等。|"192.168.1.0/24"|
 |remote_addrs|可选 |匹配规则|列表形态的 `remote_addr`,表示允许有多个不同 IP 地址,符合其中任意一个即可。|{"127.0.0.1", "192.0.0.0/8", "::1"}|
 |methods  |可选 |匹配规则|如果为空或没有该选项,代表没有任何 `method` 限制,也可以是一个或多个的组合:`GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`,`CONNECT`,`TRACE`。|{"GET", "POST"}|
+|priority  |可选 |匹配规则|如果不同路由包含相同 `uri` ,根据属性 `priority` 确定哪个 `route` 被优先匹配。默认值为 `0`.|priority = 10|
 
 Review comment:
   ![image](https://user-images.githubusercontent.com/2106987/71429225-91ee0580-2700-11ea-9295-173f4fa27ecf.png)
   
   Please remove this space

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] moonming commented on a change in pull request #998: feature: supported `priority` for route.

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #998: feature: supported `priority` for route.
URL: https://github.com/apache/incubator-apisix/pull/998#discussion_r361264429
 
 

 ##########
 File path: lua/apisix/schema_def.lua
 ##########
 @@ -283,6 +283,7 @@ _M.route = {
             uniqueItems = true,
         },
         desc = {type = "string", maxLength = 256},
+        priority = {type = "integer", minimum = 1},
 
 Review comment:
   the minimum value is 1, but the default value is 0?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] juzhiyuan commented on a change in pull request #998: feature: supported `priority` for route.

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #998: feature: supported `priority` for route.
URL: https://github.com/apache/incubator-apisix/pull/998#discussion_r361242777
 
 

 ##########
 File path: doc/admin-api.md
 ##########
 @@ -56,6 +56,7 @@ Table of contents
 |remote_addr|False |Match Rules|The client requests an IP address: `192.168.1.101`, `192.168.1.102`, and CIDR format support `192.168.1.0/24`. In particular, APISIX also fully supports IPv6 address matching: `::1`, `fe80::1`, `fe80::1/64`, etc.|"192.168.1.0/24"|
 |remote_addrs|False |Match Rules|The `remote_addr` in the form of a list indicates that multiple different IP addresses are allowed, and match any one of them.|{"127.0.0.1", "192.0.0.0/8", "::1"}|
 |methods  |False |Match Rules|If empty or without this option, there are no `method` restrictions, and it can be a combination of one or more: `GET`,`POST`,`PUT`,`DELETE`,`PATCH`, `HEAD`,`OPTIONS`,`CONNECT`,`TRACE`.|{"GET", "POST"}|
+|priority  |False |Match Rules|If different routes contain the same `uri`, determine which route is matched first based on the attribute` priority`. Default value is `0`.|priority = 10|
 
 Review comment:
   ![image](https://user-images.githubusercontent.com/2106987/71429255-b8ac3c00-2700-11ea-8854-cb9959365eb8.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] moonming commented on a change in pull request #998: feature: supported `priority` for route.

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #998: feature: supported `priority` for route.
URL: https://github.com/apache/incubator-apisix/pull/998#discussion_r361264163
 
 

 ##########
 File path: doc/admin-api-cn.md
 ##########
 @@ -57,6 +57,7 @@
 |remote_addr|可选 |匹配规则|客户端请求 IP 地址: `192.168.1.101`、`192.168.1.102` 以及 CIDR 格式的支持 `192.168.1.0/24`。特别的,APISIX 也完整支持 IPv6 地址匹配:`::1`,`fe80::1`, `fe80::1/64` 等。|"192.168.1.0/24"|
 |remote_addrs|可选 |匹配规则|列表形态的 `remote_addr`,表示允许有多个不同 IP 地址,符合其中任意一个即可。|{"127.0.0.1", "192.0.0.0/8", "::1"}|
 |methods  |可选 |匹配规则|如果为空或没有该选项,代表没有任何 `method` 限制,也可以是一个或多个的组合:`GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`,`CONNECT`,`TRACE`。|{"GET", "POST"}|
+|priority  |可选 |匹配规则|如果不同路由包含相同 `uri`,根据属性 `priority` 确定哪个 `route` 被优先匹配,默认值为 0。|priority = 10|
 
 Review comment:
   Is there a range? Is the larger the value the higher the priority?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] moonming merged pull request #998: feature: supported `priority` for route.

Posted by GitBox <gi...@apache.org>.
moonming merged pull request #998: feature: supported `priority` for route.
URL: https://github.com/apache/incubator-apisix/pull/998
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] moonming commented on a change in pull request #998: feature: supported `priority` for route.

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #998: feature: supported `priority` for route.
URL: https://github.com/apache/incubator-apisix/pull/998#discussion_r361264224
 
 

 ##########
 File path: doc/admin-api-cn.md
 ##########
 @@ -57,6 +57,7 @@
 |remote_addr|可选 |匹配规则|客户端请求 IP 地址: `192.168.1.101`、`192.168.1.102` 以及 CIDR 格式的支持 `192.168.1.0/24`。特别的,APISIX 也完整支持 IPv6 地址匹配:`::1`,`fe80::1`, `fe80::1/64` 等。|"192.168.1.0/24"|
 |remote_addrs|可选 |匹配规则|列表形态的 `remote_addr`,表示允许有多个不同 IP 地址,符合其中任意一个即可。|{"127.0.0.1", "192.0.0.0/8", "::1"}|
 |methods  |可选 |匹配规则|如果为空或没有该选项,代表没有任何 `method` 限制,也可以是一个或多个的组合:`GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`,`CONNECT`,`TRACE`。|{"GET", "POST"}|
+|priority  |可选 |匹配规则|如果不同路由包含相同 `uri`,根据属性 `priority` 确定哪个 `route` 被优先匹配,默认值为 0。|priority = 10|
 
 Review comment:
   What would happen if the two priorities were the same?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis commented on a change in pull request #998: feature: supported `priority` for route.

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #998: feature: supported `priority` for route.
URL: https://github.com/apache/incubator-apisix/pull/998#discussion_r361356540
 
 

 ##########
 File path: doc/admin-api-cn.md
 ##########
 @@ -57,6 +57,7 @@
 |remote_addr|可选 |匹配规则|客户端请求 IP 地址: `192.168.1.101`、`192.168.1.102` 以及 CIDR 格式的支持 `192.168.1.0/24`。特别的,APISIX 也完整支持 IPv6 地址匹配:`::1`,`fe80::1`, `fe80::1/64` 等。|"192.168.1.0/24"|
 |remote_addrs|可选 |匹配规则|列表形态的 `remote_addr`,表示允许有多个不同 IP 地址,符合其中任意一个即可。|{"127.0.0.1", "192.0.0.0/8", "::1"}|
 |methods  |可选 |匹配规则|如果为空或没有该选项,代表没有任何 `method` 限制,也可以是一个或多个的组合:`GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS`,`CONNECT`,`TRACE`。|{"GET", "POST"}|
+|priority  |可选 |匹配规则|如果不同路由包含相同 `uri`,根据属性 `priority` 确定哪个 `route` 被优先匹配,默认值为 0。|priority = 10|
 
 Review comment:
   Unable to determine which route was matched.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-apisix] membphis commented on a change in pull request #998: feature: supported `priority` for route.

Posted by GitBox <gi...@apache.org>.
membphis commented on a change in pull request #998: feature: supported `priority` for route.
URL: https://github.com/apache/incubator-apisix/pull/998#discussion_r361555985
 
 

 ##########
 File path: lua/apisix/schema_def.lua
 ##########
 @@ -283,6 +283,7 @@ _M.route = {
             uniqueItems = true,
         },
         desc = {type = "string", maxLength = 256},
+        priority = {type = "integer", minimum = 1},
 
 Review comment:
   Keep only the default value to 0.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services