[GitHub] [incubator-apisix-dashboard] imjoey opened a new issue #292: [Question] The matched versions of apisix and apisix-dashboard projects

2020-07-01 Thread GitBox


imjoey opened a new issue #292:
URL: https://github.com/apache/incubator-apisix-dashboard/issues/292


   Hi all, first I would thank you for this awesome project. I'm on my way of 
running the apisix v1.4 along with its dashboard and everything works fine. 
While, if I take the latest dashboard code from `master` branch, I always 
encounter the error prompt message:  **请求错误,错误码: 401  用户没有权限(令牌、用户名、密码错误)。** 
   
   After some digs, I found that there was no `api-key` header in the request. 
So I was wondering which version of apisix should I use for the latest 
dashboard code?
   
   Many thanks.



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] [incubator-apisix-dashboard] juzhiyuan commented on issue #292: [Question] The matched versions of apisix and apisix-dashboard projects

2020-07-01 Thread GitBox


juzhiyuan commented on issue #292:
URL: 
https://github.com/apache/incubator-apisix-dashboard/issues/292#issuecomment-652414238


   Hi, the new Dashboard is come up with Docker Compose, Please follow the 
instructions on the README file under branch master.



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] [incubator-apisix] wingsjj commented on issue #1789: bug: The test case does not take into account tengine

2020-07-01 Thread GitBox


wingsjj commented on issue #1789:
URL: 
https://github.com/apache/incubator-apisix/issues/1789#issuecomment-652322407


   I updated it.
   
https://github.com/wingsjj/incubator-apisix/blob/master/t/node/remote-addr-ipv6.t#L117
   
   And test case passed successfully.
   https://github.com/wingsjj/incubator-apisix/actions/runs/153889200



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] [incubator-apisix] membphis commented on issue #1790: request help:

2020-07-01 Thread GitBox


membphis commented on issue #1790:
URL: 
https://github.com/apache/incubator-apisix/issues/1790#issuecomment-652344750


   you need to enable the `healthcheck` for `upstream`.
   
   
https://github.com/apache/incubator-apisix/blob/master/doc/admin-api.md#upstream



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] [incubator-apisix-dashboard] imjoey opened a new pull request #293: Fix incorrect format of some go source files

2020-07-01 Thread GitBox


imjoey opened a new pull request #293:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/293


   Use `gofmt` command to format codes, as well as re-organize the imports in a 
conventional way via `goimports` command. 
   
   > BTW: I guess that would be great if we add these two command to make 
static check for go codes. Maybe that could be done in another PR.
   
   Signed-off-by: imjoey 



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] [incubator-apisix] membphis commented on issue #1146: Feature: Open API specification for Admin API

2020-07-01 Thread GitBox


membphis commented on issue #1146:
URL: 
https://github.com/apache/incubator-apisix/issues/1146#issuecomment-652428160


   @sshniro can we close this issue now?



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] [incubator-apisix-dashboard] imjoey commented on issue #292: [Question] The matched versions of apisix and apisix-dashboard projects

2020-07-01 Thread GitBox


imjoey commented on issue #292:
URL: 
https://github.com/apache/incubator-apisix-dashboard/issues/292#issuecomment-652471926


   Hi @juzhiyuan, sorry for not getting it before and thank you very much for 
the hint.  In addition, any schedule for adding support for independent binary 
deployment? Thanks.



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] [incubator-apisix] membphis closed issue #1186: request help: How to test the log_utils?

2020-07-01 Thread GitBox


membphis closed issue #1186:
URL: https://github.com/apache/incubator-apisix/issues/1186


   



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] [incubator-apisix] membphis commented on issue #1186: request help: How to test the log_utils?

2020-07-01 Thread GitBox


membphis commented on issue #1186:
URL: 
https://github.com/apache/incubator-apisix/issues/1186#issuecomment-652423881


   I think we can close this issue now



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] [incubator-apisix] membphis closed issue #1111: request help: apisix.plugins.limit-count.limit-count-redis performance downgraded for continuous pressure

2020-07-01 Thread GitBox


membphis closed issue #:
URL: https://github.com/apache/incubator-apisix/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] [incubator-apisix] membphis commented on issue #1111: request help: apisix.plugins.limit-count.limit-count-redis performance downgraded for continuous pressure

2020-07-01 Thread GitBox


membphis commented on issue #:
URL: 
https://github.com/apache/incubator-apisix/issues/#issuecomment-652430138


   old 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] [incubator-apisix-dashboard] juzhiyuan commented on issue #292: [Question] The matched versions of apisix and apisix-dashboard projects

