[GitHub] [apisix-dashboard] membphis opened a new issue #1041: failed to load the route in etcd

2020-12-13 Thread GitBox


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


   here are the routes in my `etcd`, I created them by a python script:
   
   ```python
   #!/usr/bin/env python
   # -*- coding: utf-8 -*-
   import grequests
   
   payloads = {}
   for id in range(100):
   payload = {
   "uri": "/test_%s"%id,
   "upstream": {
   "type": "roundrobin",
   "nodes": {
   "127.0.0.1:7000": 1
   }
   }
   }
   payloads[id]=payload
   unsent_request = []
   header = {"X-API-KEY":"edd1c9f034335f136f87ad84b625c8f1"}
   for id in payloads:
   print(id)
   
unsent_request.append(grequests.post("http://127.0.0.1:9080/apisix/admin/routes/";
 ,json=payloads[id], headers = header))
   responses = grequests.map(unsent_request)
   for response in responses:
   print(response.content)
   response.close()
   ```
   
   the Manager API can not load them, here are the routes in etcd:
   
   [routes.log](https://github.com/apache/apisix-dashboard/files/5684342/mm.log)
   



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 issue #1041: failed to load the route in etcd

2020-12-13 Thread GitBox


membphis commented on issue #1041:
URL: 
https://github.com/apache/apisix-dashboard/issues/1041#issuecomment-743972259


   @nic-chen do you have time to look at 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] membphis commented on issue #1041: failed to load the route in etcd

2020-12-13 Thread GitBox


membphis commented on issue #1041:
URL: 
https://github.com/apache/apisix-dashboard/issues/1041#issuecomment-743972314


   cc @idbeta 



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 issue #3022: feat: support to export the JSON schema of APISIX via `CLI`

2020-12-13 Thread GitBox


juzhiyuan commented on issue #3022:
URL: https://github.com/apache/apisix/issues/3022#issuecomment-743975115


   This tip should be clearly described in Apache APISIX's Documentation, too.



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] diaosj commented on issue #3017: request help: set ENV variable in config.yaml, then admin API call still didn't recognize it

2020-12-13 Thread GitBox


diaosj commented on issue #3017:
URL: https://github.com/apache/apisix/issues/3017#issuecomment-743975153


   > We haven't backported to released version yet.
   
   Just make sure, will we backport this to the released `v2.1` version? I 
think this backport may be necessary, but I'm not sure if it goes against the 
branch strategy or plan. I can contribute to this backport if you want.



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 #831: request help: websocket tab is lost in 2.0rc2?

2020-12-13 Thread GitBox


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


   
https://github.com/apache/apisix/pull/2836/files#diff-ebd29c155b76d68bb1cd728cd626f281f81c62ddb451b345baf2ed8f81480127R378
   
   
![image](https://user-images.githubusercontent.com/2106987/102007595-7e9ad680-3d65-11eb-8e86-3edb3ccdc2eb.png)
   
   Hi @membphis, I see there has a tip saying the enable_websocket field will 
be removed soon, do we have any plan?



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-ingress-controller] gxthrj commented on issue #85: leaderelection

2020-12-13 Thread GitBox


gxthrj commented on issue #85:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/85#issuecomment-743980484


   > We can use 
https://github.com/kubernetes/kubernetes/tree/323f34858de18b862d43c40b2cced65ad8e24052/staging/src/k8s.io/client-go/tools/leaderelection
 to achieve this.
   
   Agree, related to #11 



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] diaosj opened a new pull request #3028: style: add space character before keyword "then"

2020-12-13 Thread GitBox


diaosj opened a new pull request #3028:
URL: https://github.com/apache/apisix/pull/3028


   ### What this PR does / why we need it:
   
   Missing space character between condition string and the language keyword 
"then".
   
   
   ### Pre-submission checklist:
   
   * [-] 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? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix/tree/master#community) 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-dashboard] moonming commented on issue #831: request help: websocket tab is lost in 2.0rc2?

2020-12-13 Thread GitBox


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


   Will be removed in 2.3
   
   琚致远 于2020年12月13日 周日下午5:07写道:
   
   >
   > 
https://github.com/apache/apisix/pull/2836/files#diff-ebd29c155b76d68bb1cd728cd626f281f81c62ddb451b345baf2ed8f81480127R378
   >
   > [image: image]
   > 

   >
   > Hi @membphis , I see there has a tip saying
   > the enable_websocket field will be removed soon, do we have any plan?
   >
   > —
   > You are receiving this because you commented.
   > 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-dashboard] juzhiyuan commented on issue #831: request help: websocket tab is lost in 2.0rc2?

2020-12-13 Thread GitBox


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


   I couldn't find milestone 2.3, you mean 3.0 or 2.3 has not been created?
   
   https://github.com/apache/apisix/milestones



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 #831: request help: websocket tab is lost in 2.0rc2?

2020-12-13 Thread GitBox


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


   The frontend will still use that field for 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] [apisix-dashboard] moonming commented on issue #831: request help: websocket tab is lost in 2.0rc2?

2020-12-13 Thread GitBox


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


   no, FE should not use it in upstream
   
   琚致远 于2020年12月13日 周日下午6:30写道:
   
   > The frontend will still use that field for now.
   >
   > —
   > You are receiving this because you commented.
   > 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-dashboard] nic-chen commented on issue #1041: failed to load the route in etcd

2020-12-13 Thread GitBox


nic-chen commented on issue #1041:
URL: 
https://github.com/apache/apisix-dashboard/issues/1041#issuecomment-743987303


   @membphis 
   
   the Manager API has loaded them, but the ID is null for each routes.
   
   
   I guess you can't see them on the FE UI?
   
   



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 #831: request help: websocket tab is lost in 2.0rc2?

2020-12-13 Thread GitBox


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


   Websocket is binding with route now
   
   Ming Wen 于2020年12月13日 周日下午6:47写道:
   
   > no, FE should not use it in upstream
   >
   > 琚致远 于2020年12月13日 周日下午6:30写道:
   >
   >> The frontend will still use that field for now.
   >>
   >> —
   >> You are receiving this because you commented.
   >> Reply to this email directly, view it on GitHub
   >> 
,
   >> or unsubscribe
   >> 

   >> .
   >>
   > --
   > Thanks,
   > Ming Wen
   > Twitter: _WenMing
   >
   -- 
   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-dashboard] moonming commented on issue #831: request help: websocket tab is lost in 2.0rc2?

2020-12-13 Thread GitBox


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


   Please check the Chang log of apisix for detail
   
   Ming Wen 于2020年12月13日 周日下午6:48写道:
   
   > Websocket is binding with route now
   >
   > Ming Wen 于2020年12月13日 周日下午6:47写道:
   >
   >> no, FE should not use it in upstream
   >>
   >> 琚致远 于2020年12月13日 周日下午6:30写道:
   >>
   >>> The frontend will still use that field for now.
   >>>
   >>> —
   >>> You are receiving this because you commented.
   >>> Reply to this email directly, view it on GitHub
   >>> 
,
   >>> or unsubscribe
   >>> 

   >>> .
   >>>
   >> --
   >> Thanks,
   >> Ming Wen
   >> Twitter: _WenMing
   >>
   > --
   > Thanks,
   > Ming Wen
   > Twitter: _WenMing
   >
   -- 
   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-dashboard] juzhiyuan commented on issue #831: request help: websocket tab is lost in 2.0rc2?

2020-12-13 Thread GitBox


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


   > Websocket is binding with route now
   > 
   > Ming Wen 于2020年12月13日 周日下午6:47写道:
   > 
   > > no, FE should not use it in upstream
   > >
   > > 琚致远 于2020年12月13日 周日下午6:30写道:
   > >
   > >> The frontend will still use that field for now.
   > >>
   > >> —
   > >> You are receiving this because you commented.
   > >> Reply to this email directly, view it on GitHub
   > >> 
