[GitHub] [incubator-apisix] moonming commented on issue #1044: feature:Does apisix can support the protocol of tars
moonming commented on issue #1044: feature:Does apisix can support the protocol of tars URL: https://github.com/apache/incubator-apisix/issues/1044#issuecomment-573546319 [Tars](https://github.com/TarsCloud/Tars) is in the TODO list, welcome PR 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-apisix] shoulda opened a new issue #1044: feature:Does apisix can support the protocol of tars
shoulda opened a new issue #1044: feature:Does apisix can support the protocol of tars URL: https://github.com/apache/incubator-apisix/issues/1044 ### Issue description ### Environment * apisix version (cmd: `apisix version`): * OS: ### Minimal test code / Steps to reproduce the issue 1. 2. 3. ### What's the actual result? (including assertion message & call stack if applicable) ### What's the expected result? 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-apisix] moonming merged pull request #1043: doc: fix typo in 'The advantages of Apache APISIX'
moonming merged pull request #1043: doc: fix typo in 'The advantages of Apache APISIX' URL: https://github.com/apache/incubator-apisix/pull/1043 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: us...@infra.apache.org With regards, Apache Git Services
[incubator-apisix] branch master updated: doc: fix typo in 'The advantages of Apache APISIX' (#1043)
This is an automated email from the ASF dual-hosted git repository. wenming pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-apisix.git The following commit(s) were added to refs/heads/master by this push: new 781c81a doc: fix typo in 'The advantages of Apache APISIX' (#1043) 781c81a is described below commit 781c81aa4d040cd2eb81a8a4570751de86e21289 Author: Lien AuthorDate: Mon Jan 13 14:35:03 2020 +0800 doc: fix typo in 'The advantages of Apache APISIX' (#1043) --- README.md| 4 ++-- README_CN.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eba0f5f..6040f59 100644 --- a/README.md +++ b/README.md @@ -178,9 +178,9 @@ Using AWS's 8 core server, APISIX's QPS reach to 140,000 with a latency of only The advantages of Apache APISIX | **Features** | **Apache APISIX** | **Kong** | |:|:|:| -| belongs to | Apache Foundation | Kong Inc. | +| belongs to | Apache Software Foundation | Kong Inc. | | Tech Architecture | Nginx + etcd | Nginx + postgres | -| Communication channels | Mail list, Wechat qroup, QQ group, Github, meetup | Github,freenode, forum | +| Communication channels | Mail list, Wechat group, QQ group, Github, meetup | Github,freenode, forum | | Single-core CPU, QPS(enable limit-count and prometheus plugins) | 18000 | 1700 | | latency | 0.2 ms | 2 ms | | IPv6| Yes | No | diff --git a/README_CN.md b/README_CN.md index e585575..89bd681 100644 --- a/README_CN.md +++ b/README_CN.md @@ -180,7 +180,7 @@ Dashboard 默认允许任何 IP 访问。你可以自行修改 `conf/config.yaml | **功能** | **Apache APISIX** | **KONG** | |:|:|:| -| 项目归属 | Apache 基金会 | Kong Inc. | +| 项目归属 | Apache 软件基金会 | Kong Inc. | | 技术架构 | Nginx + etcd | Nginx + postgres | | 交流渠道 | 微信群、QQ群、邮件列表、Github、meetup | Github、论坛、freenode | | 单核 QPS(开启限流和prometheus插件) | 18000 | 1700 |
[GitHub] [incubator-apisix] lilien1010 opened a new pull request #1043: doc: fix typo in 'The advantages of Apache APISIX'
lilien1010 opened a new pull request #1043: doc: fix typo in 'The advantages of Apache APISIX' URL: https://github.com/apache/incubator-apisix/pull/1043 NOTE: Please read the Contributing.md guidelines before submitting your patch: https://github.com/apache/incubator-apisix/blob/master/Contributing.md#how-to-add-a-new-feature-or-change-an-existing-one ### Summary SUMMARY_HERE ### Full changelog * [Implement ...] * [Add related tests] * ... ### Issues resolved Fix #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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #802: request help: Is there any plan that the APISIX supports the Consul?
membphis commented on issue #802: request help: Is there any plan that the APISIX supports the Consul? URL: https://github.com/apache/incubator-apisix/issues/802#issuecomment-573493807 @Miss-you any news? 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1042: feature: introduce the fault-injection plugin.
membphis commented on issue #1042: feature: introduce the fault-injection plugin. URL: https://github.com/apache/incubator-apisix/pull/1042#issuecomment-573491855 @agile6v missing a new doc about how to use this plugin. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request #1042: feature: introduce the fault-injection plugin.
membphis commented on a change in pull request #1042: feature: introduce the fault-injection plugin. URL: https://github.com/apache/incubator-apisix/pull/1042#discussion_r365635042 ## File path: lua/apisix/plugins/fault-injection.lua ## @@ -0,0 +1,77 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +local core = require("apisix.core") +local sleep = ngx.sleep + +local plugin_name = "fault-injection" + +local schema = { +type = "object", +properties = { +abort = { +type = "object", +properties = { +http_status = {type = "integer", minimum = 200}, +body = {type = "string", minLength = 0}, +}, +required = {"http_status"} +}, +delay = { +type = "object", +properties = { +duration = { +type = "string", Review comment: If the `delay` object only has one `property`, I think the type of `delay` should be "number". `delay = {type = "number", maximum = 100, minimum = 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request #1042: feature: introduce the fault-injection plugin.
membphis commented on a change in pull request #1042: feature: introduce the fault-injection plugin. URL: https://github.com/apache/incubator-apisix/pull/1042#discussion_r365634780 ## File path: lua/apisix/plugins/fault-injection.lua ## @@ -0,0 +1,77 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one or more +-- contributor license agreements. See the NOTICE file distributed with +-- this work for additional information regarding copyright ownership. +-- The ASF licenses this file to You under the Apache License, Version 2.0 +-- (the "License"); you may not use this file except in compliance with +-- the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +local core = require("apisix.core") +local sleep = ngx.sleep + +local plugin_name = "fault-injection" + +local schema = { +type = "object", +properties = { +abort = { +type = "object", +properties = { +http_status = {type = "integer", minimum = 200}, +body = {type = "string", minLength = 0}, +}, +required = {"http_status"} +}, +delay = { +type = "object", +properties = { +duration = { +type = "string", Review comment: it should be a `number` 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-apisix] membphis commented on a change in pull request #1042: feature: introduce the fault-injection plugin.
membphis commented on a change in pull request #1042: feature: introduce the fault-injection plugin. URL: https://github.com/apache/incubator-apisix/pull/1042#discussion_r365635301 ## File path: t/plugin/fault-injection.t ## @@ -0,0 +1,562 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +BEGIN { +if ($ENV{TEST_NGINX_CHECK_LEAK}) { +$SkipReason = "unavailable for the hup tests"; + +} else { +$ENV{TEST_NGINX_USE_HUP} = 1; +undef $ENV{TEST_NGINX_USE_STAP}; +} +} + +use t::APISIX 'no_plan'; + +repeat_each(1); +no_long_string(); +no_shuffle(); +no_root_location(); +log_level('info'); +run_tests; + +__DATA__ + +=== TEST 1: set route(invalid http_status in the abort property) +--- config + location /t { + content_by_lua_block { + local t = require("lib.test_admin").test + local code, body = t('/apisix/admin/routes/1', +ngx.HTTP_PUT, +[[{ + "plugins": { + "fault-injection": { + "abort": { + "http_status": 100, + "body": "Fault Injection!" + } + }, + "proxy-rewrite": { + "uri": "/hello" + } + }, + "upstream": { + "nodes": { + "127.0.0.1:1980": 1 + }, + "type": "roundrobin" + }, + "uri": "/hello" + }]] + ) + + if code >= 300 then + ngx.status = code + end + ngx.say(body) + } + } +--- request +GET /t +--- error_code: 400 +--- response_body eval +qr/validation failed/ +--- no_error_log +[error] + + + +=== TEST 2: set route(without http_status in the abort property) +--- config + location /t { + content_by_lua_block { + local t = require("lib.test_admin").test + local code, body = t('/apisix/admin/routes/1', +ngx.HTTP_PUT, +[[{ + "plugins": { + "fault-injection": { + "abort": { + } + }, + "proxy-rewrite": { + "uri": "/hello" + } + }, + "upstream": { + "nodes": { + "127.0.0.1:1980": 1 + }, + "type": "roundrobin" + }, + "uri": "/hello" + }]] + ) + + if code >= 300 then + ngx.status = code + end + ngx.say(body) + } + } +--- request +GET /t +--- error_code: 400 +--- response_body eval +qr/validation failed/ +--- no_error_log +[error] + + + +=== TEST 3: set route(without abort & delay properties) +--- config + location /t { + content_by_lua_block { + local t = require("lib.test_admin").test + local code, body = t('/apisix/admin/routes/1', +ngx.HTTP_PUT, +[[{ + "plugins": { + "fault-injection": { + }, + "proxy-rewrite": { + "uri": "/hello" + } + }, + "upstream": { + "nodes": { + "127.0.0.1:1980": 1 + }, +
[GitHub] [incubator-apisix] moonming closed issue #1003: add readonly tips in nginx.conf
moonming closed issue #1003: add readonly tips in nginx.conf URL: https://github.com/apache/incubator-apisix/issues/1003 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-apisix] moonming commented on issue #1003: add readonly tips in nginx.conf
moonming commented on issue #1003: add readonly tips in nginx.conf URL: https://github.com/apache/incubator-apisix/issues/1003#issuecomment-573488784 thx @wtt20 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-apisix] wtt20 commented on issue #1003: add readonly tips in nginx.conf
wtt20 commented on issue #1003: add readonly tips in nginx.conf URL: https://github.com/apache/incubator-apisix/issues/1003#issuecomment-573486435 #1040 Done~ 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-apisix] agile6v opened a new pull request #1042: feature: introduce the fault-injection plugin.
agile6v opened a new pull request #1042: feature: introduce the fault-injection plugin. URL: https://github.com/apache/incubator-apisix/pull/1042 ### Issues resolved Fix #1038 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: us...@infra.apache.org With regards, Apache Git Services
[incubator-apisix] branch master updated: plugin(proxy-rewrite): using schema pattern to check if uri option starts with / in proxy-rewrite plugin. (#1041)
This is an automated email from the ASF dual-hosted git repository. membphis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-apisix.git The following commit(s) were added to refs/heads/master by this push: new 70ff4a5 plugin(proxy-rewrite): using schema pattern to check if uri option starts with / in proxy-rewrite plugin. (#1041) 70ff4a5 is described below commit 70ff4a556d3b0c37c196ce3e3a672b34cd188a59 Author: agile6v AuthorDate: Sun Jan 12 16:35:05 2020 +0800 plugin(proxy-rewrite): using schema pattern to check if uri option starts with / in proxy-rewrite plugin. (#1041) --- lua/apisix/plugin.lua| 2 +- lua/apisix/plugins/proxy-rewrite.lua | 10 ++ t/plugin/proxy-rewrite.t | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lua/apisix/plugin.lua b/lua/apisix/plugin.lua index 969ecb1..0a6b17a 100644 --- a/lua/apisix/plugin.lua +++ b/lua/apisix/plugin.lua @@ -138,7 +138,7 @@ local function load_stream() local plugin_names = local_conf.stream_plugins if not plugin_names then -core.log.warn("failed to read stream plugin list form local file") +core.log.warn("failed to read stream plugin list from local file") return true end diff --git a/lua/apisix/plugins/proxy-rewrite.lua b/lua/apisix/plugins/proxy-rewrite.lua index ab0e593..cc1af62 100644 --- a/lua/apisix/plugins/proxy-rewrite.lua +++ b/lua/apisix/plugins/proxy-rewrite.lua @@ -21,7 +21,6 @@ local ipairs = ipairs local ngx = ngx local type= type local re_sub = ngx.re.sub -local str_sub = string.sub local schema = { @@ -31,7 +30,8 @@ local schema = { description = "new uri for upstream", type= "string", minLength = 1, -maxLength = 4096 +maxLength = 4096, +pattern = "^/.*", }, regex_uri = { description = "new uri that substitute from client uri " .. @@ -92,12 +92,6 @@ function _M.check_schema(conf) end end -if conf.uri ~= nil then -if str_sub(conf.uri, 1, 1) ~= "/" then -return false, "invalid uri(" .. conf.uri .. "), must start with /." -end -end - --reform header from object into array, so can avoid use pairs, which is NYI if conf.headers then conf.headers_arr = {} diff --git a/t/plugin/proxy-rewrite.t b/t/plugin/proxy-rewrite.t index 832a197..f7e7afd 100644 --- a/t/plugin/proxy-rewrite.t +++ b/t/plugin/proxy-rewrite.t @@ -1003,6 +1003,6 @@ invalid capturing variable name found GET /t --- error_code: 400 --- response_body eval -qr/invalid uri/ +qr/failed to match pattern/ --- no_error_log [error]
[GitHub] [incubator-apisix] membphis merged pull request #1041: enhancement: using schema pattern to check if uri option starts with / in proxy-rewrite plugin.
membphis merged pull request #1041: enhancement: using schema pattern to check if uri option starts with / in proxy-rewrite plugin. URL: https://github.com/apache/incubator-apisix/pull/1041 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: us...@infra.apache.org With regards, Apache Git Services