2020-07-01 Thread GitBox


juzhiyuan commented on issue #292:
URL: 
https://github.com/apache/incubator-apisix-dashboard/issues/292#issuecomment-652513740


   The manager API handles some logics which should not be handled by APISIX.



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] [incubator-apisix] membphis closed issue #1173: bug: docker build failed with dashboard not found

2020-07-01 Thread GitBox


membphis closed issue #1173:
URL: https://github.com/apache/incubator-apisix/issues/1173


   



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] [incubator-apisix] membphis commented on issue #1173: bug: docker build failed with dashboard not found

2020-07-01 Thread GitBox


membphis commented on issue #1173:
URL: 
https://github.com/apache/incubator-apisix/issues/1173#issuecomment-652424891


   you need to run `git submodule init` before you build the dashboard.



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] [incubator-apisix] nic-chen opened a new issue #1791: change: enabled websocket in route

2020-07-01 Thread GitBox


nic-chen opened a new issue #1791:
URL: https://github.com/apache/incubator-apisix/issues/1791


   I think websocket should be enabled in route, not upstream. This logic is 
clearer. On the other hand, if we support multiple upstream, we only need to 
configure it once in the route, otherwise we need to configure each upstream.
   



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] [incubator-apisix] membphis closed issue #1408: request help: Can supported to bind consumer to service or route?

2020-07-01 Thread GitBox


membphis closed issue #1408:
URL: https://github.com/apache/incubator-apisix/issues/1408


   



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] [incubator-apisix] membphis closed issue #1062: can apisix support acl

2020-07-01 Thread GitBox


membphis closed issue #1062:
URL: https://github.com/apache/incubator-apisix/issues/1062


   



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] [incubator-apisix] membphis commented on issue #1062: can apisix support acl

2020-07-01 Thread GitBox


membphis commented on issue #1062:
URL: 
https://github.com/apache/incubator-apisix/issues/1062#issuecomment-652432335


   we can use plugin `consumer-restriction` to support this.
   
   
https://github.com/apache/incubator-apisix/blob/master/doc/plugins/consumer-restriction.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] [incubator-apisix] membphis closed issue #1165: feature: support `backup` feature for roundrobin load balancing.

2020-07-01 Thread GitBox


membphis closed issue #1165:
URL: https://github.com/apache/incubator-apisix/issues/1165


   



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] [incubator-apisix] membphis commented on issue #1165: feature: support `backup` feature for roundrobin load balancing.

2020-07-01 Thread GitBox


membphis commented on issue #1165:
URL: 
https://github.com/apache/incubator-apisix/issues/1165#issuecomment-652426621


   That's an old question, and it doesn't look very useful. Close this issue 
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] [incubator-apisix-dashboard] juzhiyuan commented on issue #292: [Question] The matched versions of apisix and apisix-dashboard projects

2020-07-01 Thread GitBox


juzhiyuan commented on issue #292:
URL: 
https://github.com/apache/incubator-apisix-dashboard/issues/292#issuecomment-652492843


   binary deployment? or dashboard without Docker?



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] [incubator-apisix-dashboard] imjoey commented on issue #292: [Question] The matched versions of apisix and apisix-dashboard projects

2020-07-01 Thread GitBox


imjoey commented on issue #292:
URL: 
https://github.com/apache/incubator-apisix-dashboard/issues/292#issuecomment-652494906


   Yeap, non-containerized deployment.
   
   On Wednesday, July 1, 2020, 琚致远  wrote:
   
   > binary deployment? or dashboard without Docker?
   >
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub
   > 
,
   > or unsubscribe
   > 

   > .
   >
   



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] [incubator-apisix] poidl opened a new issue #1792: bug: docs "Add a prefix to the route" possibly missing host proxy rewrite

2020-07-01 Thread GitBox


poidl opened a new issue #1792:
URL: https://github.com/apache/incubator-apisix/issues/1792


   ### Issue description
   
   I'm a beginner and just installed it. I went through the Getting Started and 
in "Add a prefix to the route" it says
   
   > Now lets say you want to add a prefix (eg: samplePrefix) to the route 