,
   > >> or unsubscribe
   > >> 

   > >> .
   > >>
   > > --
   > > Thanks,
   > > Ming Wen
   > > Twitter: _WenMing
   > >
   > -- 
   > Thanks,
   > Ming Wen
   > Twitter: _WenMing
   > 
   
   Ok, now i know what happened, i heard from @membphis that this field is 
bound to Route and called enable_websocket, but when i saw that PR, i didn't 
see that change is related to upstream_def until you point out. 
   
   Conclusion: The frontend will use that field with Route instead of 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] [apisix-dashboard] juzhiyuan commented on issue #1041: failed to load the route in etcd

2020-12-13 Thread GitBox


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


   > @membphis 
   > 
   > the Manager API has loaded them, but the ID is null for each routes.
   > 
   > 
   > I guess you can't see them on the FE UI?
   > 
   > 
   
   Just for sure, does API return those records?



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 #3028: style: add space character before keyword "then"

2020-12-13 Thread GitBox


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


   



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 (aed3e81 -> 69c7987)

2020-12-13 Thread spacewander
This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git.


from aed3e81  docs: remove unneeded whitespace from Markdown (#3026)
 add 69c7987  style: add space character before keyword "then" (#3028)

No new revisions were added by this update.

Summary of changes:
 apisix/plugin.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[apisix] branch master updated: chore: spelling (#3027)

2020-12-13 Thread wenming
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new dcdbc1c  chore: spelling (#3027)
dcdbc1c is described below

commit dcdbc1cc9eadff8311148e9f1d8f5f89c3bb2c9c
Author: John Bampton 
AuthorDate: Sun Dec 13 21:31:24 2020 +1000

chore: spelling (#3027)
---
 apisix/core/config_etcd.lua| 6 +++---
 apisix/core/config_yaml.lua| 2 +-
 apisix/plugins/zipkin.lua  | 2 +-
 apisix/plugins/zipkin/reporter.lua | 2 +-
 t/node/invalid-route.t | 6 +++---
 t/node/invalid-service.t   | 4 ++--
 t/node/invalid-upstream.t  | 4 ++--
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/apisix/core/config_etcd.lua b/apisix/core/config_etcd.lua
index 1434157..57d46ff 100644
--- a/apisix/core/config_etcd.lua
+++ b/apisix/core/config_etcd.lua
@@ -254,7 +254,7 @@ local function sync_data(self)
 data_valid = false
 log.error("invalid item data of [", self.key .. "/" .. key,
   "], val: ", item.value,
-  ", it shoud be a object")
+  ", it should be an object")
 end
 
 if data_valid and self.item_schema then
@@ -355,7 +355,7 @@ local function sync_data(self)
 self:upgrade_version(res.modifiedIndex)
 return false, "invalid item data of [" .. self.key .. "/" .. key
 .. "], val: " .. res.value
-.. ", it shoud be a object"
+.. ", it should be an object"
 end
 
 if res.value and self.item_schema then
@@ -650,7 +650,7 @@ end
 
 function _M.server_version(self)
 if not self.running then
-return nil, "stoped"
+return nil, "stopped"
 end
 
 return read_etcd_version(self.etcd_cli)
diff --git a/apisix/core/config_yaml.lua b/apisix/core/config_yaml.lua
index e10aa06..808daf6 100644
--- a/apisix/core/config_yaml.lua
+++ b/apisix/core/config_yaml.lua
@@ -189,7 +189,7 @@ local function sync_data(self)
 data_valid = false
 log.error("invalid item data of [", self.key .. "/" .. id,
   "], val: ", json.delay_encode(item),
-  ", it should be a object")
+  ", it should be an object")
 end
 
 local key = item.id or "arr_" .. i
diff --git a/apisix/plugins/zipkin.lua b/apisix/plugins/zipkin.lua
index fc75f8d..0255193 100644
--- a/apisix/plugins/zipkin.lua
+++ b/apisix/plugins/zipkin.lua
@@ -42,7 +42,7 @@ local schema = {
 },
 server_addr = {
 type = "string",
-description = "default is $server_addr, you can speific your 
external ip address",
+description = "default is $server_addr, you can specify your 
external ip address",
 pattern = "^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$"
 },
 },
diff --git a/apisix/plugins/zipkin/reporter.lua 
b/apisix/plugins/zipkin/reporter.lua
index 40d3b6c..202c626 100644
--- a/apisix/plugins/zipkin/reporter.lua
+++ b/apisix/plugins/zipkin/reporter.lua
@@ -168,7 +168,7 @@ function _M.init_processor(self)
 
 local processor, err = batch_processor:new(flush, process_conf)
 if err then
-return false, "creat processor error: " .. err
+return false, "create processor error: " .. err
 end
 
 self.processor = processor
diff --git a/t/node/invalid-route.t b/t/node/invalid-route.t
index 5788bf9..81fa6b2 100644
--- a/t/node/invalid-route.t
+++ b/t/node/invalid-route.t
@@ -47,7 +47,7 @@ GET /t
 --- grep_error_log eval
 qr/\[error\].*/
 --- grep_error_log_out eval
-qr{invalid item data of \[/apisix/routes/1\], val: mexxx, it shoud 
be a object}
+qr{invalid item data of \[/apisix/routes/1\], val: mexxx, it 
should be an object}
 --- response_body_like eval
 qr/"value":"mexxx"/
 
@@ -63,7 +63,7 @@ GET /not_found
 --- grep_error_log eval
 qr/\[error\].*/
 --- grep_error_log_out eval
-qr{invalid item data of \[/apisix/routes/1\], val: mexxx, it shoud 
be a object}
+qr{invalid item data of \[/apisix/routes/1\], val: mexxx, it 
should be an object}
 
 
 
@@ -100,7 +100,7 @@ passed
 --- grep_error_log eval
 qr/\[error\].*/
 --- grep_error_log_out eval
-qr{invalid item data of \[/apisix/routes/1\], val: mexxx, it shoud 
be a object}
+qr{invalid item data of \[/apisix/routes/1\], val: mexxx, it 
should be an object}
 
 
 
diff --git a/t/node/invalid-service.t b/t/node/invalid-service.t
index 883ead1..05196d8 100644
--- a/t/node/invalid-service.t
+++ b/t/node/invalid-service.t
@@ -48,7 +48,7 @@ GET /t
 --- grep_error_log eval
 qr/\[error\].*/
 --- grep_error_log_out ev

[GitHub] [apisix] moonming merged pull request #3027: chore: spelling

2020-12-13 Thread GitBox


moonming merged pull request #3027:
URL: https://github.com/apache/apisix/pull/3027


   



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] nic-chen commented on issue #1041: failed to load the route in etcd

2020-12-13 Thread GitBox


nic-chen commented on issue #1041:
URL: 
https://github.com/apache/apisix-dashboard/issues/1041#issuecomment-744002374


   > > @membphis
   > > the Manager API has loaded them, but the ID is null for each routes.
   > > I guess you can't see them on the FE UI?
   > 
   > Just for sure, does API return those records?
   
   No, It depends. My guess is wrong.
   



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] Firstsawyou commented on issue #2982: [DISSCUS]: support `ctx.var` to get service_name and route_name

2020-12-13 Thread GitBox


Firstsawyou commented on issue #2982:
URL: https://github.com/apache/apisix/issues/2982#issuecomment-744004518


   Assigned to me.



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-ingress-controller] membphis opened a new issue #86: CI: code coverage

