[GitHub] [apisix-dashboard] wangxunfan commented on issue #623: apisix-dashboard 403 Forbidden

2020-10-29 Thread GitBox


wangxunfan commented on issue #623:
URL: 
https://github.com/apache/apisix-dashboard/issues/623#issuecomment-719228934


   @juzhiyuan thanks,“deploy.md” file is very deatailed. Successfully deployed.



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




[GitHub] [apisix] nic-chen commented on issue #2565: support include other nginx config in the apisix(lua file)

2020-10-29 Thread GitBox


nic-chen commented on issue #2565:
URL: https://github.com/apache/apisix/issues/2565#issuecomment-719181158


   > I will vote for ingress-nginx's snippet feature: 
   > 
   > 
https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#configuration-snippet
   > 
   > 
   > 
   > This feature can be configured directly in the yaml file.
   
   agree +1



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




[GitHub] [apisix] moonming opened a new issue #2573: request help: support centos 7, centos 8 in CI

2020-10-29 Thread GitBox


moonming opened a new issue #2573:
URL: https://github.com/apache/apisix/issues/2573


   ### Issue description
   
   
   ### Environment
   
   * apisix version (cmd: `apisix version`):
   * OS:



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




[GitHub] [apisix] spacewander merged pull request #2560: doc: Update CHANGELOG_CN.md

2020-10-29 Thread GitBox


spacewander merged pull request #2560:
URL: https://github.com/apache/apisix/pull/2560


   



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