**and do not want to use the host header** then you can use the proxy rewrite 
plugin to do it.
   
   below is the following code:
   
   ```
   curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
   "uri": "/samplePrefix/get",
   "plugins": {
   "proxy-rewrite": {
 "scheme": "https",
 "regex_uri": ["^/samplePrefix/get(.*)", "/get$1"]
   },
   "key-auth": {}
   },
   "upstream_id": 50
   }'
   ```
   I think there is a `"host":"httpbin.org"` missing, at least this fixed it 
for me. Otherwise I had to include the host header in curl.
   
   
https://github.com/apache/incubator-apisix/blob/master/doc/getting-started.md#add-a-prefix-to-the-route
   
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 1.4
   * OS: Arch Linux 5.7.5-arch1-1
   
   ### Minimal test code / Steps to reproduce the issue
   N/A
   
   ### What's the actual result? (including assertion message & call stack if 
applicable)
   N/A
   
   
   
   ### What's the expected result?
   N/A
   



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] [incubator-apisix] membphis commented on issue #1162: question: How it judge that the dependience is exist or not?

2020-07-01 Thread GitBox


membphis commented on issue #1162:
URL: 
https://github.com/apache/incubator-apisix/issues/1162#issuecomment-652427054


   old 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] [incubator-apisix] membphis commented on issue #1159: Proposal: multiple certificates deployment for a single domain

2020-07-01 Thread GitBox


membphis commented on issue #1159:
URL: 
https://github.com/apache/incubator-apisix/issues/1159#issuecomment-652427448


   @tokers any news?



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-apisix-dashboard] juzhiyuan commented on issue #292: [Question] The matched versions of apisix and apisix-dashboard projects

2020-07-01 Thread GitBox


juzhiyuan commented on issue #292:
URL: 
https://github.com/apache/incubator-apisix-dashboard/issues/292#issuecomment-652513218


   I have no idea because currently, we need the Docker Compose to set up some 
APIs (we called manager-api), which is as a bridge between Dashboard and APISIX.



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] [incubator-apisix] poidl closed issue #1792: bug: docs "Add a prefix to the route" possibly missing host proxy rewrite

2020-07-01 Thread GitBox


poidl closed issue #1792:
URL: https://github.com/apache/incubator-apisix/issues/1792


   



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] [incubator-apisix] poidl commented on issue #1792: bug: docs "Add a prefix to the route" possibly missing host proxy rewrite

2020-07-01 Thread GitBox


poidl commented on issue #1792:
URL: 
https://github.com/apache/incubator-apisix/issues/1792#issuecomment-652595954


   Sorry I tried it again and everything works as described in the docs! Thanks!



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] [incubator-apisix-dashboard] bzp2010 opened a new issue #294: bug: etcd by docker-compose failed to start

2020-07-01 Thread GitBox


bzp2010 opened a new issue #294:
URL: https://github.com/apache/incubator-apisix-dashboard/issues/294


   Here are some logs
   > etcd_1  | 2020-07-02 02:16:03.053586 I | pkg/flags: recognized and used 
environment variable ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379
   etcd_1  | 2020-07-02 02:16:03.053788 I | pkg/flags: recognized and used 
environment variable ETCD_DATA_DIR=/etcd_data
   etcd_1  | 2020-07-02 02:16:03.053820 I | pkg/flags: recognized and used 
environment variable ETCD_ENABLE_V2=true
   etcd_1  | 2020-07-02 02:16:03.053870 I | pkg/flags: recognized and used 
environment variable ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
   etcd_1  | [WARNING] Deprecated '--logger=capnslog' flag is set; use 
'--logger=zap' flag instead
   etcd_1  | 2020-07-02 02:16:03.053943 I | etcdmain: etcd Version: 3.4.9
   etcd_1  | 2020-07-02 02:16:03.053968 I | etcdmain: Git SHA: 54ba95891
   etcd_1  | 2020-07-02 02:16:03.053992 I | etcdmain: Go Version: go1.12.17
   etcd_1  | 2020-07-02 02:16:03.054016 I | etcdmain: Go OS/Arch: linux/amd64
   etcd_1  | 2020-07-02 02:16:03.054054 I | etcdmain: setting maximum number of 
CPUs to 8, total number of available CPUs is 8
   etcd_1  | 2020-07-02 02:16:03.054148 N | etcdmain: the server is already 
initialized as member before, starting as etcd member...
   etcd_1  | [WARNING] Deprecated '--logger=capnslog' flag is set; use 
'--logger=zap' flag instead
   etcd_1  | 2020-07-02 02:16:03.055306 I | embed: name = default
   etcd_1  | 2020-07-02 02:16:03.055378 I | embed: data dir = /etcd_data
   etcd_1  | 2020-07-02 02:16:03.055404 I | embed: member dir = 