2020-12-13 Thread GitBox


membphis opened a new issue #86:
URL: https://github.com/apache/apisix-ingress-controller/issues/86


   the Manager API has supported this CI, we can migrate this feature



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] Shoothzj opened a new issue #3029: request help: Can apisixconvert mqtt protocol to other protocols?

2020-12-13 Thread GitBox


Shoothzj opened a new issue #3029:
URL: https://github.com/apache/apisix/issues/3029


   ### Issue description
   Can apisix serves mqtt protocol, and then send backend as other protocols 
like http, grpc?
   
   



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-ingress-controller] gxthrj commented on a change in pull request #82: feat: install signal handler

2020-12-13 Thread GitBox


gxthrj commented on a change in pull request #82:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/82#discussion_r541922937



##
File path: cmd/ingress/ingress.go
##
@@ -39,6 +41,15 @@ func dief(template string, args ...interface{}) {
os.Exit(1)
 }
 
+func waitForSignal(stopCh chan struct{}) {
+   sigCh := make(chan os.Signal, 1)
+   signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)

Review comment:
   > Behavior of SIGKILL cannot be changed, it's kernel's limitation.
   
   Capture signals for logging, `SIGKILL` would be sent by Kubernetes. why not 
to capture? 





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 issue #1041: failed to load the route in etcd

2020-12-13 Thread GitBox


membphis commented on issue #1041:
URL: 
https://github.com/apache/apisix-dashboard/issues/1041#issuecomment-744006131


   I think that is a bug of Manager API.
   
   ```
   http://ubuntu:9000/apisix/admin/routes?page=1&page_size=20
   
   {
"code": 0,
"message": "",
"data": {
"rows": [{
"id": null,
"create_time": 1607505576,
"update_time": 1607505576,
"uri": "/test_95",
"upstream": {
"nodes": [{
"host": "127.0.0.1",
"port": 7000,
"weight": 1
}],
"type": "roundrobin",
"hash_on": "vars",
"pass_host": "pass"
}
}],
"total_size": 1
},
"request_id": "b082cb4a-e8f2-4c41-b2aa-fc3e28a62a72"
   }



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 edited a comment on issue #1041: failed to load the route in etcd

2020-12-13 Thread GitBox


membphis edited a comment on issue #1041:
URL: 
https://github.com/apache/apisix-dashboard/issues/1041#issuecomment-744006131


   I think that is a bug of Manager API. In the etcd, it is about 100 route, 
but only returned one route.
   
   ```
   http://ubuntu:9000/apisix/admin/routes?page=1&page_size=20
   
   {
"code": 0,
"message": "",
"data": {
"rows": [{
"id": null,
"create_time": 1607505576,
"update_time": 1607505576,
"uri": "/test_95",
"upstream": {
"nodes": [{
"host": "127.0.0.1",
"port": 7000,
"weight": 1
}],
"type": "roundrobin",
"hash_on": "vars",
"pass_host": "pass"
}
}],
"total_size": 1
},
"request_id": "b082cb4a-e8f2-4c41-b2aa-fc3e28a62a72"
   }



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] 96RadhikaJadhav opened a new pull request #3030: Corrected typo in doc

2020-12-13 Thread GitBox


96RadhikaJadhav opened a new pull request #3030:
URL: https://github.com/apache/apisix/pull/3030


   ### What this PR does / why we need it:
   
   
   
   ### Pre-submission checklist:
   
   * [ ] 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? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix/tree/master#community) 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-dashboard] juzhiyuan commented on issue #1041: failed to load the route in etcd

2020-12-13 Thread GitBox


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


   fix in M2.3?



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-ingress-controller] gxthrj commented on a change in pull request #82: feat: install signal handler

2020-12-13 Thread GitBox


gxthrj commented on a change in pull request #82:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/82#discussion_r541922937



##
File path: cmd/ingress/ingress.go
##
@@ -39,6 +41,15 @@ func dief(template string, args ...interface{}) {
os.Exit(1)
 }
 
+func waitForSignal(stopCh chan struct{}) {
+   sigCh := make(chan os.Signal, 1)
+   signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)

Review comment:
   > Behavior of SIGKILL cannot be changed, it's kernel's limitation.
   
   Capture signals for logging, `SIGKILL` would be sent by Kubernetes. why not 
to capture? 





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-ingress-controller] gxthrj commented on a change in pull request #82: feat: install signal handler

2020-12-13 Thread GitBox


gxthrj commented on a change in pull request #82:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/82#discussion_r541924497



##
File path: cmd/ingress/ingress.go
##
@@ -39,6 +41,15 @@ func dief(template string, args ...interface{}) {
os.Exit(1)
 }
 
+func waitForSignal(stopCh chan struct{}) {
+   sigCh := make(chan os.Signal, 1)
+   signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)

Review comment:
   OK,got 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-ingress-controller] gxthrj merged pull request #82: feat: install signal handler

2020-12-13 Thread GitBox