[apisix] branch master updated: Update CHANGELOG_CN.md (#2560)

2020-10-29 Thread spacewander
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 1fb000c  Update CHANGELOG_CN.md (#2560)
1fb000c is described below

commit 1fb000c92e9252c5872a83278cb44652ebdfe4d5
Author: Wen Ming 
AuthorDate: Fri Oct 30 12:31:00 2020 +0800

Update CHANGELOG_CN.md (#2560)
---
 CHANGELOG_CN.md | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md
index d6fb5a9..e44f476 100644
--- a/CHANGELOG_CN.md
+++ b/CHANGELOG_CN.md
@@ -42,7 +42,7 @@
 - 为上游、路由等资源增加更多字段,比如 create_time 和 
update_time。[#2444](https://github.com/apache/apisix/pull/2444)
 - 使用拦截器来保护插件的路由。[#2416](https://github.com/apache/apisix/pull/2416)
 - 支持 http 和 https 监听多个端口。[#2409](https://github.com/apache/apisix/pull/2409)
-- 实现 `core.sleep` 函数。[#2397](https://github.com/apache/apisix/pull/2397]
+- 实现 `core.sleep` 函数。[#2397](https://github.com/apache/apisix/pull/2397)
 
 ## Plugin
 - :sunrise: **增加 AK/SK(HMAC) 
认证插件。**[#2192](https://github.com/apache/apisix/pull/2192)
@@ -52,10 +52,10 @@
 - http-logger 插件支持通过 admin API 
来指定文件格式。[#2309](https://github.com/apache/apisix/pull/2309)
 
 ## Bugfix
-- :bug: **`高优先级`** 
当数据平面接收到删除某一个资源(路由、上游等)的指令时,没有正确的清理缓存,导致存在的资源也会找不到。这个问题在长时间、频繁删除操作的情况下才会出现。(#2168)[https://github.com/apache/apisix/pull/2168]
-- 修复路由优先级不生效的问题。(#2447)[https://github.com/apache/apisix/pull/2447]
-- 在 `init_worker` 阶段设置随机数, 而不是 `init` 
阶段。(#2357)[https://github.com/apache/apisix/pull/2357]
-- 删除 jwt 插件中不支持的算法。(#2356)[https://github.com/apache/apisix/pull/2356]
+- :bug: **`高优先级`** 
当数据平面接收到删除某一个资源(路由、上游等)的指令时,没有正确的清理缓存,导致存在的资源也会找不到。这个问题在长时间、频繁删除操作的情况下才会出现。[#2168](https://github.com/apache/apisix/pull/2168)
+- 修复路由优先级不生效的问题。[#2447](https://github.com/apache/apisix/pull/2447)
+- 在 `init_worker` 阶段设置随机数, 而不是 `init` 
阶段。[#2357](https://github.com/apache/apisix/pull/2357)
+- 删除 jwt 插件中不支持的算法。[#2356](https://github.com/apache/apisix/pull/2356)
 - 当重定向插件的 `http_to_https` 
开启时,返回正确的响应码。[#2311](https://github.com/apache/apisix/pull/2311)
 
 更多的变动可以参考[里程碑](https://github.com/apache/apisix/milestone/7)



[GitHub] [apisix] spacewander commented on issue #2565: support include other nginx config in the apisix(lua file)

2020-10-29 Thread GitBox


spacewander commented on issue #2565:
URL: https://github.com/apache/apisix/issues/2565#issuecomment-719163843


   I will vote for ingress-nginx's snippet feature: 
   
https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#configuration-snippet
   
   This feature can be configured directly in the yaml file.



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




[GitHub] [apisix-dashboard] thekingofworld edited a comment on issue #646: request help: let custom plugin show in dashboard

2020-10-29 Thread GitBox


thekingofworld edited a comment on issue #646:
URL: 
https://github.com/apache/apisix-dashboard/issues/646#issuecomment-719163126


   @juzhiyuan   here is output, seems like need a Authentication.
   
![image](https://user-images.githubusercontent.com/8169665/97659798-e0033080-1aaa-11eb-8780-47d109a019fd.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:
us...@infra.apache.org




[GitHub] [apisix-dashboard] thekingofworld commented on issue #646: request help: let custom plugin show in dashboard

2020-10-29 Thread GitBox


thekingofworld commented on issue #646:
URL: 
https://github.com/apache/apisix-dashboard/issues/646#issuecomment-719163126


   @juzhiyuan 
   
![image](https://user-images.githubusercontent.com/8169665/97659798-e0033080-1aaa-11eb-8780-47d109a019fd.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:
us...@infra.apache.org




[GitHub] [apisix] tzssangglass commented on issue #2565: support include other nginx config in the apisix(lua file)

2020-10-29 Thread GitBox


tzssangglass commented on issue #2565:
URL: https://github.com/apache/apisix/issues/2565#issuecomment-719163225


   You mean like the nginx_http_include directive from kong?
   
   ```
   nginx_http_include = /path/to/your/extend.conf
   ```
   
   the `extend.conf` may be like 
   
   ```conf
   lua_shared_dict custom_plugin_a_cache 8m;
   lua_shared_dict custom_plugin_b_cache 8m;
   ```
   
   then this configuration will appear in the `nginx.conf`
   



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




[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #612: test: add e2e test for field hosts in `route` api

2020-10-29 Thread GitBox


juzhiyuan commented on a change in pull request #612:
URL: https://github.com/apache/apisix-dashboard/pull/612#discussion_r514829914



##
File path: api/test/e2e/route_test.go
##
@@ -0,0 +1,164 @@
+/*
+ * 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.
+ */
+package e2e
+
+import (
+   "net/http"
+   "testing"
+   "time"
+)
+
+func TestRoute_Host(t *testing.T) {
+
+   //create route use hosts
+MangerApiExpect(t).PUT("/apisix/admin/routes/r1").WithText(`{
+"uri": "/hello_",
+"hosts": ["foo.com", "*.bar.com"],
+"upstream": {
+"nodes": {
+"172.16.238.120:1980": 1
+},
+"type": "roundrobin"
+}
+}`).
+   WithHeader("Authorization", accessToken).
+   Expect().
+   Status(http.StatusOK)
+
+   //sleep
+   time.Sleep(time.Duration(100) * time.Millisecond)
+
+   //hit route -- not found
+   APISIXExpect(t).GET("/not_found").
+   Expect().
+   Status(http.StatusNotFound)
+
+   //hit route -- not found, wrong host
+   APISIXExpect(t).GET("/hello_").
+   WithHeader("Host", "not_found.com").
+   Expect().
+   Status(http.StatusNotFound)
+
+   //hit route - ok
+   APISIXExpect(t).GET("/hello_").
+   WithHeader("Host", "foo.com").
+   Expect().
+   Status(http.StatusOK)
+
+   //create route  -- invalid hosts
+   MangerApiExpect(t).PUT("/apisix/admin/routes/r2").WithText(`{
+"uri": "/hello_",
+"hosts": ["$%$foo.com", "*.bar.com"],
+"upstream": {
+"nodes": {
+"172.16.238.120:1980": 1
+},
+"type": "roundrobin"
+}
+}`).

Review comment:
   We may use some tools to lint those files automatically, cc @nic-chen 
   
   [1] https://golangci-lint.run/





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




[GitHub] [apisix-dashboard] membphis commented on a change in pull request #612: test: add e2e test for field hosts in `route` api

2020-10-29 Thread GitBox


membphis commented on a change in pull request #612:
URL: https://github.com/apache/apisix-dashboard/pull/612#discussion_r514822176



##
File path: api/go.sum
##
@@ -1,43 +1,14 @@
-cloud.google.com/go v0.34.0/go.mod 
h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=

Review comment:
   why we delete so many dependency libraries? 
   
   they are only used for testing?

##
File path: api/test/e2e/route_test.go
##
@@ -0,0 +1,164 @@
+/*
+ * 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.
+ */
+package e2e
+
+import (
+   "net/http"
+   "testing"
+   "time"
+)
+
+func TestRoute_Host(t *testing.T) {
+
+   //create route use hosts

Review comment:
   bad indentation

##
File path: .github/workflows/deploy-api.yml
##
@@ -0,0 +1,60 @@
+name: Deploy API to Azure
+
+on:

Review comment:
   one PR for one thing, for E2E test, I think we do not need to update 
`deploy-api.yml`, all right?

##
File path: api/test/e2e/route_test.go
##
@@ -0,0 +1,164 @@
+/*
+ * 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.
+ */
+package e2e
+
+import (
+   "net/http"
+   "testing"
+   "time"
+)
+
+func TestRoute_Host(t *testing.T) {
+
+   //create route use hosts
+MangerApiExpect(t).PUT("/apisix/admin/routes/r1").WithText(`{
+"uri": "/hello_",
+"hosts": ["foo.com", "*.bar.com"],
+"upstream": {
+"nodes": {
+"172.16.238.120:1980": 1
+},
+"type": "roundrobin"
+}
+}`).
+   WithHeader("Authorization", accessToken).
+   Expect().
+   Status(http.StatusOK)
+
+   //sleep
+   time.Sleep(time.Duration(100) * time.Millisecond)
+
+   //hit route -- not found
+   APISIXExpect(t).GET("/not_found").
+   Expect().
+   Status(http.StatusNotFound)
+
+   //hit route -- not found, wrong host
+   APISIXExpect(t).GET("/hello_").
+   WithHeader("Host", "not_found.com").
+   Expect().
+   Status(http.StatusNotFound)
+
+   //hit route - ok
+   APISIXExpect(t).GET("/hello_").
+   WithHeader("Host", "foo.com").
+   Expect().
+   Status(http.StatusOK)
+
+   //create route  -- invalid hosts
+   MangerApiExpect(t).PUT("/apisix/admin/routes/r2").WithText(`{
+"uri": "/hello_",
+"hosts": ["$%$foo.com", "*.bar.com"],
+"upstream": {
+"nodes": {
+"172.16.238.120:1980": 1
+},
+"type": "roundrobin"
+}
+}`).

Review comment:
   bad indentation? if yes, please fix other similar points





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




[GitHub] [apisix-docker] hfhimage opened a new issue #82: request help: can not find apache/apisix:2.0-alpine image in dockerhub

2020-10-29 Thread GitBox


hfhimage opened a new issue #82:
URL: https://github.com/apache/apisix-docker/issues/82


   ### Issue description
   I can't find apache/apisix:2.0-alpine in hub.docker.com after Apisix 2.0 
released. So I wonder if it's much more recommend to use centos version instead 
of alpine version in production environment.
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 2.0
   * OS:
   



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




[GitHub] [apisix-dashboard] juzhiyuan opened a new issue #647: Support deploy with Docker

2020-10-29 Thread GitBox


juzhiyuan opened a new issue #647:
URL: https://github.com/apache/apisix-dashboard/issues/647


   TODO



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




[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #612: test: add e2e test for field hosts in `route` api

2020-10-29 Thread GitBox


juzhiyuan commented on a change in pull request #612:
URL: https://github.com/apache/apisix-dashboard/pull/612#discussion_r514812818



##
File path: .github/workflows/test-api.yml
##
@@ -42,8 +42,9 @@ jobs:
   sudo apt install golang-1.14-go
 
   - name: run test
+

Review comment:
   remove this line

##
File path: api/test/e2e/route_test.go
##
@@ -0,0 +1,164 @@
+/*
+ * 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.
+ */
+package e2e
+
+import (
+   "net/http"
+   "testing"
+   "time"
+)
+
+func TestRoute_Host(t *testing.T) {
+
+   //create route use hosts
+   MangerApiExpect(t).PUT("/apisix/admin/routes/r1").WithText(`{
+"uri": "/hello_",
+"hosts": ["foo.com", "*.bar.com"],
+"upstream": {
+"nodes": {
+"172.16.238.120:1980": 1
+},
+"type": "roundrobin"
+}
+}`).

Review comment:
   done?

##
File path: .github/workflows/deploy-api.yml
##
@@ -0,0 +1,60 @@
+name: Deploy API to Azure
+
+on:

Review comment:
   Do we still need this action? I'm rewriting the Dockerfile so that we 
could use only 1 container to deploy both backend and frontend.

##
File path: .github/workflows/e2e-test-backend.yml
##
@@ -0,0 +1,49 @@
+name: Backend E2E Test
+
+on:
+  push:
+branches:
+  - master
+  pull_request:
+branches:
+  - master

Review comment:
   We could add v2.0 here to trigger test





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




[GitHub] [apisix] hfhimage opened a new issue #2572: request help: can not find apache/apisix:2.0-alpine image in dockerhub

2020-10-29 Thread GitBox


hfhimage opened a new issue #2572:
URL: https://github.com/apache/apisix/issues/2572


   ### Issue description
   I can't find apache/apisix:2.0-alpine in hub.docker.com after Apisix 2.0 
released. So I wonder if it's much more recommend to use centos version instead 
of alpine version in production environment.
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 2.0
   * OS:
   



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




[GitHub] [apisix-dashboard] juzhiyuan commented on issue #646: request help: let custom plugin show in dashboard

2020-10-29 Thread GitBox


juzhiyuan commented on issue #646:
URL: 
https://github.com/apache/apisix-dashboard/issues/646#issuecomment-719157575


   BTW, please use the latest dashboard 2.0 RC2 to have a test.
   
   https://github.com/apache/apisix-dashboard/blob/v2.0/docs/deploy.md



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




[GitHub] [apisix] idbeta commented on issue #2501: [discuss]: How to distinguish whether the 5xx status code (eg 500) comes from upstream or apisix

2020-10-29 Thread GitBox


idbeta commented on issue #2501:
URL: https://github.com/apache/apisix/issues/2501#issuecomment-719157283


   I agree with the idea of adding a new field in the response header.



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




[GitHub] [apisix-dashboard] juzhiyuan commented on issue #646: request help: let custom plugin show in dashboard

2020-10-29 Thread GitBox


juzhiyuan commented on issue #646:
URL: 
https://github.com/apache/apisix-dashboard/issues/646#issuecomment-719157222


   Hi, please follow those steps to have a check first:
   
   1. Get all plugin list
   
   ```sh
   $ curl $API_HOST/apisix/admin/plugins
   ```
   
   2. Check if your `cgi-proxy` plugin is included in that list.
   
   Looking forward to your feedback.



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




[GitHub] [apisix-dashboard] thekingofworld opened a new issue #646: request help: let custom plugin show in dashboard

2020-10-29 Thread GitBox


thekingofworld opened a new issue #646:
URL: https://github.com/apache/apisix-dashboard/issues/646


   ### Issue description
   I have added a custom plugin, how to let the custom plugin show in dashboard?
   
![image](https://user-images.githubusercontent.com/8169665/97656163-c4dff300-1aa1-11eb-8b17-4f4e6f48ea06.png)
   
   
![image](https://user-images.githubusercontent.com/8169665/97656238-f35dce00-1aa1-11eb-977c-a6c1e5525752.png)
   
   thx for help.
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): `2.0`
   * OS: `mac os`
   



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




[GitHub] [apisix] nanamikon edited a comment on issue #2565: support include other nginx config in the apisix(lua file)

2020-10-29 Thread GitBox


nanamikon edited a comment on issue #2565:
URL: https://github.com/apache/apisix/issues/2565#issuecomment-719153151


   Sure!
   For example
   
   Third-party nginx module param 
   ``` 
   req_status_zone host "$server_name" 200M;
   req_status_zone hostadr "$server_name:$upstream_addr" 200M;
   req_status host hostadr;
   req_status_lazy on;
   
   server
   {
   listen 45651;
   server_name _;
   access_log off;
   
   location /ysec_status {
   req_status_show;
   allow 127.0.0.1;
   deny all;
   }
   }
   ```
   
   
   Other not support nginx param
   ```
   gzip on;
   gzip_comp_level  6;
   gzip_min_length  1k;
   gzip_buffers 4 8k;
   gzip_disable "MSIE [1-6]\.(?!.*SV1)";
   gzip_types   text/plain application/x-javascript text/css 
application/xml text/javascript application/javascript application/json;
   ``` 



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




[GitHub] [apisix] nanamikon edited a comment on issue #2565: support include other nginx config in the apisix(lua file)

2020-10-29 Thread GitBox


nanamikon edited a comment on issue #2565:
URL: https://github.com/apache/apisix/issues/2565#issuecomment-719153151


   Sure!
   For example
   
   Third-party nginx module param 
   ``` 
   req_status_zone host "$server_name" 200M;
   req_status_zone hostadr "$server_name:$upstream_addr" 200M;
   req_status host hostadr;
   req_status_lazy on;
   
   server
   {
   listen 45651;
   server_name _;
   access_log off;
   
   location /ysec_status {
   req_status_show;
   allow 127.0.0.1;
   deny all;
   }
   }
   ```
   
   
   Other not support nginx param
   ```
   gzip on;
gzip_comp_level  6;
gzip_min_length  1k;
gzip_buffers 4 8k;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_types   text/plain application/x-javascript text/css 
application/xml text/javascript application/javascript application/json;
   ``` 



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




[GitHub] [apisix] nanamikon commented on issue #2565: support include other nginx config in the apisix(lua file)

2020-10-29 Thread GitBox


nanamikon commented on issue #2565:
URL: https://github.com/apache/apisix/issues/2565#issuecomment-719153151


   Sure!
   For example
   ```
   req_status_zone host "$server_name" 200M;
   req_status_zone hostadr "$server_name:$upstream_addr" 200M;
   req_status host hostadr;
   req_status_lazy on;
   
   server
   {
   listen 45651;
   server_name _;
   access_log off;
   
   location /ysec_status {
   req_status_show;
   allow 127.0.0.1;
   deny all;
   }
   }
   ```



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




[GitHub] [apisix] starsz commented on a change in pull request #2566: chore: move try_read_attr function into table.lua (#2257)

2020-10-29 Thread GitBox


starsz commented on a change in pull request #2566:
URL: https://github.com/apache/apisix/pull/2566#discussion_r514788575



##
File path: apisix/plugins/hmac-auth.lua
##
@@ -328,7 +312,7 @@ local function get_params(ctx)
 local date_key = DATE_KEY
 local signed_headers_key = SIGNED_HEADERS_KEY
 
-if try_attr(local_conf, "plugin_attr", "hmac-auth") then
+if core.table.try_read_attr(local_conf, "plugin_attr", "hmac-auth") then
 local attr = local_conf.plugin_attr["hmac-auth"]

Review comment:
   OK. I had fixed.

##
File path: apisix/plugins/log-rotate.lua
##
@@ -152,25 +150,11 @@ local function scan_log_folder()
 end
 
 
-local function try_attr(t, ...)
-local count = select('#', ...)
-for i = 1, count do
-local attr = select(i, ...)
-t = t[attr]
-if type(t) ~= "table" then
-return false
-end
-end
-
-return true
-end
-
-
 local function rotate()
 local local_conf = core.config.local_conf()
 local interval = INTERVAL
 local max_kept = MAX_KEPT
-if try_attr(local_conf, "plugin_attr", "log-rotate") then
+if core.table.try_read_attr(local_conf, "plugin_attr", "log-rotate") then
 local attr = local_conf.plugin_attr["log-rotate"]

Review comment:
   OK. I had fixed.





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




[GitHub] [apisix-dashboard] juzhiyuan commented on a change in pull request #619: feat: added e2e test for Login page

2020-10-29 Thread GitBox


juzhiyuan commented on a change in pull request #619:
URL: https://github.com/apache/apisix-dashboard/pull/619#discussion_r514773085



##
File path: src/e2e/Login.e2e.js
##
@@ -1,33 +1,69 @@
+/*
+ * 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.
+ */
+
 /* eslint-disable import/no-extraneous-dependencies */
 const puppeteer = require('puppeteer');
 
 let browser;
+const BASE_URL = `http://localhost:${process.env.PORT || 8000}`;
+const domSelectors = {
+  inputUserName: '#control-ref_username',
+  inputPassWord: '#control-ref_password',
+  buttonLogin: '.ant-btn-lg',
+  notificationNotice: '.ant-notification-notice',
+  notificationLogin: '.ant-notification-notice-description',
+};
+const loginFailedDatas = {
+  userName: 'admin',
+  passWord: '123456',

Review comment:
   should be `password` in lowercase
   
   `inputPassWord: '#control-ref_password'`

##
File path: src/e2e/Login.e2e.js
##
@@ -1,33 +1,69 @@
+/*
+ * 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.
+ */
+
 /* eslint-disable import/no-extraneous-dependencies */
 const puppeteer = require('puppeteer');
 
 let browser;
+const BASE_URL = `http://localhost:${process.env.PORT || 8000}`;
+const domSelectors = {
+  inputUserName: '#control-ref_username',
+  inputPassWord: '#control-ref_password',
+  buttonLogin: '.ant-btn-lg',
+  notificationNotice: '.ant-notification-notice',
+  notificationLogin: '.ant-notification-notice-description',
+};
+const loginFailedDatas = {
+  userName: 'admin',

Review comment:
   should be `username` because of `inputUserName: '#control-ref_username'`

##
File path: package.json
##
@@ -73,6 +74,7 @@
 "react-device-detect": "^1.12.1",
 "react-dom": "^16.8.6",
 "react-helmet-async": "^1.0.4",
+"start-server-and-test": "^1.11.5",

Review comment:
   What's license?

##
File path: src/e2e/README.md
##
@@ -0,0 +1,41 @@
+
+
+### Writing test cases
+
+1. Installing dependencies and running local development environments
+
+   ```Bash

Review comment:
   sh

##
File path: package.json
##
@@ -73,6 +74,7 @@
 "react-device-detect": "^1.12.1",
 "react-dom": "^16.8.6",
 "react-helmet-async": "^1.0.4",
+"start-server-and-test": "^1.11.5",

Review comment:
   MIT

##
File path: src/e2e/Login.e2e.js
##
@@ -1,33 +1,69 @@
+/*
+ * 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.
+ */
+
 /* eslint-disable import/no-extraneous-dependencies */
 const puppeteer = require('puppeteer');
 
 let browser;
+const BASE_URL = `http://localhost:${process.env.PORT || 8000}`;

Review comment:
   why 8000?

##
File path: src/e2e/Login.e2e.js
##
@@ -1,33 

[GitHub] [apisix-dashboard] LiteSun opened a new issue #645: requirement: add e2e test for Login & Logout

2020-10-29 Thread GitBox


LiteSun opened a new issue #645:
URL: https://github.com/apache/apisix-dashboard/issues/645


   - [ ] login: correct and incorrect password/username 
   - [ ] logout
   
   related issue #614 



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




[GitHub] [apisix-dashboard] LiteSun opened a new issue #644: requirement: add e2e test for Setting

2020-10-29 Thread GitBox


LiteSun opened a new issue #644:
URL: https://github.com/apache/apisix-dashboard/issues/644


   Setting
page jump:
set grafana address:
   
   related issue #614 



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




[GitHub] [apisix] jeffguorg commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed

2020-10-29 Thread GitBox


jeffguorg commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719150249


   @membphis solution confirmed. i recreated the cluster and reconfigured 
apisix and it works like a charm. 
   
   still... do you have any plan to backport the patch to 1.x branch? 



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




[GitHub] [apisix-dashboard] LiteSun opened a new issue #643: requirement: add e2e test for Consumer

2020-10-29 Thread GitBox


LiteSun opened a new issue #643:
URL: https://github.com/apache/apisix-dashboard/issues/643


   Consumer
   - [ ] create: not enable authentication plugin, create the same name consumer
   - [ ] edit:
   - [ ] delete:
   
   related issue #614 



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




[GitHub] [apisix] starsz commented on issue #2569: CI: line is too line

2020-10-29 Thread GitBox


starsz commented on issue #2569:
URL: https://github.com/apache/apisix/issues/2569#issuecomment-719149362


   Okay, I follow the decision of the community. Hmmm.



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




[GitHub] [apisix-dashboard] LiteSun opened a new issue #642: requirement: add e2e test for Upstream

2020-10-29 Thread GitBox


LiteSun opened a new issue #642:
URL: https://github.com/apache/apisix-dashboard/issues/642


   Upstream
   - [ ] create: long description and  name include common symbols
   - [ ] edit:
   - [ ] delete:
   - [ ] search: full match, partial match, no match
   - [ ] big data environment test: upstream operation under more than 200 
upstream
   
   related issue #614 



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




[GitHub] [apisix] RocFang closed issue #2568: bug: uri-blocker's code and doc are confusing

2020-10-29 Thread GitBox


RocFang closed issue #2568:
URL: https://github.com/apache/apisix/issues/2568


   



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




[GitHub] [apisix] RocFang commented on issue #2568: bug: uri-blocker's code and doc are confusing

2020-10-29 Thread GitBox


RocFang commented on issue #2568:
URL: https://github.com/apache/apisix/issues/2568#issuecomment-719148739


   @idbeta sorry, my mistake, ignore it:)



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




[GitHub] [apisix-dashboard] LiteSun opened a new issue #641: requirement: added e2e test for SSL

2020-10-29 Thread GitBox


LiteSun opened a new issue #641:
URL: https://github.com/apache/apisix-dashboard/issues/641


   SSL
   - [ ] enter correct certificate and private key:
   - [ ] enter unmatched certificate and private key:
   - [ ] upload correct certificate and private key:
   - [ ] upload unmatched certificate and private key:
   
   related issue #614 



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




[GitHub] [apisix] tokers commented on pull request #2548: feat: support TLS connection with etcd.

2020-10-29 Thread GitBox


tokers commented on pull request #2548:
URL: https://github.com/apache/apisix/pull/2548#issuecomment-719148269


   > > I think we can also use the etcd proxy localily as an interim solution
   > > [Apache APISIX -> etcd proxy(cert) ]--http mTLS-->[etcd]
   > 
   > Do you means add sidecar for etcd proxy(cert)?
   
   I think not the sidecar but a "central bus", a bunch of etcd proxy instances 
to deligate the backend etcd cluster. Actually it loses the real effect to use 
client certificate auth, since the proxy can be accessed by any users.



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




[GitHub] [apisix] tokers edited a comment on pull request #2548: feat: support TLS connection with etcd.

2020-10-29 Thread GitBox


tokers edited a comment on pull request #2548:
URL: https://github.com/apache/apisix/pull/2548#issuecomment-719148269


   > > I think we can also use the etcd proxy localily as an interim solution
   > > [Apache APISIX -> etcd proxy(cert) ]--http mTLS-->[etcd]
   > 
   > Do you means add sidecar for etcd proxy(cert)?
   
   I think not the sidecar but a "central bus", a bunch of etcd proxy instances 
to delegate the backend etcd cluster.
   Actually it loses the real effect to use client certificate auth, since the 
proxy can be accessed by any users.



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




[GitHub] [apisix-dashboard] LiteSun opened a new issue #640: requirement: added e2e test for Route

2020-10-29 Thread GitBox


LiteSun opened a new issue #640:
URL: https://github.com/apache/apisix-dashboard/issues/640


   Route
   - [ ] create: long description and  name include common symbols
   - [ ] edit:
   - [ ] delete:
   - [ ] search: full match, partial match, no match
   - [ ] big data environment test: route operation under more than 200 routes
   
   related issue  #614 



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




[GitHub] [apisix] thekingofworld commented on issue #2571: request help: let custom plugin show in dashboard

2020-10-29 Thread GitBox


thekingofworld commented on issue #2571:
URL: https://github.com/apache/apisix/issues/2571#issuecomment-719148060


   The plugin has been configured.
   
![image](https://user-images.githubusercontent.com/8169665/97656378-4df72a00-1aa2-11eb-8d47-21c8c77becba.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:
us...@infra.apache.org




[GitHub] [apisix] thekingofworld opened a new issue #2571: request help: let custom plugin show in dashboard

2020-10-29 Thread GitBox


thekingofworld opened a new issue #2571:
URL: https://github.com/apache/apisix/issues/2571


   ### Issue description
   I have added a custom plugin, how to let the custom plugin show in dashboard?
   
![image](https://user-images.githubusercontent.com/8169665/97656163-c4dff300-1aa1-11eb-8b17-4f4e6f48ea06.png)
   
   
![image](https://user-images.githubusercontent.com/8169665/97656238-f35dce00-1aa1-11eb-977c-a6c1e5525752.png)
   
   thx for help.
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): `2.0`
   * OS: `mac os`
   



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




[GitHub] [apisix-dashboard] LiteSun opened a new issue #639: requirement: added e2e test for Metrics

2020-10-29 Thread GitBox


LiteSun opened a new issue #639:
URL: https://github.com/apache/apisix-dashboard/issues/639


   - [ ] page jump
   



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




[GitHub] [apisix] spacewander opened a new pull request #2570: chore: update CODE_STYLE to catch up with the reality

2020-10-29 Thread GitBox


spacewander opened a new pull request #2570:
URL: https://github.com/apache/apisix/pull/2570


   Currently we already have the line length style check in lj-releng. The
   length we chose is 100.
   
   Close #2569.
   
   ### What this PR does / why we need it:
   
   
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features 
have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible?
   



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




[GitHub] [apisix] spacewander commented on issue #2569: CI: line is too line

2020-10-29 Thread GitBox


spacewander commented on issue #2569:
URL: https://github.com/apache/apisix/issues/2569#issuecomment-719145762


   @starsz 
   Currently we already have the line length style check in `lj-releng`. The 
length we chose is 100.



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




[GitHub] [apisix] thekingofworld closed issue #2542: request help: configure route to only execute plugins

2020-10-29 Thread GitBox


thekingofworld closed issue #2542:
URL: https://github.com/apache/apisix/issues/2542


   



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




[GitHub] [apisix] wfgydbu commented on issue #2520: bug: "failed to acquire the lock: timeout" in logs/error.log when setuping route at the first time

2020-10-29 Thread GitBox


wfgydbu commented on issue #2520:
URL: https://github.com/apache/apisix/issues/2520#issuecomment-719145137


   @spacewander 
   ```
   [root@node10 apisix]# uptime
11:10:16 up 139 days, 17:03,  5 users,  load average: 1.17, 1.15, 1.26
   [root@node10 apisix]# grep -c 'model name' /proc/cpuinfo
   32
   ```
   
   Thanks for helping!
   
   If we bypass the lock, what is the purpose of this patch: 
https://github.com/apache/apisix/pull/1486
   What's the side effect?
   
   



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




[GitHub] [apisix] idbeta commented on issue #2568: bug: uri-blocker's code and doc are confusing

2020-10-29 Thread GitBox


idbeta commented on issue #2568:
URL: https://github.com/apache/apisix/issues/2568#issuecomment-719145049


   Can you write more details about regular expressions that go wrong? That 
would be very helpful



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




[GitHub] [apisix] tokers commented on issue #2569: CI: line is too line

2020-10-29 Thread GitBox


tokers commented on issue #2569:
URL: https://github.com/apache/apisix/issues/2569#issuecomment-719144786


   The specification of 80 characters forces programmer to design concise 
variable name, function name and literals, I don't think it makes the code more 
awkward to read (if so, community can refactor it :) ),  so i think we should 
obey the code style specification.



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




[GitHub] [apisix] idbeta commented on issue #2569: CI: line is too line

2020-10-29 Thread GitBox


idbeta commented on issue #2569:
URL: https://github.com/apache/apisix/issues/2569#issuecomment-719143124


   I agree that 80 characters are enough most of the time, but sometimes 80 
characters seem a little bit short and make the code more awkward to read, just 
for python.



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




[GitHub] [apisix] starsz opened a new issue #2569: CI: line is too line

2020-10-29 Thread GitBox


starsz opened a new issue #2569:
URL: https://github.com/apache/apisix/issues/2569


   Hi, while I am reading the code, I found that some lines are too long (More 
than eighty characters).
   
   As the 
[CODE_STYLE.md](https://github.com/apache/apisix/blob/master/CODE_STYLE.md#maximum-length-per-line)
 said.
   
   > Each line cannot exceed 80 characters. If it exceeds, you need to wrap and 
align:
   
   I recommend adding `--max-line-length 80` into luacheck, and fix all the 
lines exceed 80 characters.



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




[GitHub] [apisix] spacewander commented on issue #2520: bug: "failed to acquire the lock: timeout" in logs/error.log when setuping route at the first time

2020-10-29 Thread GitBox


spacewander commented on issue #2520:
URL: https://github.com/apache/apisix/issues/2520#issuecomment-719139512


   @wfgydbu 
   What was the CPU usage and loadavg when the `failed to acquire` error 
happened?
   
   The difference between v1.5 and v1.2 which causes the issue is that v1.5 
introduce a lock to limit the concurrency. This limitation is to protect 
backend services, but the schema check doesn't interact with any backend 
services, so we can add a new option to bypass lock in the lrucache.



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




[GitHub] [apisix] Miss-you commented on issue #2554: request help: abnormal output after using echo plugin

2020-10-29 Thread GitBox


Miss-you commented on issue #2554:
URL: https://github.com/apache/apisix/issues/2554#issuecomment-719138194


   > @spacewander It seems that there is still a problem after I use your 
repaired version.
   > 
![image](https://user-images.githubusercontent.com/8169665/97564777-0f209000-1a20-11eb-943d-26bb5a467706.png)
   
   The problem is that the clear_header_as_body_modified function is nil.
   
   I suggest you need to upgrade the apache apisix code, not just the 
`echo.lua` file!



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




[GitHub] [apisix-dashboard] juzhiyuan commented on issue #623: apisix-dashboard 403 Forbidden

2020-10-29 Thread GitBox


juzhiyuan commented on issue #623:
URL: 
https://github.com/apache/apisix-dashboard/issues/623#issuecomment-719134057


   hmmm @wangxunfan, I mean you are using old codes in the master branch, could 
you please have a try on the v2.0 branch?
   
   https://github.com/apache/apisix-dashboard/blob/v2.0/docs/deploy.md



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




[GitHub] [apisix-dashboard] juzhiyuan closed issue #621: requirement: Support custom listening IP and port for manager api

2020-10-29 Thread GitBox


juzhiyuan closed issue #621:
URL: https://github.com/apache/apisix-dashboard/issues/621


   



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




[GitHub] [apisix-dashboard] juzhiyuan edited a comment on issue #615: v2.0-rc2 Build docker image error.

2020-10-29 Thread GitBox


juzhiyuan edited a comment on issue #615:
URL: 
https://github.com/apache/apisix-dashboard/issues/615#issuecomment-719133226


   Deploy with Docker Compose is removed, and we are developing the new 
Dockerfile, so I will close this issue. The new Dockerfile will be added to RC3.



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




[GitHub] [apisix-dashboard] juzhiyuan closed issue #615: v2.0-rc2 Build docker image error.

2020-10-29 Thread GitBox


juzhiyuan closed issue #615:
URL: https://github.com/apache/apisix-dashboard/issues/615


   



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




[GitHub] [apisix-dashboard] juzhiyuan commented on issue #615: v2.0-rc2 Build docker image error.

2020-10-29 Thread GitBox


juzhiyuan commented on issue #615:
URL: 
https://github.com/apache/apisix-dashboard/issues/615#issuecomment-719133226


   Deploy with Docker Compose is removed, and we are developing the new 
Dockerfile, so I will close this issue. The new Dockerfile will be added in RC3.



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




[GitHub] [apisix-dashboard] juzhiyuan commented on issue #621: requirement: Support custom listening IP and port for manager api

2020-10-29 Thread GitBox


juzhiyuan commented on issue #621:
URL: 
https://github.com/apache/apisix-dashboard/issues/621#issuecomment-719133415


   This issue has been resolved in 2.0 RC2



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




[GitHub] [apisix-dashboard] juzhiyuan commented on issue #608: manager服务构建docker镜像使用了可能不稳定的 apisix:master 分支

2020-10-29 Thread GitBox


juzhiyuan commented on issue #608:
URL: 
https://github.com/apache/apisix-dashboard/issues/608#issuecomment-719132807


   The new Dockerfile is under development, so I will close this issue.



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




[GitHub] [apisix-dashboard] juzhiyuan closed issue #608: manager服务构建docker镜像使用了可能不稳定的 apisix:master 分支

2020-10-29 Thread GitBox


juzhiyuan closed issue #608:
URL: https://github.com/apache/apisix-dashboard/issues/608


   



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




[GitHub] [apisix-dashboard] wangxunfan commented on issue #623: apisix-dashboard 403 Forbidden

2020-10-29 Thread GitBox


wangxunfan commented on issue #623:
URL: 
https://github.com/apache/apisix-dashboard/issues/623#issuecomment-719132636


   I found a problem.  
   problem: 404 error , http://192.168.202.127:8080/
   version: apisix-dashboard 2.0 RC2
   file: ./api/run.sh
   detail:  Processing without compilation in run.sh file ,base 
apisix-dashboard 2.0 RC2
   I try to do: 
 cd /app/apisix/dashboard/
 ./api/build.sh
 ./api/run.sh
   
   Reference: 
   
https://github.com/apache/apisix-dashboard/blob/master/docs/deploy.md#build-the-manager-api
   3.Build and Run
   $ ./api/run.sh &



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




[GitHub] [apisix] wfgydbu edited a comment on issue #2520: bug: "failed to acquire the lock: timeout" in logs/error.log when setuping route at the first time

2020-10-29 Thread GitBox


wfgydbu edited a comment on issue #2520:
URL: https://github.com/apache/apisix/issues/2520#issuecomment-719110566


   > It seems that when check the schema of Routes, APISIX tries to fetch the 
schema firstly and compile it, the compilation result will be cached inside a 
LRU cache. The schema creation is exclusive by a Lock. But the creation is 
totally compution and without IO operations, the default timeout for lock:lock 
is 5s, which is almost impossible to be timed out.
   > 
   > @membphis
   
   I've been digging into related code these days.  It looks to me that this 
logic is right. 
   
   I've tested with 32 woker processes by each process having 7 light threads, 
in this situation, one of the 7 threads used to deal with the key 
`/apisix/route` containg only one route(`apisix/route/1`).
   
   My question are: 
   (1) Is it safe to simply increase the default timeout value from 5 to 10 
likely? if not, what cost we would have (i.e. performance reduction)? 
   (2) What will happen when one route fail to be synced from etcd and fail to 
be cached. Will it be synced (successfully this time) again in the next 
iteration?
   
   @membphis @spacewander @tokers Anything will be appreciated.
   
   



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




[GitHub] [apisix] RocFang opened a new issue #2568: bug: uri-blocker's code and doc are confusing

2020-10-29 Thread GitBox


RocFang opened a new issue #2568:
URL: https://github.com/apache/apisix/issues/2568


   ### Issue description
   
   In uri-blocker's doc, we can get every block rule is a independent regular 
expression.
   But in the code, we can find that every rule is concated into a single 
regular expression, so `^` and `$` may not work as expected.
   
   I guess the concating operation instead of literate rule array is for 
performance consideration?
   If so, I think the doc may need some updates for the cenarios mentioned 
above. thanks. @membphis 
   



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




[GitHub] [apisix] nic-chen edited a comment on issue #2565: support include other nginx config in the apisix(lua file)

2020-10-29 Thread GitBox


nic-chen edited a comment on issue #2565:
URL: https://github.com/apache/apisix/issues/2565#issuecomment-719114815


   Could you please show some example?



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




[GitHub] [apisix] tokers commented on a change in pull request #2548: feat: support TLS connection with etcd.

2020-10-29 Thread GitBox


tokers commented on a change in pull request #2548:
URL: https://github.com/apache/apisix/pull/2548#discussion_r514696232



##
File path: apisix/core/config_etcd.lua
##
@@ -472,6 +472,10 @@ function _M.new(key, opts)
 etcd_conf.protocol = "v3"
 etcd_conf.api_prefix = "/v3"
 
+if etcd_conf.tls and etcd_conf.tls then

Review comment:
   Oops, it may because my naughty vim.





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




[GitHub] [apisix-dashboard] juzhiyuan commented on issue #623: apisix-dashboard 403 Forbidden

2020-10-29 Thread GitBox


juzhiyuan commented on issue #623:
URL: 
https://github.com/apache/apisix-dashboard/issues/623#issuecomment-719123478


   > @juzhiyuan
   > 
   > 1. Nginx error.log file printing missing api-key
   >2.Deploy apisix 2. 0 and apisix-dashboard v2.0 rc2 according to the 
document。
   >
https://github.com/apache/apisix-dashboard/blob/master/docs/deploy.md#build-the-frontend
   >
   >3.Ask a question.
   >1)Where is manager-api's dist folder?
   >Reference fragment(deploy.md#build-the-frontend)
   > 2. Move files under dist folder to manager-api's dist folder, then visit 
http://127.0.0.1:8080 in your browser, 8080 is the default listen port of 
manager-api.
   >2)api-key ,Is there a time limit?How to generate  a valid key.
   
   It seems that you are using the wrong link.
   
   https://github.com/apache/apisix-dashboard/blob/v2.0/docs/deploy.md



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




[GitHub] [apisix] ShiningRush commented on a change in pull request #2556: feature:support multi service discovery

2020-10-29 Thread GitBox


ShiningRush commented on a change in pull request #2556:
URL: https://github.com/apache/apisix/pull/2556#discussion_r514690061



##
File path: apisix/discovery/eureka.lua
##
@@ -66,7 +66,8 @@ local _M = {
 
 
 local function service_info()
-local host = local_conf.eureka and local_conf.eureka.host
+local host = local_conf.discovery and
+local_conf.discovery.eureka and local_conf.discovery.eureka.host

Review comment:
   This scenario is unreasonable and will not be supported for now. 
   However, users can still handle this scenario by creating new instances of 
different gateways, I think it is enough.





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




[GitHub] [apisix] jeffguorg edited a comment on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed

2020-10-29 Thread GitBox


jeffguorg edited a comment on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719119397


   setting resolv.conf does not fix this problem.
   
   ```bash
   guochao@chao-20kna04gcd ~ % curl http:/// 
   
   502 Bad Gateway
   
   502 Bad Gateway
   openresty
   
   
   guochao@chao-20kna04gcd ~ % kubectl --namespace apisix exec -it apisix-msfhx 
-- cat /etc/resolv.conf
   nameserver 172.21.0.10
   ```
   
   i'm gonna give 2.0 a try 



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




[GitHub] [apisix] jeffguorg commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed

2020-10-29 Thread GitBox


jeffguorg commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719119397


   setting resolv.conf to ```nameserver 172.21.0.10``` does not fix this 
problem.
   
   i'm gonna give 2.0 a try



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




[GitHub] [apisix-dashboard] moonming commented on issue #607: proposal: e2e test

2020-10-29 Thread GitBox


moonming commented on issue #607:
URL: 
https://github.com/apache/apisix-dashboard/issues/607#issuecomment-719116525


   please add tag for those small issues.



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




[GitHub] [apisix] jeffguorg edited a comment on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed

2020-10-29 Thread GitBox


jeffguorg edited a comment on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719115231


   @membphis 
   
   yes, i started to use apisix just a few day ago before 2.0 is released.
   
   so this is already fix in 2.0, right? is it possible to backport it to 1.5? 
i'm worried that 2.x branch is not stable enough for production
   
   edit: Found that resolv.conf can be overwrite manually after set dnsPolicy 
to None: 
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy.
 i would try this possible workaround first



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




[GitHub] [apisix] jeffguorg edited a comment on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed

2020-10-29 Thread GitBox


jeffguorg edited a comment on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719115231


   @membphis 
   
   yes, i started to use apisix just a few day ago before 2.0 is released.
   
   so this is already fix in 2.0, right? is it possible to backport it to 1.5? 
i'm worried that 2.x branch is not stable enough for production
   
   edit: Found that resolv.conf can be overwrite manually after set dnsPolicy: 
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy.
 i would try this workaround first



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




[GitHub] [apisix] jeffguorg commented on issue #2533: request help: failed to set server peer [some-k8s-svc.default.svc.cluster.local:5202] err: no host allowed

2020-10-29 Thread GitBox


jeffguorg commented on issue #2533:
URL: https://github.com/apache/apisix/issues/2533#issuecomment-719115231


   @membphis 
   
   yes, i started to use apisix just a few day ago before 2.0 is released.
   
   so this is already fix in 2.0, right? is it possible to backport it to 1.5? 
i'm worried that 2.x branch is not stable enough for production



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




[GitHub] [apisix] nic-chen commented on issue #2565: support include other nginx config in the apisix(lua file)

2020-10-29 Thread GitBox


nic-chen commented on issue #2565:
URL: https://github.com/apache/apisix/issues/2565#issuecomment-719114815


   Could you show some example?



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




[GitHub] [apisix] wfgydbu commented on issue #2562: bug: APISIX 2.0 run failed on CentOS 7 missing package lua-tinyyaml and lua-resty-template

2020-10-29 Thread GitBox


wfgydbu commented on issue #2562:
URL: https://github.com/apache/apisix/issues/2562#issuecomment-719113879


   Please try `make deps` before `make init`, and make sure all dependencies 
has been installed **successfully**. Some of them may fail but the installation 
will continue.



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




[GitHub] [apisix-dashboard] wangxunfan commented on issue #623: apisix-dashboard 403 Forbidden

2020-10-29 Thread GitBox


wangxunfan commented on issue #623:
URL: 
https://github.com/apache/apisix-dashboard/issues/623#issuecomment-719112811


   /app/apisix/conf/nginx.conf:
   server {
   listen 9080 reuseport;
   .
   location /apisix/dashboard {
   allow 127.0.0.0/24;
   allow 192.168.202.0/24;
   allow 192.168.202.127;
   deny all;
   
   alias dashboard/;
   
   try_files $uri $uri/index.html /index.html =404;
   }



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




[GitHub] [apisix-dashboard] wangxunfan commented on issue #623: apisix-dashboard 403 Forbidden

2020-10-29 Thread GitBox


wangxunfan commented on issue #623:
URL: 
https://github.com/apache/apisix-dashboard/issues/623#issuecomment-719112506


   Nginx error.log file printing:
   2020/10/29 07:28:32 [warn] 12213#12213: *28873 [lua] ctx.lua:83: __index(): 
failed to fetch cookie value by key: cookie_x_api_key error: no cookie found in 
the current request, client: 192.168.202.1, server: , request: "POST 
/apisix/admin/user/login HTTP/1.1", host: "192.168.202.127:9080", referrer: 
"http://192.168.202.127:9080/apisix/dashboard/user/login?redirect=%2Fapisix%2Fdashboard;
   2020/10/29 07:28:32 [warn] 12213#12213: *28873 [lua] init.lua:95: handler(): 
failed to check token: missing apikey, client: 192.168.202.1, server: , 
request: "POST /apisix/admin/user/login HTTP/1.1", host: 
"192.168.202.127:9080", referrer: 
"http://192.168.202.127:9080/apisix/dashboard/user/login?redirect=%2Fapisix%2Fdashboard;
   
   
   /app/apisix/conf



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




[GitHub] [apisix] wfgydbu edited a comment on issue #2520: bug: "failed to acquire the lock: timeout" in logs/error.log when setuping route at the first time

2020-10-29 Thread GitBox


wfgydbu edited a comment on issue #2520:
URL: https://github.com/apache/apisix/issues/2520#issuecomment-719110566


   > It seems that when check the schema of Routes, APISIX tries to fetch the 
schema firstly and compile it, the compilation result will be cached inside a 
LRU cache. The schema creation is exclusive by a Lock. But the creation is 
totally compution and without IO operations, the default timeout for lock:lock 
is 5s, which is almost impossible to be timed out.
   > 
   > @membphis
   
   I've been digging into related code these days.  It looks to me that this 
logic is right. 
   
   I've tested with 32 woker processes by each process having 7 light threads, 
in this situation, one of the 7 threads used to deal with the key 
`/apisix/route` containg only one route(`apisix/route/1`).
   
   My question are: 
   (1) It it safe to simply increase the default timeout value from 5 to 10 
likely? if not, what cost we would have (i.e. performance reduction)? 
   (2) What will happen when one route fail to be synced from etcd. Will it be 
synced (successfully this time) again in the next iteration?
   
   @membphis @spacewander @tokers Anything will be appreciated.
   
   



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




[GitHub] [apisix] wfgydbu commented on issue #2520: bug: "failed to acquire the lock: timeout" in logs/error.log when setuping route at the first time

2020-10-29 Thread GitBox


wfgydbu commented on issue #2520:
URL: https://github.com/apache/apisix/issues/2520#issuecomment-719110566


   > It seems that when check the schema of Routes, APISIX tries to fetch the 
schema firstly and compile it, the compilation result will be cached inside a 
LRU cache. The schema creation is exclusive by a Lock. But the creation is 
totally compution and without IO operations, the default timeout for lock:lock 
is 5s, which is almost impossible to be timed out.
   > 
   > @membphis
   
   I've been digging into related code these days.  It looks to me that this 
logic is right. 
   
   We tested with 32 woker processes by each process having 7 light threads, in 
this situation, one of the 7 threads used to deal with the key `/apisix/route` 
containg only one route(`apisix/route/1`).
   
   My question are: 
   (1) It it safe to simply increase the default timeout value from 5 to 10 
likely? if not, what cost we would have (i.e. performance reduction)? 
   (2) What will happen when one route fail to be synced from etcd. Will it be 
synced (successfully this time) again in the next iteration?
   
   @membphis @spacewander @tokers Anything will be appreciated.
   
   



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




[GitHub] [apisix] tzssangglass commented on issue #2523: request help: jwt-auth plugin RS256 algorithm is not easy to use

2020-10-29 Thread GitBox


tzssangglass commented on issue #2523:
URL: https://github.com/apache/apisix/issues/2523#issuecomment-719110500


   > @tzssangglass Do you have any suggestions for this issue?
   
   Add two redundant fields, such as public_key, private_key, for the RSA 
algorithm.



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




[GitHub] [apisix] nic-chen commented on a change in pull request #2556: feature:support multi service discovery

2020-10-29 Thread GitBox


nic-chen commented on a change in pull request #2556:
URL: https://github.com/apache/apisix/pull/2556#discussion_r514656355



##
File path: apisix/discovery/eureka.lua
##
@@ -66,7 +66,8 @@ local _M = {
 
 
 local function service_info()
-local host = local_conf.eureka and local_conf.eureka.host
+local host = local_conf.discovery and
+local_conf.discovery.eureka and local_conf.discovery.eureka.host

Review comment:
   Could we support different instances for a same type discovery?





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




[GitHub] [apisix-dashboard] LiteSun commented on pull request #619: feat: added e2e test for Login page

2020-10-29 Thread GitBox


LiteSun commented on pull request #619:
URL: https://github.com/apache/apisix-dashboard/pull/619#issuecomment-719109644


   > just a proposal:define the dom selectors and test datas separately as 
variables, It may be better to maintain later.
   > 
   > A test case for a page contains three parts, domselectors, test datas, and 
test steps.
   > 
   > * The domselectors maybe changed as the layout of the page changed or UI 
frame changed;
   > * Test datas are also likely to change when data source changed;
   > * The test steps are relatively stable
   > 
   > e.g:
   > 
   > ```js
   > const domSelectors = {
   > inputUserName: '#control-ref_username',
   > inputPassWord: '#control-ref_password',
   > buttonLogin: '.ant-btn-lg',
   > notificationLogin: '.ant-notification-notice-description',
   > ...
   > };
   > const loginFailedDatas = {
   > userName: 'admin',
   > passWord: '123456'
   > };
   > const loginSuccessDatas = {
   >userName: 'admin',
   >passWord: 'admin'
   > };
   > ```
   
   I couldn't agree with you more and will update soon.



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




[GitHub] [apisix] spacewander commented on issue #2554: request help: abnormal output after using echo plugin

2020-10-29 Thread GitBox


spacewander commented on issue #2554:
URL: https://github.com/apache/apisix/issues/2554#issuecomment-719107301


   @thekingofworld 
   Because the fix depends on function introduced after 2.0.
   If the echo plugin is important to you, you should try the master branch.



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




[GitHub] [apisix-dashboard] wangxunfan commented on issue #623: apisix-dashboard 403 Forbidden

2020-10-29 Thread GitBox


wangxunfan commented on issue #623:
URL: 
https://github.com/apache/apisix-dashboard/issues/623#issuecomment-719105351


   @juzhiyuan
   1. Nginx error.log file printing missing api-key
   2.Deploy apisix 2. 0 and apisix-dashboard v2.0 rc2 according to the document。
   
https://github.com/apache/apisix-dashboard/blob/master/docs/deploy.md#build-the-frontend
   
   3.Ask a question. 
   1)Where is manager-api's dist folder?
   Reference fragment(deploy.md#build-the-frontend)
   6. Move files under dist folder to manager-api's dist folder, then visit 
http://127.0.0.1:8080 in your browser, 8080 is the default listen port of 
manager-api.
   2)api-key ,Is there a time limit?How to generate  a valid key. 



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




[GitHub] [apisix] spacewander commented on a change in pull request #2566: chore: move try_read_attr function into table.lua (#2257)

2020-10-29 Thread GitBox


spacewander commented on a change in pull request #2566:
URL: https://github.com/apache/apisix/pull/2566#discussion_r514646591



##
File path: apisix/plugins/log-rotate.lua
##
@@ -152,25 +150,11 @@ local function scan_log_folder()
 end
 
 
-local function try_attr(t, ...)
-local count = select('#', ...)
-for i = 1, count do
-local attr = select(i, ...)
-t = t[attr]
-if type(t) ~= "table" then
-return false
-end
-end
-
-return true
-end
-
-
 local function rotate()
 local local_conf = core.config.local_conf()
 local interval = INTERVAL
 local max_kept = MAX_KEPT
-if try_attr(local_conf, "plugin_attr", "log-rotate") then
+if core.table.try_read_attr(local_conf, "plugin_attr", "log-rotate") then
 local attr = local_conf.plugin_attr["log-rotate"]

Review comment:
   Ditto

##
File path: apisix/plugins/hmac-auth.lua
##
@@ -328,7 +312,7 @@ local function get_params(ctx)
 local date_key = DATE_KEY
 local signed_headers_key = SIGNED_HEADERS_KEY
 
-if try_attr(local_conf, "plugin_attr", "hmac-auth") then
+if core.table.try_read_attr(local_conf, "plugin_attr", "hmac-auth") then
 local attr = local_conf.plugin_attr["hmac-auth"]

Review comment:
   `try_read_attr` already gets what we need, we don't need to read it 
again.





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




[GitHub] [apisix] spacewander commented on a change in pull request #2525: doc : fixes issue #2327

2020-10-29 Thread GitBox


spacewander commented on a change in pull request #2525:
URL: https://github.com/apache/apisix/pull/2525#discussion_r514645942



##
File path: doc/grpc-proxy.md
##
@@ -17,7 +17,7 @@
 #
 -->
 
-[中文](zh-cn/grpc-proxy.md)
+[Chinese](zh-cn/grpc-proxy.md)

Review comment:
   It would be better if you leave this unchanged.





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




[GitHub] [apisix] spacewander closed issue #2558: doc: English style, " , " -> ", "

2020-10-29 Thread GitBox


spacewander closed issue #2558:
URL: https://github.com/apache/apisix/issues/2558


   



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




[GitHub] [apisix] spacewander commented on issue #2558: doc: English style, " , " -> ", "

2020-10-29 Thread GitBox


spacewander commented on issue #2558:
URL: https://github.com/apache/apisix/issues/2558#issuecomment-719100927


   Solved.



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




[GitHub] [apisix] spacewander closed issue #2505: CI: yaml style

2020-10-29 Thread GitBox


spacewander closed issue #2505:
URL: https://github.com/apache/apisix/issues/2505


   



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




[GitHub] [apisix] spacewander merged pull request #2524: CI : yaml style

2020-10-29 Thread GitBox


spacewander merged pull request #2524:
URL: https://github.com/apache/apisix/pull/2524


   



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




[apisix] branch master updated: CI : better yaml style

2020-10-29 Thread spacewander
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 254952c  CI : better yaml style
254952c is described below

commit 254952cad839b3a6b5f1a797068363ab5354c4b0
Author: tashiya-menuri <73444151+tashiya-men...@users.noreply.github.com>
AuthorDate: Fri Oct 30 06:04:03 2020 +0530

CI : better yaml style

Fix #2505
---
 .github/workflows/build.yml | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e1041b8..5952a1b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -11,8 +11,14 @@ jobs:
 strategy:
   fail-fast: false
   matrix:
-platform: [ubuntu-18.04]
-os_name: [linux_openresty, linux_tengine, 
linux_apisix_master_luarocks, linux_apisix_current_luarocks, 
linux_openresty_mtls]
+platform:
+  - ubuntu-18.04
+os_name:
+  - linux_openresty
+  - linux_tengine
+  - linux_apisix_master_luarocks
+  - linux_apisix_current_luarocks
+  - linux_openresty_mtls
 
 runs-on: ${{ matrix.platform }}
 env:



[apisix] branch master updated: change: rename APIX_WORKER_PROCESSES to APISIX_WORKER_PROCESSES (#2552)

2020-10-29 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

juzhiyuan 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 b6eb6f4  change: rename APIX_WORKER_PROCESSES to 
APISIX_WORKER_PROCESSES (#2552)
b6eb6f4 is described below

commit b6eb6f48422ed3feeab6de76ad7cb5978af99eda
Author: 罗泽轩 
AuthorDate: Fri Oct 30 08:14:04 2020 +0800

change: rename APIX_WORKER_PROCESSES to APISIX_WORKER_PROCESSES (#2552)

Close #2517.
---
 .travis/apisix_cli_test.sh | 2 +-
 bin/apisix | 2 +-
 conf/config-default.yaml   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.travis/apisix_cli_test.sh b/.travis/apisix_cli_test.sh
index 79905ce..091ff92 100755
--- a/.travis/apisix_cli_test.sh
+++ b/.travis/apisix_cli_test.sh
@@ -430,7 +430,7 @@ echo "passed: nginx.conf file disable cpu affinity"
 # set worker processes with env
 git checkout conf/config.yaml
 
-export APIX_WORKER_PROCESSES=8
+export APISIX_WORKER_PROCESSES=8
 
 make init
 
diff --git a/bin/apisix b/bin/apisix
index 10798e2..2e72a31 100755
--- a/bin/apisix
+++ b/bin/apisix
@@ -993,7 +993,7 @@ Please modify "admin_key" in conf/config.yaml .
 sys_conf["dns_resolver"] = dns_addrs
 end
 
-local env_worker_processes = os.getenv("APIX_WORKER_PROCESSES")
+local env_worker_processes = os.getenv("APISIX_WORKER_PROCESSES")
 if env_worker_processes then
 sys_conf["worker_processes"] = 
math.floor(tonumber(env_worker_processes))
 end
diff --git a/conf/config-default.yaml b/conf/config-default.yaml
index bb51039..ef9331f 100644
--- a/conf/config-default.yaml
+++ b/conf/config-default.yaml
@@ -115,7 +115,7 @@ nginx_config: # config for render the 
template to genarate n
   error_log_level: "warn" # warn,error
   worker_processes: auto  # one worker will get best performance, you 
can use "auto", but remember it is just work well only on physical machine
   # no more than 8 workers, otherwise 
competition between workers will consume a lot of resources
-  # if you want use multiple cores in 
container, you can inject the number of cpu as environment variable 
"APIX_WORKER_PROCESSES"
+  # if you want use multiple cores in 
container, you can inject the number of cpu as environment variable 
"APISIX_WORKER_PROCESSES"
   enable_cpu_affinity: true   # enbale cpu affinity, this is just work 
well only on physical machine
   worker_rlimit_nofile: 20480 # the number of files a worker process can 
open, should be larger than worker_connections
   worker_shutdown_timeout: 240s # timeout for a graceful shutdown of 
worker processes



[GitHub] [apisix] juzhiyuan merged pull request #2552: change: rename APIX_WORKER_PROCESSES to APISIX_WORKER_PROCESSES

2020-10-29 Thread GitBox


juzhiyuan merged pull request #2552:
URL: https://github.com/apache/apisix/pull/2552


   



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




[GitHub] [apisix] juzhiyuan closed issue #2517: Use APISIX_WORKER_PROCESSES instead of APIX_WORKER_PROCESSES?

2020-10-29 Thread GitBox


juzhiyuan closed issue #2517:
URL: https://github.com/apache/apisix/issues/2517


   



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




[GitHub] [apisix] moonming commented on pull request #2499: bugfix: fix zipkin plugin error when used with limit count plugin

2020-10-29 Thread GitBox


moonming commented on pull request #2499:
URL: https://github.com/apache/apisix/pull/2499#issuecomment-719087839


   Yes, we should fix it in zipkin plugin
   
   nic-chen 于2020年10月30日 周五上午7:46写道:
   
   > It's a difficult multiple choice question.
   > I think we could fix it in zipkin plugin, add some judge code to make sure
   > the span is exits. And let user custom its priority.
   >
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub
   > , or
   > unsubscribe
   > 

   > .
   >
   -- 
   Thanks,
   Ming Wen
   Twitter: _WenMing
   



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




[GitHub] [apisix] nic-chen commented on pull request #2552: change: rename APIX_WORKER_PROCESSES to APISIX_WORKER_PROCESSES

2020-10-29 Thread GitBox


nic-chen commented on pull request #2552:
URL: https://github.com/apache/apisix/pull/2552#issuecomment-719086827


   > We alse need to change manager-api's name to keep same style.
   > 
   > @nic-chen 
   
   OK



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




[GitHub] [apisix] nic-chen commented on pull request #2499: bugfix: fix zipkin plugin error when used with limit count plugin

2020-10-29 Thread GitBox


nic-chen commented on pull request #2499:
URL: https://github.com/apache/apisix/pull/2499#issuecomment-719086701


   It's a difficult multiple choice question.
   I think we could fix it in zipkin plugin, add some judge code to make sure 
the span is exits. And let user custom its 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:
us...@infra.apache.org




[GitHub] [apisix] nic-chen commented on issue #2377: bug:Use zipkin plugin and limit-req plugin together, zipkin plugin can not work when is limit

2020-10-29 Thread GitBox


nic-chen commented on issue #2377:
URL: https://github.com/apache/apisix/issues/2377#issuecomment-719080867


   > > if we need it, we can set a higher priority. 
https://github.com/apache/apisix/blob/master/apisix/plugins/zipkin.lua#L51
   > 
   > > 
   > 
   > > @moonming please confirm if that is a good way for `zipkin`.
   > 
   > > 
   > 
   > > Maybe `skywalking` plugin also has this issue.
   > 
   > 
   > 
   > But if the plugin order support self define, the  priority may be not 
work, please confirm.
   > 
   > 
![image](https://user-images.githubusercontent.com/15153469/95974615-cd042580-0e47-11eb-94e0-7e83adcd8f45.png)
   > 
   > 
   
   plugin orchestration has its own order, and the priority of plugin itself 
does not work in orchestration



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




[GitHub] [apisix] moonming commented on pull request #2548: feat: support TLS connection with etcd.

2020-10-29 Thread GitBox


moonming commented on pull request #2548:
URL: https://github.com/apache/apisix/pull/2548#issuecomment-719071635


   > I think we can also use the etcd proxy localily as an interim solution
   > 
   > 
   > 
   > [Apache APISIX -> etcd proxy(cert) ]--http mTLS-->[etcd]
   
   Do you means add sidecar for etcd proxy(cert)?



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




[GitHub] [apisix] juzhiyuan commented on a change in pull request #2548: feat: support TLS connection with etcd.

2020-10-29 Thread GitBox


juzhiyuan commented on a change in pull request #2548:
URL: https://github.com/apache/apisix/pull/2548#discussion_r514614005



##
File path: apisix/core/config_etcd.lua
##
@@ -472,6 +472,10 @@ function _M.new(key, opts)
 etcd_conf.protocol = "v3"
 etcd_conf.api_prefix = "/v3"
 
+if etcd_conf.tls and etcd_conf.tls then

Review comment:
   Why double variable?





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




[GitHub] [apisix] Miss-you edited a comment on pull request #2548: feat: support TLS connection with etcd.

2020-10-29 Thread GitBox


Miss-you edited a comment on pull request #2548:
URL: https://github.com/apache/apisix/pull/2548#issuecomment-718889945


   I think we can also use the etcd proxy localily as an interim solution
   
   [Apache APISIX -> etcd proxy(cert) ]--http mTLS-->[etcd]



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




[GitHub] [apisix] Miss-you commented on pull request #2548: feat: support TLS connection with etcd.

2020-10-29 Thread GitBox


Miss-you commented on pull request #2548:
URL: https://github.com/apache/apisix/pull/2548#issuecomment-718889945


   I think we can also use the etcd proxy localily.
   [Apache APISIX -> etcd proxy(cert) ]--http mTLS-->[etcd]



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




[GitHub] [apisix] Miss-you edited a comment on issue #2551: apisix 2.X 支持etcd ssl配置吗,想共用k8s集群中的etcd

2020-10-29 Thread GitBox


Miss-you edited a comment on issue #2551:
URL: https://github.com/apache/apisix/issues/2551#issuecomment-71623


   I think you can use the etcd proxy localily.
   [Apache APISIX -> etcd proxy(cert) ]--http mTLS-->[etcd]
   
   ping #yangzcy423911
   



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




  1   2   3   >