/etcd_data/member
   etcd_1  | 2020-07-02 02:16:03.055429 I | embed: heartbeat = 100ms
   etcd_1  | 2020-07-02 02:16:03.055453 I | embed: election = 1000ms
   etcd_1  | 2020-07-02 02:16:03.055505 I | embed: snapshot count = 10
   etcd_1  | 2020-07-02 02:16:03.055539 I | embed: advertise client URLs = 
http://0.0.0.0:2379
   etcd_1  | 2020-07-02 02:16:03.055710 C | etcdmain: cannot access data 
directory: open /etcd_data/.touch: permission denied
   
   Based on the last sentence of the log, I think the docker compose file 
should be modified to make the etcd container run in non-root mode.
   [Document About Non-Root 
Container](https://docs.bitnami.com/tutorials/work-with-non-root-containers/#using-non-root-containers-as-root-containers)



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] [incubator-apisix] membphis commented on issue #1789: bug: The test case does not take into account tengine

2020-07-01 Thread GitBox


membphis commented on issue #1789:
URL: 
https://github.com/apache/incubator-apisix/issues/1789#issuecomment-652729559


   @wingsjj that is cool. welcome PR ^_^



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [incubator-apisix-docker] spjiang opened a new issue #61: docker安装

2020-07-01 Thread GitBox


spjiang opened a new issue #61:
URL: https://github.com/apache/incubator-apisix-docker/issues/61


   按照官方docker文档部署:
   https://github.com/apache/incubator-apisix-docker
   现象:
   运行地址:
   http://127.0.0.1:9080/apisix/dashboard
   返回:
   {"error_msg":"failed to match any routes"} 
   请问怎么排查问题?或是是什么原因导致的呢?
   



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] [incubator-apisix] membphis commented on a change in pull request #1793: feature: using GitHub action for CI

2020-07-01 Thread GitBox


membphis commented on a change in pull request #1793:
URL: https://github.com/apache/incubator-apisix/pull/1793#discussion_r448724281



##
File path: .github/workflows/build.yml
##
@@ -0,0 +1,63 @@
+name: CI
+
+on:
+  push:
+branches:
+  - master

Review comment:
   we need to run the GitHub action for every PR. blow is better.
   
   ```yaml
   on:
 push:
   branches: [ master ]
 pull_request:
   branches: [ master ]
   ```





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] [incubator-apisix] wingsjj opened a new pull request #1793: feature: using GitHub action for CI

2020-07-01 Thread GitBox


wingsjj opened a new pull request #1793:
URL: https://github.com/apache/incubator-apisix/pull/1793


   # Summary
   
   using GitHub action for CI
   
   ### Full changelog
   
   feature: using GitHub action for CI
   update:  .travis/linux_openresty_runner.sh
   update: .travis/linux_tengine_runner.sh
   update:  t/node/remote-addr-ipv6.t
   
   ### Issues resolved
   
   Fix #1789
   



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] [incubator-apisix] zcadqe897 commented on issue #1784: bug: /admin/routes return {"error_msg":"missing configurations"}

2020-07-01 Thread GitBox


zcadqe897 commented on issue #1784:
URL: 
https://github.com/apache/incubator-apisix/issues/1784#issuecomment-652762961


   
   example uris:
   

[GitHub] [incubator-apisix-dashboard] bzp2010 opened a new pull request #295: fix: etcd cannot start

2020-07-01 Thread GitBox


bzp2010 opened a new pull request #295:
URL: https://github.com/apache/incubator-apisix-dashboard/pull/295


   fix #294 
   Let the etcd container running in Non-Root mode.



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] [incubator-apisix] zhuchengxing opened a new issue #1790: request help:

2020-07-01 Thread GitBox


zhuchengxing opened a new issue #1790:
URL: https://github.com/apache/incubator-apisix/issues/1790


   ### Issue description
   我在upstream中配置了两个node,使用的是轮训的策略,当其中一个node服务被我关掉后,并不会影响正常的调用,会将请求转发到正常的node。 
那这样健康检查是用来干什么的?健康检查不是用来检查节点是否健康吗?
   
   ### Environment
   
   * apisix version (cmd: `apisix version`):1.3
   * OS:centos7
   



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] [incubator-apisix] membphis merged pull request #1783: rocks: fixed wrong source of 1.4.

2020-07-01 Thread GitBox