gxthrj merged pull request #82:
URL: https://github.com/apache/apisix-ingress-controller/pull/82


   



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-ingress-controller] branch master updated: feat: install signal handler (#82)

2020-12-13 Thread kvn
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 2278160  feat: install signal handler (#82)
2278160 is described below

commit 22781608b724674cc522374826181f5bc2478b5f
Author: Alex Zhang 
AuthorDate: Sun Dec 13 21:21:50 2020 +0800

feat: install signal handler (#82)

* feat: install signal handler

* test: add signal handler test case
---
 cmd/ingress/ingress.go | 25 ++---
 cmd/ingress/ingress_test.go| 82 ++
 cmd/ingress/testdata/conf.json | 13 +++
 cmd/ingress/testdata/config| 19 ++
 conf/init.go   | 10 ++
 5 files changed, 144 insertions(+), 5 deletions(-)

diff --git a/cmd/ingress/ingress.go b/cmd/ingress/ingress.go
index ab46bc7..9d8bf5f 100644
--- a/cmd/ingress/ingress.go
+++ b/cmd/ingress/ingress.go
@@ -18,7 +18,9 @@ import (
"fmt"
"net/http"
"os"
+   "os/signal"
"strings"
+   "syscall"
"time"
 
api6Informers 
"github.com/gxthrj/apisix-ingress-types/pkg/client/informers/externalversions"
@@ -39,6 +41,15 @@ func dief(template string, args ...interface{}) {
os.Exit(1)
 }
 
+func waitForSignal(stopCh chan struct{}) {
+   sigCh := make(chan os.Signal, 1)
+   signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)
+
+   sig := <-sigCh
+   log.Infof("signal %d (%s) received", sig, sig.String())
+   close(stopCh)
+}
+
 // NewIngressCommand creates the ingress sub command for 
apisix-ingress-controller.
 func NewIngressCommand() *cobra.Command {
var configPath string
@@ -97,11 +108,15 @@ func NewIngressCommand() *cobra.Command {
c.SharedInformerFactory.Start(stop)
}()
 
-   router := pkg.Route()
-   err = http.ListenAndServe(":8080", router)
-   if err != nil {
-   logger.Fatal("ListenAndServe: ", err)
-   }
+   go func() {
+   router := pkg.Route()
+   if err := http.ListenAndServe(":8080", router); 
err != nil && err != http.ErrServerClosed {
+   log.Errorf("failed to start http 
server: %s", err)
+   }
+   }()
+
+   waitForSignal(stop)
+   log.Info("apisix-ingress-controller exited")
},
}
 
diff --git a/cmd/ingress/ingress_test.go b/cmd/ingress/ingress_test.go
new file mode 100644
index 000..205d935
--- /dev/null
+++ b/cmd/ingress/ingress_test.go
@@ -0,0 +1,82 @@
+//  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 ingress
+
+import (
+   "bytes"
+   "fmt"
+   "os"
+   "syscall"
+   "testing"
+   "time"
+
+   "github.com/stretchr/testify/assert"
+
+   "github.com/api7/ingress-controller/conf"
+   "github.com/api7/ingress-controller/pkg/log"
+)
+
+type fakeWriteSyncer struct {
+   buf bytes.Buffer
+}
+
+type fields struct {
+   Level   string
+   Timestring
+   Message string
+}
+
+func (fws *fakeWriteSyncer) Sync() error {
+   return nil
+}
+
+func (fws *fakeWriteSyncer) Write(p []byte) (int, error) {
+   return fws.buf.Write(p)
+}
+
+func (fws *fakeWriteSyncer) bytes() (p []byte) {
+   s := fws.buf.Bytes()
+   p = make([]byte, len(s))
+   copy(p, s)
+   fws.buf.Reset()
+   return
+}
+
+func TestSignalHandler(t *testing.T) {
+   // TODO remove these two lines.
+   conf.ENV = "local"
+   conf.SetConfPath("./testdata/conf.json")
+   conf.Init()
+   cmd := NewIngressCommand()
+   waitCh := make(chan struct{})
+   go func() {
+   cmd.Run(cmd, nil)
+   close(waitCh)
+   }()
+
+   time.Sleep(time.Second)
+   fws := &fakeWriteSyncer{}
+   logger, err := log.NewLogger(log.WithLogLevel("info"), 
log.Wi

[GitHub] [apisix] 96RadhikaJadhav commented on issue #3024: bug: some typo errors in the document

2020-12-13 Thread GitBox


96RadhikaJadhav commented on issue #3024:
URL: https://github.com/apache/apisix/issues/3024#issuecomment-744007053


   @juzhiyuan @idbeta I have created a PR #3030. Please review it and let me 
know if any other changes required :) .



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 #3030: feat: corrected typo in doc

2020-12-13 Thread GitBox


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



##
File path: doc/plugins/request-validation.md
##
@@ -67,7 +67,7 @@ curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 
'X-API-KEY: edd1c9f034335f13
 "nodes": {
 "127.0.0.1:8080": 1
 }
-}
+},

Review comment:
   Changed the wrong place?





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] 96RadhikaJadhav commented on a change in pull request #3030: feat: corrected typo in doc

2020-12-13 Thread GitBox


96RadhikaJadhav commented on a change in pull request #3030:
URL: https://github.com/apache/apisix/pull/3030#discussion_r541927641



##
File path: doc/plugins/request-validation.md
##
@@ -67,7 +67,7 @@ curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 
'X-API-KEY: edd1c9f034335f13
 "nodes": {
 "127.0.0.1:8080": 1
 }
-}
+},

Review comment:
   @spacewander Apologies. Corrected now :) . Please review.





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 pull request #3030: docs: corrected typo in doc

2020-12-13 Thread GitBox


juzhiyuan commented on pull request #3030:
URL: https://github.com/apache/apisix/pull/3030#issuecomment-744009920


   Hi @96RadhikaJadhav, thanks for your nice PR!
   
   Here has one tip: kindly use `fix/feat: #3024` in the first comment to close 
the target issue once this PR is merged.



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 edited a comment on pull request #3030: docs: corrected typo in doc

2020-12-13 Thread GitBox


juzhiyuan edited a comment on pull request #3030:
URL: https://github.com/apache/apisix/pull/3030#issuecomment-744009920


   Hi @96RadhikaJadhav, thanks for your nice PR!
   
   Here has one tip: kindly use `fix/feat: #3024` in the first comment to close 
the target issue once this PR is merged.
   
   
![image](https://user-images.githubusercontent.com/2106987/102013593-2b884a00-3d8c-11eb-82a5-6aa247260dc0.png)
   
   Just like this.



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] 96RadhikaJadhav commented on pull request #3030: docs: corrected typo in doc

2020-12-13 Thread GitBox


96RadhikaJadhav commented on pull request #3030:
URL: https://github.com/apache/apisix/pull/3030#issuecomment-744010231


   > Hi @96RadhikaJadhav, thanks for your nice PR!
   > 
   > Here has one tip: kindly use `fix/feat: #3024` in the first comment to 
close the target issue once this PR is merged.
   > 
   > 
![image](https://user-images.githubusercontent.com/2106987/102013593-2b884a00-3d8c-11eb-82a5-6aa247260dc0.png)
   > 
   > Just like this.
   
   Sure :)



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 juzhiyuan-patch-1 created (now 27ca51e)

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

juzhiyuan pushed a change to branch juzhiyuan-patch-1
in repository https://gitbox.apache.org/repos/asf/apisix.git.


  at 27ca51e  feat: added improve docs issue template

This branch includes the following new commits:

 new 27ca51e  feat: added improve docs issue template

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[apisix] 01/01: feat: added improve docs issue template

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

juzhiyuan pushed a commit to branch juzhiyuan-patch-1
in repository https://gitbox.apache.org/repos/asf/apisix.git

commit 27ca51e4aae2cf36ad54cfecbb4f723ffab90ea8
Author: 琚致远 
AuthorDate: Sun Dec 13 21:53:05 2020 +0800

feat: added improve docs issue template
---
 .github/ISSUE_TEMPLATE/improve-docs.md | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/.github/ISSUE_TEMPLATE/improve-docs.md 
b/.github/ISSUE_TEMPLATE/improve-docs.md
new file mode 100644
index 000..9b198dd
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/improve-docs.md
@@ -0,0 +1,15 @@
+---
+name: Improve Docs
+about: Improve docs for Apache APISIX
+labels: doc, 'good first issue'
+---
+
+# Improve Docs
+
+## Please describe which part of docs should be improved or typo fixed
+
+A clear and concise description of what you want and what your use case is.
+
+## Describe the solution you'd like
+
+A clear and concise description of what you want to happen.



[GitHub] [apisix] juzhiyuan opened a new pull request #3031: feat: added improve docs issue template

2020-12-13 Thread GitBox


juzhiyuan opened a new pull request #3031:
URL: https://github.com/apache/apisix/pull/3031


   ### What this PR does / why we need it:
   
   feature: added improve docs issue template to reduce set labels manually.
   
   ### 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?
   * [x] Is this PR backward compatible? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix/tree/master#community) 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-dashboard] membphis commented on issue #820: Support global plugin

2020-12-13 Thread GitBox


membphis commented on issue #820:
URL: 
https://github.com/apache/apisix-dashboard/issues/820#issuecomment-744011618


   @juzhiyuan the Admin API has implemented the `global rule` API: 
https://github.com/apache/apisix/blob/5de6ee467f83c38f31eff6cfd683736b441ac9c2/doc/zh-cn/architecture-design.md#global-rule
   
   So I think we'd better use the existing APIs.



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 issue #820: Support global plugin

2020-12-13 Thread GitBox


membphis commented on issue #820:
URL: 
https://github.com/apache/apisix-dashboard/issues/820#issuecomment-744011885


   
![image](https://user-images.githubusercontent.com/6814606/102013971-5d9aab80-3d8e-11eb-936a-70058bcbab12.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] membphis commented on issue #831: request help: websocket tab is lost in 2.0rc2?

2020-12-13 Thread GitBox


membphis commented on issue #831:
URL: 
https://github.com/apache/apisix-dashboard/issues/831#issuecomment-744012034


   > Conclusion: The frontend will use that field with Route instead of 
Upstream.
   
   yes, that is right



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 issue #1041: failed to load the route in etcd

2020-12-13 Thread GitBox


membphis commented on issue #1041:
URL: 
https://github.com/apache/apisix-dashboard/issues/1041#issuecomment-744012169


   > fix in M2.3?
   
   this is 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-dashboard] membphis commented on a change in pull request #1037: docs: update CHANGELOG for v2.2