membphis merged pull request #1783:
URL: https://github.com/apache/incubator-apisix/pull/1783


   



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] [incubator-apisix] membphis commented on pull request #1779: The 'get_plugin_list' API sorts the return list base on priority

2020-07-01 Thread GitBox


membphis commented on pull request #1779:
URL: https://github.com/apache/incubator-apisix/pull/1779#issuecomment-652293746


   @ko-han merged, many thx



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] [incubator-apisix] membphis merged pull request #1779: The 'get_plugin_list' API sorts the return list base on priority

2020-07-01 Thread GitBox


membphis merged pull request #1779:
URL: https://github.com/apache/incubator-apisix/pull/1779


   



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




[incubator-apisix] branch master updated: change: 'get_plugin_list' API sorts the return list base on priority (#1779)

2020-07-01 Thread membphis
This is an automated email from the ASF dual-hosted git repository.

membphis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix.git


The following commit(s) were added to refs/heads/master by this push:
 new aeab71d  change: 'get_plugin_list' API sorts the return list base on 
priority (#1779)
aeab71d is described below

commit aeab71df8070f1f6daa2b06e55f0ffaca5eb053f
Author: ko han 
AuthorDate: Wed Jul 1 17:05:02 2020 +0800

change: 'get_plugin_list' API sorts the return list base on priority (#1779)
---
 apisix/admin/plugins.lua | 22 +-
 t/admin/plugins.t|  2 +-
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/apisix/admin/plugins.lua b/apisix/admin/plugins.lua
index 7d6262c..7b835e1 100644
--- a/apisix/admin/plugins.lua
+++ b/apisix/admin/plugins.lua
@@ -18,9 +18,13 @@ local core = require("apisix.core")
 local local_plugins = require("apisix.plugin").plugins_hash
 local stream_local_plugins = require("apisix.plugin").stream_plugins_hash
 local pairs = pairs
+local ipairs= ipairs
 local pcall = pcall
 local require   = require
 local table_remove = table.remove
+local table_sort = table.sort
+local table_insert = table.insert
+
 
 local _M = {
 version = 0.1,
@@ -114,7 +118,23 @@ function _M.get_plugins_list()
 table_remove(plugins, 1)
 end
 
-return plugins
+local priorities = {}
+local success = {}
+for i, name in ipairs(plugins) do
+local plugin_name = "apisix.plugins." .. name
+local ok, plugin = pcall(require, plugin_name)
+if ok and plugin.priority then
+priorities[name] = plugin.priority
+table_insert(success, name)
+end
+end
+
+local function cmp(x, y)
+return priorities[x] > priorities[y]
+end
+
+table_sort(success, cmp)
+return success
 end
 
 
diff --git a/t/admin/plugins.t b/t/admin/plugins.t
index b134b97..784b5d2 100644
--- a/t/admin/plugins.t
+++ b/t/admin/plugins.t
@@ -30,7 +30,7 @@ __DATA__
 --- request
 GET /apisix/admin/plugins/list
 --- response_body_like eval
-qr/\["limit-req","limit-count","limit-conn","key-auth","basic-auth","prometheus","node-status","jwt-auth","zipkin","ip-restriction","grpc-transcode","serverless-pre-function","serverless-post-function","openid-connect","proxy-rewrite","redirect","response-rewrite","fault-injection","udp-logger","wolf-rbac","proxy-cache","tcp-logger","proxy-mirror","kafka-logger","cors","consumer-restriction","syslog","batch-requests","http-logger","skywalking","echo","authz-keycloak","uri-blocker"\]/
+qr/\["fault-injection","serverless-pre-function","batch-requests","cors","ip-restriction","uri-blocker","openid-connect","wolf-rbac","basic-auth","jwt-auth","key-auth","consumer-restriction","authz-keycloak","proxy-mirror","proxy-cache","proxy-rewrite","limit-conn","limit-count","limit-req","node-status","redirect","response-rewrite","grpc-transcode","prometheus","echo","http-logger","tcp-logger","kafka-logger","syslog","udp-logger","zipkin","skywalking","serverless-post-function"\]/
 --- no_error_log
 [error]
 



[GitHub] [incubator-apisix] morrme commented on pull request #1788: remove authentication type for cors plugin

2020-07-01 Thread GitBox


morrme commented on pull request #1788:
URL: https://github.com/apache/incubator-apisix/pull/1788#issuecomment-652297570


   @membphis my pleasure! thank you for supporting newcomers to your project!



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