2020-12-13 Thread GitBox


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



##
File path: CHANGELOG.md
##
@@ -19,18 +19,46 @@
 
 # Table of Contents
 
+- [2.2.0](#220)
 - [2.1.1](#211)
 - [2.1.0](#210)
 - [2.0.0](#200)
 - [1.5.0](#150)
 - [1.0.0](#100)
 
 
+# 2.2.0

Review comment:
   Should we use `2.2` here?





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 issue #672: [discuss] use YAML or pretty JSON to store the JSONSchema data

2020-12-13 Thread GitBox


membphis commented on issue #672:
URL: 
https://github.com/apache/apisix-dashboard/issues/672#issuecomment-744013139


   I think the priority of this issue is not high, and it is recommended to 
remove it from the `2.3` milestone.



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] membphis commented on a change in pull request #3021: feat: rewrite handwriting validation with jsonschema

2020-12-13 Thread GitBox


membphis commented on a change in pull request #3021:
URL: https://github.com/apache/apisix/pull/3021#discussion_r541933014



##
File path: apisix/plugins/jwt-auth.lua
##
@@ -42,12 +42,11 @@ local schema = {
 
 local consumer_schema = {
 type = "object",
-additionalProperties = false,
+-- can't use additionalProperties with dependencies

Review comment:
   ok, got it. many thx for your explain





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 issue #571: [refactor]missing refactoring apis

2020-12-13 Thread GitBox


membphis commented on issue #571:
URL: 
https://github.com/apache/apisix-dashboard/issues/571#issuecomment-744014517


   `/apisix/admin/global_rules`
   
   we need this API in milestone `2.3`. @nic-chen I think we can create a new 
issue about this



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 issue #842: feat: support run `manager api` as OS service

2020-12-13 Thread GitBox


membphis commented on issue #842:
URL: 
https://github.com/apache/apisix-dashboard/issues/842#issuecomment-744015632


   @nic-chen @tokers It depends on building the package for the specific OS, 
eg: ubuntu, centos.  
   
   I think we can remove milestone `2.3`.



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 issue #613: Deploy Dashboard using RPM package

2020-12-13 Thread GitBox


membphis commented on issue #613:
URL: 
https://github.com/apache/apisix-dashboard/issues/613#issuecomment-744015999


   It is an easy job, welcome to take a look at this project(build APISIX RPM): 
   
   https://github.com/api7/build-tools
   https://github.com/api7/build-tools/blob/master/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-dashboard] membphis commented on issue #1036: Test Framework

2020-12-13 Thread GitBox


membphis commented on issue #1036:
URL: 
https://github.com/apache/apisix-dashboard/issues/1036#issuecomment-744016070


   that is an important job, we really need 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] membphis edited a comment on issue #1036: Test Framework

2020-12-13 Thread GitBox


membphis edited a comment on issue #1036:
URL: 
https://github.com/apache/apisix-dashboard/issues/1036#issuecomment-744016070


   that is an important job, we really need it. 
   
   I need a front-end testing framework based on visual elements so that 
community contributors who do not understand front-end technology can also 
complete the development and modification of test cases.
   
   This will be a very cool thing.



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] membphis commented on issue #3029: request help: Can apisixconvert mqtt protocol to other protocols?

2020-12-13 Thread GitBox


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


   This requires additional development to support, if you need any technical 
support, you can contact me.



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] membphis edited a comment on issue #3029: request help: Can apisixconvert mqtt protocol to other protocols?

2020-12-13 Thread GitBox


membphis edited a comment on issue #3029:
URL: https://github.com/apache/apisix/issues/3029#issuecomment-744017149


   The current open source APISIX does not support this feature.
   
   This requires additional development to support, if you need any technical 
support, you can contact me.



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 #820: Support global plugin

2020-12-13 Thread GitBox


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


   @membphis np, I just updated the proposal.



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 #820: Support global plugin

2020-12-13 Thread GitBox


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


   @membphis ~~np, I just updated the proposal.~~
   
   `Global Plugin` is easier to understand than `Global Rule` IMHO 🤔



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 #820: Support global plugin

2020-12-13 Thread GitBox


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


   @membphis ~~np, I just updated the proposal.~~
   
   `Global Plugin` is easier to understand than `Global Rule` IMHO 🤔 Let's wait 
for others 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] juzhiyuan edited a comment on issue #820: Support global plugin

2020-12-13 Thread GitBox


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


   @membphis np, I just updated the proposal about the API part.
   
   `Global Plugin` is easier to understand than `Global Rule` IMHO 🤔 Let's wait 
for others 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




[apisix] branch master updated: feat: check if Admin API is used with etcd config_center (#3018)

2020-12-13 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/apisix.git


The following commit(s) were added to refs/heads/master by this push:
 new 2457aa1  feat: check if Admin API is used with etcd config_center 
(#3018)
2457aa1 is described below

commit 2457aa1e4da89982f86c84224392e1350f8a1337
Author: 罗泽轩 
AuthorDate: Sun Dec 13 23:08:15 2020 +0800

feat: check if Admin API is used with etcd config_center (#3018)
---
 .travis/apisix_cli_test.sh | 15 +++
 apisix/cli/ops.lua |  6 ++
 doc/stand-alone.md |  2 +-
 doc/zh-cn/stand-alone.md   |  2 +-
 4 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/.travis/apisix_cli_test.sh b/.travis/apisix_cli_test.sh
index de1ad58..5b43330 100755
--- a/.travis/apisix_cli_test.sh
+++ b/.travis/apisix_cli_test.sh
@@ -918,3 +918,18 @@ if ! echo "$out" | grep 'authentication is not enabled'; 
then
 fi
 
 echo "passed: properly handle the error when connecting to etcd without auth"
+
+# Admin API can only be used with etcd config_center
+echo '
+apisix:
+enable_admin: true
+config_center: yaml
+' > conf/config.yaml
+
+out=$(make init 2>&1 || true)
+if ! echo "$out" | grep "Admin API can only be used with etcd config_center"; 
then
+echo "failed: Admin API can only be used with etcd config_center"
+exit 1
+fi
+
+echo "passed: Admin API can only be used with etcd config_center"
diff --git a/apisix/cli/ops.lua b/apisix/cli/ops.lua
index c3e72cb..fe663b5 100644
--- a/apisix/cli/ops.lua
+++ b/apisix/cli/ops.lua
@@ -176,6 +176,12 @@ Please modify "admin_key" in conf/config.yaml .
 end
 end
 
+if yaml_conf.apisix.enable_admin and
+yaml_conf.apisix.config_center == "yaml"
+then
+util.die("ERROR: Admin API can only be used with etcd 
config_center.\n")
+end
+
 local or_ver = util.execute_cmd("openresty -V 2>&1")
 local with_module_status = true
 if or_ver and not or_ver:find("http_stub_status_module", 1, true) then
diff --git a/doc/stand-alone.md b/doc/stand-alone.md
index 9d0a13b..44c5428 100644
--- a/doc/stand-alone.md
+++ b/doc/stand-alone.md
@@ -43,7 +43,7 @@ apisix:
 # `/your_path/conf/apisix.yaml`
 ```
 
-In addition, since the current Admin API is based on the etcd configuration 
center solution, the Admin API will not actually work when the Stand-alone mode 
is enabled.
+In addition, since the current Admin API is based on the etcd configuration 
center solution, enable Admin API is not allowed when the Stand-alone mode is 
enabled.
 
 ## How to config rules
 
diff --git a/doc/zh-cn/stand-alone.md b/doc/zh-cn/stand-alone.md
index fd08c23..03ce3e1 100644
--- a/doc/zh-cn/stand-alone.md
+++ b/doc/zh-cn/stand-alone.md
@@ -47,7 +47,7 @@ apisix:
 ```
 
 此外由于目前 Admin API 都是基于 etcd 配置中心解决方案,当开启 Stand-alone 模式后,
-Admin API 实际将不起作用。
+Admin API 将不再被允许使用。
 
 ## 如何配置规则
 



[GitHub] [apisix] membphis merged pull request #3018: feat: check if Admin API is used with etcd config_center

2020-12-13 Thread GitBox


membphis merged pull request #3018:
URL: https://github.com/apache/apisix/pull/3018


   



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 #1037: docs: update CHANGELOG for v2.2

2020-12-13 Thread GitBox


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



##
File path: CHANGELOG.md
##
@@ -19,18 +19,46 @@
 
 # Table of Contents
 
+- [2.2.0](#220)
 - [2.1.1](#211)
 - [2.1.0](#210)
 - [2.0.0](#200)
 - [1.5.0](#150)
 - [1.0.0](#100)
 
 
+# 2.2.0

Review comment:
   ok for me, cc @nic-chen 





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 #3022: feat: support to export the JSON schema of APISIX via `CLI`

2020-12-13 Thread GitBox


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


   when APISIX is not running, can export the JSON schema?



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 #3031: feat: added improve docs issue template

2020-12-13 Thread GitBox


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


   



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 (2457aa1 -> 839c5d7)

2020-12-13 Thread spacewander
This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git.


from 2457aa1  feat: check if Admin API is used with etcd config_center 
(#3018)
 add 839c5d7  feat: added improve docs issue template (#3031)

No new revisions were added by this update.

Summary of changes:
 .github/ISSUE_TEMPLATE/improve-docs.md | 15 +++
 1 file changed, 15 insertions(+)
 create mode 100644 .github/ISSUE_TEMPLATE/improve-docs.md



[apisix] branch master updated: docs: corrected typo in doc (#3030)

2020-12-13 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 0222db7  docs: corrected typo in doc (#3030)
0222db7 is described below

commit 0222db7bf31e022bd69cc28cdac3b41be09b875f
Author: Radhika <56536997+96radhikajad...@users.noreply.github.com>
AuthorDate: Mon Dec 14 06:19:33 2020 +0530

docs: corrected typo in doc (#3030)
---
 doc/plugins/http-logger.md| 2 +-
 doc/plugins/request-validation.md | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/plugins/http-logger.md b/doc/plugins/http-logger.md
index 6396144..9feb6d6 100644
--- a/doc/plugins/http-logger.md
+++ b/doc/plugins/http-logger.md
@@ -60,7 +60,7 @@ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 
'X-API-KEY: edd1c9f034335f13
 {
   "plugins": {
 "http-logger": {
-"uri": "http://127.0.0.1:80/postendpoint?param=1";,
+"uri": "http://127.0.0.1:80/postendpoint?param=1";
 }
},
   "upstream": {
diff --git a/doc/plugins/request-validation.md 
b/doc/plugins/request-validation.md
index 39f9b86..f864679 100644
--- a/doc/plugins/request-validation.md
+++ b/doc/plugins/request-validation.md
@@ -68,7 +68,7 @@ curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 
'X-API-KEY: edd1c9f034335f13
 "127.0.0.1:8080": 1
 }
 }
-}
+}'
 ```
 
 ## Test Plugin



[GitHub] [apisix] spacewander closed issue #3024: bug: some typo errors in the document

2020-12-13 Thread GitBox


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


   



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 #3030: docs: corrected typo in doc

2020-12-13 Thread GitBox


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


   



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-ingress-controller] tokers opened a new pull request #87: ci: add semantic.yml

2020-12-13 Thread GitBox


tokers opened a new pull request #87:
URL: https://github.com/apache/apisix-ingress-controller/pull/87


   



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-ingress-controller] tokers opened a new pull request #88: fix: license header check broken

2020-12-13 Thread GitBox


tokers opened a new pull request #88:
URL: https://github.com/apache/apisix-ingress-controller/pull/88


   



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-ingress-controller] branch master updated: fix: license header check broken (#88)

2020-12-13 Thread kvn
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new ae32397  fix: license header check broken (#88)
ae32397 is described below

commit ae323976f98397879645f5ef9085665b0be541d7
Author: Alex Zhang 
AuthorDate: Mon Dec 14 09:22:09 2020 +0800

fix: license header check broken (#88)
---
 cmd/ingress/ingress_test.go | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/cmd/ingress/ingress_test.go b/cmd/ingress/ingress_test.go
index 205d935..b8b08c8 100644
--- a/cmd/ingress/ingress_test.go
+++ b/cmd/ingress/ingress_test.go
@@ -1,17 +1,17 @@
-//  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
+// 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
+// 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.
+// 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 ingress
 
 import (



[GitHub] [apisix-ingress-controller] gxthrj merged pull request #88: fix: license header check broken

2020-12-13 Thread GitBox


gxthrj merged pull request #88:
URL: https://github.com/apache/apisix-ingress-controller/pull/88


   



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 #3022: feat: support to export the JSON schema of APISIX via `CLI`

2020-12-13 Thread GitBox


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


   We can't load the plugin schema without loading `ngx.*` stuff. What about 
doing this in control API (https://github.com/apache/apisix/issues/2798)? 



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] nic-chen commented on a change in pull request #1037: docs: update CHANGELOG for v2.2

2020-12-13 Thread GitBox


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



##
File path: CHANGELOG.md
##
@@ -19,18 +19,46 @@
 
 # Table of Contents
 
+- [2.2.0](#220)
 - [2.1.1](#211)
 - [2.1.0](#210)
 - [2.0.0](#200)
 - [1.5.0](#150)
 - [1.0.0](#100)
 
 
+# 2.2.0

Review comment:
   I think this is OK now, we have been using it like this.
   https://raw.githubusercontent.com/apache/apisix/master/CHANGELOG.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-ingress-controller] tokers opened a new pull request #89: Ci/go unit test coverage report

2020-12-13 Thread GitBox


tokers opened a new pull request #89:
URL: https://github.com/apache/apisix-ingress-controller/pull/89


   



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 pull request #2935: feat: Implement traffic splitting plugin

2020-12-13 Thread GitBox


wfgydbu commented on pull request #2935:
URL: https://github.com/apache/apisix/pull/2935#issuecomment-744114244


   Hi all, thansk for this great feature! One quick question, In this plugin, 
how do you deal with healthcheck and
   retry mechanism? are you planning to support 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-ingress-controller] codecov-io commented on pull request #89: Ci/go unit test coverage report

2020-12-13 Thread GitBox


codecov-io commented on pull request #89:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/89#issuecomment-744114416


   # 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/89?src=pr&el=h1)
 Report
   > :exclamation: No coverage uploaded for pull request base 
(`master@ae32397`). [Click here to learn what that 
means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/89/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/89?src=pr&el=tree)
   
   ```diff
   @@Coverage Diff@@
   ## master  #89   +/-   ##
   =
 Coverage  ?   58.15%   
   =
 Files ?   12   
 Lines ?  466   
 Branches  ?0   
   =
 Hits  ?  271   
 Misses?  177   
 Partials  ?   18   
   ```
   
   
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/89?src=pr&el=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/89?src=pr&el=footer).
 Last update 
[ae32397...3945281](https://codecov.io/gh/apache/apisix-ingress-controller/pull/89?src=pr&el=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   



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-ingress-controller] tokers commented on pull request #89: Ci/go unit test coverage report

2020-12-13 Thread GitBox


tokers commented on pull request #89:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/89#issuecomment-744114703


   @gxthrj @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-dashboard] nic-chen commented on issue #820: Support global plugin

2020-12-13 Thread GitBox


nic-chen commented on issue #820:
URL: 
https://github.com/apache/apisix-dashboard/issues/820#issuecomment-744114823


   I think the APIs should be consistent with the existing, [refer 
to](https://github.com/apache/apisix/blob/master/doc/architecture-design.md#Global-Rule):
   
   **API: set global rule**
   ```
   PUT /apisix/admin/global_rules/1
   ```
   ```json
   {
   "plugins": {
   "limit-count": {
   "time_window": 60,
   "policy": "local",
   "count": 2,
   "key": "remote_addr",
   "rejected_code": 503
   }
   }
   }
   ```
   
   **API: get global rule**
   ```
   GET /apisix/admin/global_rules/1
   ```
   ```json
   {
   "plugins": {
   "limit-count": {
   "time_window": 60,
   "policy": "local",
   "count": 2,
   "key": "remote_addr",
   "rejected_code": 503
   }
   }
   }
   ```
   
   **API: get global rule list(new)**
   ```
   GET /apisix/admin/global_rules?page=1&page_size=10
   ```
   ```json
   {
   "code": 0,
   "message": "",
   "data": {
   "rows": [
   {
   "id": 1,
   "plugins": {
   "limit-count": {
   "time_window": 60,
   "policy": "local",
   "count": 2,
   "key": "remote_addr",
   "rejected_code": 503
   }
   }
   }
   ]
   }
   }
   ```
   
   
   



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] nic-chen commented on issue #842: feat: support run `manager api` as OS service

2020-12-13 Thread GitBox


nic-chen commented on issue #842:
URL: 
https://github.com/apache/apisix-dashboard/issues/842#issuecomment-744115083


   > @nic-chen @tokers It depends on building the package for the specific OS, 
eg: ubuntu, centos.
   > 
   > I think we can remove milestone `2.3`.
   
   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-ingress-controller] codecov-io edited a comment on pull request #89: Ci/go unit test coverage report

2020-12-13 Thread GitBox


codecov-io edited a comment on pull request #89:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/89#issuecomment-744114416


   # 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/89?src=pr&el=h1)
 Report
   > :exclamation: No coverage uploaded for pull request base 
(`master@ae32397`). [Click here to learn what that 
means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/89/graphs/tree.svg?width=650&height=150&src=pr&token=WPLQXPY3V0)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/89?src=pr&el=tree)
   
   ```diff
   @@Coverage Diff@@
   ## master  #89   +/-   ##
   =
 Coverage  ?   58.15%   
   =
 Files ?   12   
 Lines ?  466   
 Branches  ?0   
   =
 Hits  ?  271   
 Misses?  177   
 Partials  ?   18   
   ```
   
   
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/89?src=pr&el=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/89?src=pr&el=footer).
 Last update 
[ae32397...81c86e5](https://codecov.io/gh/apache/apisix-ingress-controller/pull/89?src=pr&el=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   



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 #2935: feat: Implement traffic splitting plugin

2020-12-13 Thread GitBox


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


   > Hi all, thansk for this great feature! One quick question, In this plugin, 
how do you deal with healthcheck and
   > retry mechanism? are you planning to support it?
   
   This feature will be supported, please pay attention to this PR continuously.



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 #3022: feat: support to export the JSON schema of APISIX via `CLI`

2020-12-13 Thread GitBox


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


   > We can't load the plugin schema without loading `ngx.*` stuff. What about 
doing this in control API (#2798)?
   
   Agree, otherwise the code base of CLI has to be refactored.



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 pull request #2935: feat: Implement traffic splitting plugin

2020-12-13 Thread GitBox


wfgydbu commented on pull request #2935:
URL: https://github.com/apache/apisix/pull/2935#issuecomment-744116293


   > > Hi all, thansk for this great feature! One quick question, In this 
plugin, how do you deal with healthcheck and
   > > retry mechanism? are you planning to support it?
   > 
   > This feature will be supported, please pay attention to this PR 
continuously.
   
   Great! Looking forward to 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] juzhiyuan commented on issue #820: Support global plugin

2020-12-13 Thread GitBox


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


   The only difference between your comment and this proposal is, this proposal 
doesn't have the target rule id, as a global API, why there will have 
**multiple global** records? but yes, you are right, for the frontend, it will 
use the target rule id, there will not have a global rule list.
   
   
![image](https://user-images.githubusercontent.com/2106987/102031594-683a5c80-3df1-11eb-82a7-005f477f7743.png)
   
   
![image](https://user-images.githubusercontent.com/2106987/102031601-70929780-3df1-11eb-8f38-66e7d07dd511.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] moonming commented on issue #820: Support global plugin

2020-12-13 Thread GitBox


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


   There is a more obvious problem in this design:
   The plugin menu bar on the left is not just for global plugins. It can also 
become a universal plug-in object like service and upstream. For example, a 
limit count plugin and configuration can be referenced by multiple routes.
   
   The global plug-in is just an attribute of the plug-in, and it is not worth 
a separate menu.



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] nic-chen opened a new issue #1042: feat: support global rule in Manager API

2020-12-13 Thread GitBox


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


   # Feature request
   
   ## Please describe your feature
   
   
   In the refactoring of version 2.0, we left some APIs that were not 
implemented in m.
   Now we need to implement the `global rule` part as soon as possible.
   refer:
   
   
https://github.com/apache/apisix/blob/master/doc/architecture-design.md#Global-Rule
   
   ## Describe alternatives you've considered
   
   The APIs should be consistent with the original APIs of Admin APIs.
   
   
   ## Additional context
   
   related issue:
   # 571
   #820
   
   
   



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] sober-wang opened a new pull request #3032: Add apisix configmaps yaml file.

2020-12-13 Thread GitBox


sober-wang opened a new pull request #3032:
URL: https://github.com/apache/apisix/pull/3032


   ### What this PR does / why we need it:
   Add apisix configmaps yaml file. We no longer need to find configuration 
files from the apisix package
   



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-ingress-controller] Firstsawyou commented on issue #67: Chore: change the module from `github.com/api7/ingress-controller` to `github.com/apache/apisix-ingress-controller`

2020-12-13 Thread GitBox


Firstsawyou commented on issue #67:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/67#issuecomment-744121959


   This looks very interesting, let me try 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-ingress-controller] tokers opened a new pull request #90: c: add spell checker

2020-12-13 Thread GitBox


tokers opened a new pull request #90:
URL: https://github.com/apache/apisix-ingress-controller/pull/90


   



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 #3032: Add apisix configmaps yaml file.

2020-12-13 Thread GitBox


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



##
File path: kubernetes/README.md
##
@@ -30,6 +30,8 @@ There are some yaml files for deploying apisix in Kubernetes.
 if you do not need to change any config, and use default config in 
`../conf/config.yaml`
 ```
 $ kubectl create configmap apisix-gw-config.yaml 
--from-file=../conf/config.yaml
+# or
+$ kubectl apply -f apisix/kubernetes/apisix-configmaps.yaml

Review comment:
   If we can create apisix-configmaps.yaml from `conf/config.yaml`, why do 
we need to maintain another copy of `conf/config.yaml`?





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] sober-wang closed pull request #3032: Add apisix configmaps yaml file.

2020-12-13 Thread GitBox


sober-wang closed pull request #3032:
URL: https://github.com/apache/apisix/pull/3032


   



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-ingress-controller] gxthrj merged pull request #90: c: add spell checker

2020-12-13 Thread GitBox


gxthrj merged pull request #90:
URL: https://github.com/apache/apisix-ingress-controller/pull/90


   



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-ingress-controller] branch master updated: CI: add spell checker (#90)

2020-12-13 Thread kvn
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 4f2fe71  CI: add spell checker (#90)
4f2fe71 is described below

commit 4f2fe7158f2511aaed1287b1bfca1470d9726059
Author: Alex Zhang 
AuthorDate: Mon Dec 14 10:47:09 2020 +0800

CI: add spell checker (#90)

* c: add spell checker

* fix: spell checker command
---
 .github/workflows/spell-checker.yml | 20 
 1 file changed, 20 insertions(+)

diff --git a/.github/workflows/spell-checker.yml 
b/.github/workflows/spell-checker.yml
new file mode 100644
index 000..1e6fc33
--- /dev/null
+++ b/.github/workflows/spell-checker.yml
@@ -0,0 +1,20 @@
+name: spell-checker
+on:
+  push:
+branches: [ master, ci/spell-checker ]
+  pull_request:
+branches: [ master ]
+jobs:
+  misspell:
+name: runner / misspell
+runs-on: ubuntu-latest
+steps:
+  - name: Check out code.
+uses: actions/checkout@v1
+  - name: Install
+run: |
+  wget -O - -q https://git.io/misspell | sh -s -- -b .
+  - name: Misspell
+run: |
+  find . -name "*.go" -type f | xargs ./misspell -error
+  find docs -type f | xargs ./misspell -error



[apisix-ingress-controller] branch master updated: ci: report go unit-test coverage profile (#89)

2020-12-13 Thread kvn
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 7a4000b  ci: report go unit-test coverage profile (#89)
7a4000b is described below

commit 7a4000b086db336d2fcc5dcd321301ce666c38fc
Author: Alex Zhang 
AuthorDate: Mon Dec 14 10:49:02 2020 +0800

ci: report go unit-test coverage profile (#89)
---
 .github/workflows/unit-test-ci.yml | 8 ++--
 .gitignore | 1 +
 Makefile   | 4 
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/unit-test-ci.yml 
b/.github/workflows/unit-test-ci.yml
index 4da2ece..527ed96 100644
--- a/.github/workflows/unit-test-ci.yml
+++ b/.github/workflows/unit-test-ci.yml
@@ -4,7 +4,7 @@ on:
   push:
 branches:
   - master
-  - kv/ci
+  - ci/go-unit-test-coverage-report
   pull_request:
 branches:
   - master
@@ -20,4 +20,8 @@ jobs:
 - name: run unit test
   working-directory: ./
   run: |
-go test ./...
+make unit-test
+- name: upload coverage profile
+  working-directory: ./
+  run: |
+bash <(curl -s https://codecov.io/bash)
diff --git a/.gitignore b/.gitignore
index ed1bb99..0fdeedf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,5 +13,6 @@
 
 .idea
 .DS_Store
+coverage.txt
 apisix-ingress-controller
 .actions/openwhisk-utilities
diff --git a/Makefile b/Makefile
index 76dd71b..8df39d0 100644
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,10 @@ build:
 lint:
golangci-lint run
 
+### unit-test:Run unit test cases
+unit-test:
+   go test -cover -coverprofile=coverage.txt ./...
+
 ### license-check:Do Apache License Header check
 license-check:
 ifeq ("$(wildcard .actions/openwhisk-utilities/scancode/scanCode.py)", "")



[GitHub] [apisix-ingress-controller] gxthrj merged pull request #89: ci: go unit test coverage report

2020-12-13 Thread GitBox


gxthrj merged pull request #89:
URL: https://github.com/apache/apisix-ingress-controller/pull/89


   



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] nic-chen commented on a change in pull request #979: Refactor online debug be

2020-12-13 Thread GitBox


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



##
File path: api/internal/handler/route/route.go
##
@@ -397,3 +401,61 @@ func Exist(c *gin.Context) (interface{}, error) {
 
return nil, nil
 }
+
+type ParamsInput struct {
+   URL  string  `json:"url,omitempty"`
+   BodyParams   map[string]string   `json:"bodyParams,omitempty"`
+   Method   string  `json:"method,omitempty"`
+   HeaderParams map[string][]string `json:"headerParams,omitempty"`
+}
+
+type Result struct {
+   Codeint `json:"code,omitempty"`
+   Message string  `json:"message,omitempty"`
+   Datainterface{} `json:"data,omitempty"`
+}
+
+func (h *Handler) DebugRequestForwarding(c droplet.Context) (interface{}, 
error) {
+   paramsInput := c.Input().(*ParamsInput)
+   bodyParams, _ := json.Marshal(paramsInput.BodyParams)
+   client := &http.Client{}
+
+   client.Timeout = 5 * time.Second
+   req, err := http.NewRequest(strings.ToUpper(paramsInput.Method), 
paramsInput.URL, strings.NewReader(string(bodyParams)))
+   if err != nil {
+   return &data.SpecCodeResponse{StatusCode: 
http.StatusInternalServerError}, err
+   }
+   for k, v := range paramsInput.HeaderParams {
+   for _, v1 := range v {
+   req.Header.Add(k, v1)
+   }
+   }
+   resp, err := client.Do(req)
+   if err != nil {
+   return &data.SpecCodeResponse{StatusCode: 
http.StatusInternalServerError}, err
+   }
+   defer func() {
+   if resp != nil {
+   _ = resp.Body.Close()
+   }
+   }()
+
+   body, err := ioutil.ReadAll(resp.Body)
+   if err != nil {
+   return &data.SpecCodeResponse{StatusCode: 
http.StatusInternalServerError}, err
+   }
+   returnData := make(map[string]interface{})
+   result := &Result{}
+   err = json.Unmarshal(body, &returnData)
+   if err != nil {
+   result.Code = resp.StatusCode
+   result.Message = resp.Status
+   result.Data = string(body)
+   } else {
+   result.Code = resp.StatusCode
+   result.Message = resp.Status
+   result.Data = returnData
+
+   }

Review comment:
   We should abstract this so that we could support other protocols such as 
WebSocket and gRPC in the future.





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] nic-chen commented on a change in pull request #958: feat: implement API to get apisix instances status

2020-12-13 Thread GitBox


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



##
File path: api/internal/handler/server_info/server_info_test.go
##
@@ -0,0 +1,156 @@
+/*
+ * 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 server_info
+
+import (
+   "strings"
+   "testing"
+   "time"
+
+   "github.com/shiningrush/droplet"
+   "github.com/stretchr/testify/assert"
+
+   "github.com/apisix/manager-api/internal/core/entity"
+   "github.com/apisix/manager-api/internal/core/storage"
+   "github.com/apisix/manager-api/internal/core/store"
+)
+
+const (
+   SleepTime = 100 * time.Millisecond
+)
+
+var serverInfoHandler *Handler
+
+func init() {
+   err := storage.InitETCDClient([]string{"127.0.0.1:2379"})
+
+   if err != nil {
+   panic(err)
+   }
+   err = store.InitStores()
+   if err != nil {
+   panic(err)
+   }
+
+   serverInfoHandler = &Handler{
+   serverInfoStore: store.GetStore(store.HubKeyServerInfo),
+   }
+}
+
+func create(t *testing.T, ctx droplet.Context, info *entity.ServerInfo) {

Review comment:
   @starsz  we have started to refactor the unit test cases. you can refer 
: 
https://github.com/apache/apisix-dashboard/blob/master/api/internal/handler/consumer/consumer_test.go





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   >