[GitHub] [apisix-dashboard] iamayushdas commented on issue #1632: improve some minor issues

2021-03-21 Thread GitBox


iamayushdas commented on issue #1632:
URL: 
https://github.com/apache/apisix-dashboard/issues/1632#issuecomment-803771798


   Here
   > [5] http://apisix.apache.org/docs/apisix/plugins/batch-requests
   i am not able to find `type` for plugin that i have to put in local _M={}
   can you please tell me more on what type will be used in transformation 
plugins.,i am lil confused


-- 
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] StretchV closed issue #3875: 自定义插件在_M.access中获取为nil

2021-03-21 Thread GitBox


StretchV closed issue #3875:
URL: https://github.com/apache/apisix/issues/3875


   


-- 
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] iamayushdas edited a comment on issue #1632: improve some minor issues

2021-03-21 Thread GitBox


iamayushdas edited a comment on issue #1632:
URL: 
https://github.com/apache/apisix-dashboard/issues/1632#issuecomment-803771798


   >Here
   > [5] http://apisix.apache.org/docs/apisix/plugins/batch-requests
   > i am not able to find `type` for plugin that i have to put in local _M={}
   > can you please tell me more on what type will be used in transformation 
plugins.,i am lil confused
   
   @juzhiyuan 


-- 
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 #3875: 自定义插件在_M.access中获取为nil

2021-03-21 Thread GitBox


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


   >function _M.access(conf, ctx) core.log.error(core.json.encode(ctx)) end
   
   In the `access` phase, you should print the `ctx` parameters like this: 
`function _M.access(conf, ctx) core.log.error(core.json.encode(ctx, true)) end`
   
   By the way, it would be better if you use English.


-- 
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 #3875: 自定义插件在_M.access中获取为nil

2021-03-21 Thread GitBox


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


   It is fine. There may be some unserializable fields added after the rewrite 
phase.
   
   You can dump the exact key instead, like `core.json.encode(ctx.blah)`, or 
using `core.json.encode(ctx, true)`


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

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




[GitHub] [apisix] starsz commented on issue #3251: request help: custom index.html 4xx.html 5xx.html in Apache APISIX

2021-03-21 Thread GitBox


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


   Directly point to apisix.apach.org is not very good.
   
   I think we can do it as follow:
   
   1. Provide a static HTML that contains the apisix.apache.org
   2. Update the ngx_tpl to generate the apisix_error_handler like this:
   
   ```
   error_page 500 502 503 504 @apisix_error_handler;
   ```
   
   By the way, @juzhiyuan can you design a simple static html like this:
   https://github.com/openresty/openresty/blob/master/html/50x.html
   


-- 
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] keenbo commented on issue #3874: bug: [grpc transcoding] Can not convert protobuf message's sub message from json input.

2021-03-21 Thread GitBox


keenbo commented on issue #3874:
URL: https://github.com/apache/apisix/issues/3874#issuecomment-803761533


   > @keenbo Does APISIX dump any related error logs?
   
   No error dump in file */usr/local/apisix/logs/error.log* in the docker 
container.


-- 
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 pull request #1634: fix: improve Route module

2021-03-21 Thread GitBox


juzhiyuan commented on pull request #1634:
URL: https://github.com/apache/apisix-dashboard/pull/1634#issuecomment-803761303


   also cc @guoqqqi to 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-dashboard] juzhiyuan merged pull request #1589: feat: searching upstream by users input while creating new routes

2021-03-21 Thread GitBox


juzhiyuan merged pull request #1589:
URL: https://github.com/apache/apisix-dashboard/pull/1589


   


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

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




[GitHub] [apisix-dashboard] juzhiyuan closed issue #1555: discuss: select upstream in the "Define API Backend Server" should provide a search function

2021-03-21 Thread GitBox


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


   


-- 
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-dashboard] branch master updated: feat: searching upstream by users input in creating new routes (#1589)

2021-03-21 Thread juzhiyuan
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 6a29034  feat: searching upstream by users input in creating new 
routes (#1589)
6a29034 is described below

commit 6a290346db67fdc9fa8cb0aeaea6c9c8d70a7c5f
Author: Bisakh Mondal 
AuthorDate: Mon Mar 22 10:31:34 2021 +0530

feat: searching upstream by users input in creating new routes (#1589)
---
 web/src/components/Upstream/UpstreamForm.tsx | 4 
 1 file changed, 4 insertions(+)

diff --git a/web/src/components/Upstream/UpstreamForm.tsx 
b/web/src/components/Upstream/UpstreamForm.tsx
index cc3c41e..a0c1c6e 100644
--- a/web/src/components/Upstream/UpstreamForm.tsx
+++ b/web/src/components/Upstream/UpstreamForm.tsx
@@ -645,6 +645,7 @@ const UpstreamForm: React.FC = forwardRef(
 }}
   >
  {
@@ -656,6 +657,9 @@ const UpstreamForm: React.FC = forwardRef(
   form.setFieldsValue(DEFAULT_UPSTREAM);
 }
   }}
+  filterOption={(input, item) =>
+item?.children.toLowerCase().includes(input.toLowerCase())
+  }
 >
   {Boolean(!required) && None}
   {[


[GitHub] [apisix] StretchV opened a new issue #3875: 自定义插件在_M.access中获取为nil

2021-03-21 Thread GitBox


StretchV opened a new issue #3875:
URL: https://github.com/apache/apisix/issues/3875


   我在自定义的插件中分别打印ctx:
   `function _M.rewrite(conf, ctx)
   core.log.error("~")
   core.log.error(core.json.encode(ctx, true))
   core.log.error("")
   end`
   
   `function _M.access(conf, ctx)
   core.log.error(core.json.encode(ctx))
   end`
   
   结果在日志中rewrite的可以成功打印出来,但是access中的打印为‘phase_func():nilCannot serialise, 
excessive nesting (1001)’,此路由只加了这一个插件,请问这可能的原因是什么呢,或者排查的思路应该是什么呢


-- 
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 #1639: feat: Improve the regexp, reference some standard projects

2021-03-21 Thread GitBox


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


   ya, here have some examples: https://projects.lukehaas.me/regexhub/
   
   and @LiteSun, could you help to provide some rules from and?


-- 
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 #1639: feat: Improve the regexp, reference some standard projects

2021-03-21 Thread GitBox


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


   ya, here have some examples: https://projects.lukehaas.me/regexhub/
   
   and @LiteSun, could you help to provide some rules from antd?


-- 
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 #1639: feat: Improve the regexp, reference some standard projects

2021-03-21 Thread GitBox


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


   Hello, please have this issue tagged :)


-- 
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] codecov-io edited a comment on pull request #1558: feat:Support duplicate one existing Route

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1558:
URL: https://github.com/apache/apisix-dashboard/pull/1558#issuecomment-791913462


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=h1) 
Report
   > Merging 
[#1558](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=desc) 
(b1a68ee) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/1ba32d9c0b47c06ebb067935692385f28aae9fe5?el=desc)
 (1ba32d9) will **decrease** coverage by `0.64%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1558  +/-   ##
   ==
   - Coverage   71.69%   71.05%   -0.65% 
   ==
 Files 133   47  -86 
 Lines5469 3116-2353 
 Branches  5920 -592 
   ==
   - Hits 3921 2214-1707 
   + Misses   1305  659 -646 
 Partials  243  243  
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `61.77% <ø> (+0.03%)` | :arrow_up: |
   | backend-e2e-test-ginkgo | `47.56% <ø> (-0.31%)` | :arrow_down: |
   | backend-unit-test | `51.81% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv)
 | `41.81% <0.00%> (-1.82%)` | :arrow_down: |
   | 
[api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==)
 | `33.33% <0.00%> (ø)` | |
   | 
[api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==)
 | `73.29% <0.00%> (ø)` | |
   | 
[api/internal/handler/data\_loader/route\_export.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfZXhwb3J0Lmdv)
 | `69.17% <0.00%> (ø)` | |
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `64.91% <0.00%> (ø)` | |
   | 
[...eb/src/components/PluginOrchestration/transform.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbk9yY2hlc3RyYXRpb24vdHJhbnNmb3JtLnRz)
 | | |
   | 
[.../components/PluginOrchestration/DrawPluginStyle.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbk9yY2hlc3RyYXRpb24vRHJhd1BsdWdpblN0eWxlLnRz)
 | | |
   | 
[web/src/pages/Consumer/components/Step1.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9jb21wb25lbnRzL1N0ZXAxLnRzeA==)
 | | |
   | 
[web/src/pages/User/Logout.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Vc2VyL0xvZ291dC50c3g=)
 | | |
   | 
[...b/src/pages/User/components/LoginMethodExample.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Vc2VyL2NvbXBvbmVudHMvTG9naW5NZXRob2RFeGFtcGxlLnRzeA==)
 | | |
   | ... and [81 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=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-dashboard/pull/1558?src=pr=footer).
 Last update 
[1ba32d9...b1a68ee](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=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-dashboard] codecov-io edited a comment on pull request #1558: feat:Support duplicate one existing Route

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1558:
URL: https://github.com/apache/apisix-dashboard/pull/1558#issuecomment-791913462


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=h1) 
Report
   > Merging 
[#1558](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=desc) 
(b1a68ee) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/1ba32d9c0b47c06ebb067935692385f28aae9fe5?el=desc)
 (1ba32d9) will **decrease** coverage by `4.71%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1558  +/-   ##
   ==
   - Coverage   71.69%   66.97%   -4.72% 
   ==
 Files 133   47  -86 
 Lines5469 3116-2353 
 Branches  5920 -592 
   ==
   - Hits 3921 2087-1834 
   + Misses   1305  786 -519 
 Partials  243  243  
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `47.56% <ø> (-0.31%)` | :arrow_down: |
   | backend-unit-test | `51.81% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `32.25% <0.00%> (-32.67%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `75.00% <0.00%> (-25.00%)` | :arrow_down: |
   | 
[api/internal/handler/global\_rule/global\_rule.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZ2xvYmFsX3J1bGUvZ2xvYmFsX3J1bGUuZ28=)
 | `66.12% <0.00%> (-17.75%)` | :arrow_down: |
   | 
[api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv)
 | `54.11% <0.00%> (-11.77%)` | :arrow_down: |
   | 
[api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv)
 | `76.47% <0.00%> (-8.83%)` | :arrow_down: |
   | 
[api/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv)
 | `54.05% <0.00%> (-5.41%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `67.28% <0.00%> (-3.74%)` | :arrow_down: |
   | 
[api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=)
 | `52.10% <0.00%> (-3.37%)` | :arrow_down: |
   | 
[api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=)
 | `67.03% <0.00%> (-2.24%)` | :arrow_down: |
   | 
[api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbGFiZWwvbGFiZWwuZ28=)
 | `80.18% <0.00%> (-1.89%)` | :arrow_down: |
   | ... and [89 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=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-dashboard/pull/1558?src=pr=footer).
 Last update 
[1ba32d9...b1a68ee](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=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-dashboard] codecov-io edited a comment on pull request #1558: feat:Support duplicate one existing Route

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1558:
URL: https://github.com/apache/apisix-dashboard/pull/1558#issuecomment-791913462


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=h1) 
Report
   > Merging 
[#1558](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=desc) 
(b1a68ee) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/1ba32d9c0b47c06ebb067935692385f28aae9fe5?el=desc)
 (1ba32d9) will **decrease** coverage by `19.88%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=tree)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#1558   +/-   ##
   ===
   - Coverage   71.69%   51.81%   -19.89% 
   ===
 Files 133   38   -95 
 Lines5469 2650 -2819 
 Branches  5920  -592 
   ===
   - Hits 3921 1373 -2548 
   + Misses   1305 1089  -216 
   + Partials  243  188   -55 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `51.81% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `0.00% <0.00%> (-71.03%)` | :arrow_down: |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | 
[api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=)
 | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | 
[api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=)
 | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
   | 
[api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==)
 | `42.59% <0.00%> (-35.19%)` | :arrow_down: |
   | 
[api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==)
 | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | ... and [117 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=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-dashboard/pull/1558?src=pr=footer).
 Last update 
[1ba32d9...b1a68ee](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=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-dashboard] codecov-io edited a comment on pull request #1604: fix: fix the button margin space

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1604:
URL: https://github.com/apache/apisix-dashboard/pull/1604#issuecomment-802904399


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=h1) 
Report
   > Merging 
[#1604](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=desc) 
(07fb5fe) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/548bbe38f66ff18a6de6567bf13dc5b81a995a46?el=desc)
 (548bbe3) will **increase** coverage by `0.19%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1604  +/-   ##
   ==
   + Coverage   71.05%   71.24%   +0.19% 
   ==
 Files  47   47  
 Lines3116 3116  
   ==
   + Hits 2214 2220   +6 
   + Misses658  653   -5 
   + Partials  244  243   -1 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `61.97% <ø> (+0.19%)` | :arrow_up: |
   | backend-e2e-test-ginkgo | `47.91% <ø> (ø)` | |
   | backend-unit-test | `51.81% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `89.15% <0.00%> (+1.20%)` | :arrow_up: |
   | 
[api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv)
 | `47.27% <0.00%> (+3.63%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=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-dashboard/pull/1604?src=pr=footer).
 Last update 
[548bbe3...07fb5fe](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=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-dashboard] codecov-io edited a comment on pull request #1604: fix: fix the button margin space

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1604:
URL: https://github.com/apache/apisix-dashboard/pull/1604#issuecomment-802904399


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=h1) 
Report
   > Merging 
[#1604](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=desc) 
(07fb5fe) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/548bbe38f66ff18a6de6567bf13dc5b81a995a46?el=desc)
 (548bbe3) will **decrease** coverage by `3.72%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1604  +/-   ##
   ==
   - Coverage   71.05%   67.32%   -3.73% 
   ==
 Files  47   47  
 Lines3116 3116  
   ==
   - Hits 2214 2098 -116 
   - Misses658  772 +114 
   - Partials  244  246   +2 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `47.91% <ø> (ø)` | |
   | backend-unit-test | `51.81% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `35.08% <0.00%> (-29.84%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `75.00% <0.00%> (-25.00%)` | :arrow_down: |
   | 
[api/internal/handler/global\_rule/global\_rule.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZ2xvYmFsX3J1bGUvZ2xvYmFsX3J1bGUuZ28=)
 | `66.12% <0.00%> (-17.75%)` | :arrow_down: |
   | 
[api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv)
 | `54.11% <0.00%> (-11.77%)` | :arrow_down: |
   | 
[api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv)
 | `76.47% <0.00%> (-8.83%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `67.28% <0.00%> (-3.74%)` | :arrow_down: |
   | 
[api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=)
 | `52.10% <0.00%> (-3.37%)` | :arrow_down: |
   | 
[api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=)
 | `67.03% <0.00%> (-2.24%)` | :arrow_down: |
   | 
[api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbGFiZWwvbGFiZWwuZ28=)
 | `80.18% <0.00%> (-1.89%)` | :arrow_down: |
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `87.95% <0.00%> (ø)` | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=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-dashboard/pull/1604?src=pr=footer).
 Last update 
[548bbe3...07fb5fe](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=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-dashboard] codecov-io edited a comment on pull request #1597: test: add the create and delete plugin in drawer

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1597:
URL: https://github.com/apache/apisix-dashboard/pull/1597#issuecomment-799889165


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=h1) 
Report
   > Merging 
[#1597](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=desc) 
(8331f4a) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/548bbe38f66ff18a6de6567bf13dc5b81a995a46?el=desc)
 (548bbe3) will **increase** coverage by `0.19%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1597  +/-   ##
   ==
   + Coverage   71.05%   71.24%   +0.19% 
   ==
 Files  47   47  
 Lines3116 3116  
   ==
   + Hits 2214 2220   +6 
   + Misses658  653   -5 
   + Partials  244  243   -1 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `61.97% <ø> (+0.19%)` | :arrow_up: |
   | backend-e2e-test-ginkgo | `47.75% <ø> (-0.17%)` | :arrow_down: |
   | backend-unit-test | `51.81% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `89.15% <0.00%> (+1.20%)` | :arrow_up: |
   | 
[api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv)
 | `47.27% <0.00%> (+3.63%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=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-dashboard/pull/1597?src=pr=footer).
 Last update 
[548bbe3...8331f4a](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=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-dashboard] codecov-io edited a comment on pull request #1597: test: add the create and delete plugin in drawer

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1597:
URL: https://github.com/apache/apisix-dashboard/pull/1597#issuecomment-799889165


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=h1) 
Report
   > Merging 
[#1597](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=desc) 
(8331f4a) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/548bbe38f66ff18a6de6567bf13dc5b81a995a46?el=desc)
 (548bbe3) will **decrease** coverage by `3.88%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1597  +/-   ##
   ==
   - Coverage   71.05%   67.16%   -3.89% 
   ==
 Files  47   47  
 Lines3116 3116  
   ==
   - Hits 2214 2093 -121 
   - Misses658  779 +121 
 Partials  244  244  
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `47.75% <ø> (-0.17%)` | :arrow_down: |
   | backend-unit-test | `51.81% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `32.25% <0.00%> (-32.67%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `75.00% <0.00%> (-25.00%)` | :arrow_down: |
   | 
[api/internal/handler/global\_rule/global\_rule.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZ2xvYmFsX3J1bGUvZ2xvYmFsX3J1bGUuZ28=)
 | `66.12% <0.00%> (-17.75%)` | :arrow_down: |
   | 
[api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv)
 | `54.11% <0.00%> (-11.77%)` | :arrow_down: |
   | 
[api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv)
 | `76.47% <0.00%> (-8.83%)` | :arrow_down: |
   | 
[api/cmd/managerapi.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2NtZC9tYW5hZ2VyYXBpLmdv)
 | `54.05% <0.00%> (-5.41%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `67.28% <0.00%> (-3.74%)` | :arrow_down: |
   | 
[api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=)
 | `52.10% <0.00%> (-3.37%)` | :arrow_down: |
   | 
[api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=)
 | `67.03% <0.00%> (-2.24%)` | :arrow_down: |
   | 
[api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbGFiZWwvbGFiZWwuZ28=)
 | `80.18% <0.00%> (-1.89%)` | :arrow_down: |
   | ... and [3 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=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-dashboard/pull/1597?src=pr=footer).
 Last update 
[548bbe3...8331f4a](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=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-dashboard] codecov-io edited a comment on pull request #1604: fix: fix the button margin space

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1604:
URL: https://github.com/apache/apisix-dashboard/pull/1604#issuecomment-802904399


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=h1) 
Report
   > Merging 
[#1604](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=desc) 
(07fb5fe) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/548bbe38f66ff18a6de6567bf13dc5b81a995a46?el=desc)
 (548bbe3) will **decrease** coverage by `19.24%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=tree)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#1604   +/-   ##
   ===
   - Coverage   71.05%   51.81%   -19.25% 
   ===
 Files  47   38-9 
 Lines3116 2650  -466 
   ===
   - Hits 2214 1373  -841 
   - Misses658 1089  +431 
   + Partials  244  188   -56 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `51.81% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `0.00% <0.00%> (-71.03%)` | :arrow_down: |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | 
[api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=)
 | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | 
[api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=)
 | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
   | 
[api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==)
 | `42.59% <0.00%> (-35.19%)` | :arrow_down: |
   | 
[api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==)
 | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | ... and [33 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=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-dashboard/pull/1604?src=pr=footer).
 Last update 
[548bbe3...07fb5fe](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=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-dashboard] LiteSun commented on a change in pull request #1558: feat:Support duplicate one existing Route

2021-03-21 Thread GitBox


LiteSun commented on a change in pull request #1558:
URL: https://github.com/apache/apisix-dashboard/pull/1558#discussion_r598414476



##
File path: 
web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js
##
@@ -163,12 +163,15 @@ context('Create and Delete Route', () => {
 
   it('should delete the route', function () {
 cy.visit('/routes/list');
-[newName, duplicateNewName].forEach(function (routeName) {
-  cy.get(this.domSelector.nameSelector).type(routeName);
+const { domSelector, data } = this;
+const routeNames = [newName, duplicateNewName];
+routeNames.forEach(function (routeName) {
+  cy.get(domSelector.nameSelector).type(routeName);
   cy.contains('Search').click();
   cy.contains(routeName).siblings().contains('Delete').click();
   cy.contains('button', 'Confirm').click();
-  cy.get(this.domSelector.notification).should('contain', 
this.data.deleteRouteSuccess);
-}).bind(this);
+  cy.get(domSelector.notification).should('contain', 
data.deleteRouteSuccess);

Review comment:
   To make the test case stable, it would be better to close the 
notification 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] codecov-io edited a comment on pull request #1597: test: add the create and delete plugin in drawer

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1597:
URL: https://github.com/apache/apisix-dashboard/pull/1597#issuecomment-799889165


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=h1) 
Report
   > Merging 
[#1597](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=desc) 
(8331f4a) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/548bbe38f66ff18a6de6567bf13dc5b81a995a46?el=desc)
 (548bbe3) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=tree)
   
   ```diff
   @@   Coverage Diff   @@
   ##   master#1597   +/-   ##
   ===
 Coverage   51.81%   51.81%   
   ===
 Files  38   38   
 Lines2650 2650   
   ===
 Hits 1373 1373   
 Misses   1089 1089   
 Partials  188  188   
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-unit-test | `51.81% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=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-dashboard/pull/1597?src=pr=footer).
 Last update 
[548bbe3...8331f4a](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=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-dashboard] stu01509 commented on pull request #1597: test: add the create and delete plugin in drawer

2021-03-21 Thread GitBox


stu01509 commented on pull request #1597:
URL: https://github.com/apache/apisix-dashboard/pull/1597#issuecomment-803746153


   Hello @nic-chen 
   
   Update the commit.


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

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




[GitHub] [apisix-dashboard] LiteSun commented on pull request #1601: feat: add rawDataEditor

2021-03-21 Thread GitBox


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


   Thanks to all the reviewers ~


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

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




[GitHub] [apisix-dashboard] LiteSun closed issue #1399: support to show raw data for Route, Upstream, Service and so on

2021-03-21 Thread GitBox


LiteSun closed issue #1399:
URL: https://github.com/apache/apisix-dashboard/issues/1399


   


-- 
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-dashboard] branch master updated: feat: add rawDataEditor edit mode (#1601)

2021-03-21 Thread sunyi
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 548bbe3  feat: add rawDataEditor edit mode (#1601)
548bbe3 is described below

commit 548bbe38f66ff18a6de6567bf13dc5b81a995a46
Author: litesun 
AuthorDate: Mon Mar 22 12:06:26 2021 +0800

feat: add rawDataEditor edit mode (#1601)
---
 web/cypress/fixtures/rawDataEditor-dataset.json|  86 ++
 web/cypress/fixtures/selector.json |   1 +
 .../rawDataEditor/test-rawDataEditor.spec.js   |  96 
 web/src/components/RawDataEditor/RawDataEditor.tsx | 124 +++--
 web/src/constants.ts   |   2 +
 web/src/locales/en-US/component.ts |   1 +
 web/src/locales/zh-CN/component.ts |   1 +
 web/src/pages/Consumer/List.tsx|  37 --
 web/src/pages/Route/List.tsx   |  37 --
 .../Route/components/Step1/MatchingRulesView.tsx   |   1 +
 web/src/pages/Route/service.ts |   8 +-
 web/src/pages/Route/typing.d.ts|   4 +-
 web/src/pages/Service/List.tsx |  37 --
 web/src/pages/Upstream/List.tsx|  39 +--
 14 files changed, 430 insertions(+), 44 deletions(-)

diff --git a/web/cypress/fixtures/rawDataEditor-dataset.json 
b/web/cypress/fixtures/rawDataEditor-dataset.json
new file mode 100644
index 000..613322f
--- /dev/null
+++ b/web/cypress/fixtures/rawDataEditor-dataset.json
@@ -0,0 +1,86 @@
+{
+  "Route": {
+"uris": [
+  "/*"
+],
+"name": "root",
+"methods": [
+  "GET",
+  "HEAD",
+  "POST",
+  "PUT",
+  "DELETE",
+  "OPTIONS",
+  "PATCH"
+],
+"upstream": {
+  "nodes": [
+{
+  "host": "12.12.12.12",
+  "port": 80,
+  "weight": 1
+}
+  ],
+  "timeout": {
+"connect": 6000,
+"read": 6000,
+"send": 6000
+  },
+  "type": "roundrobin",
+  "pass_host": "pass"
+},
+"status": 1
+  },
+  "Upstream": {
+"nodes": [
+  {
+"host": "12.12.12.12",
+"port": 80,
+"weight": 1
+  }
+],
+"timeout": {
+  "connect": 6,
+  "read": 6,
+  "send": 6
+},
+"type": "roundrobin",
+"pass_host": "pass",
+"name": "test"
+  },
+  "Service": {
+"name": "test",
+"upstream": {
+  "nodes": [
+{
+  "host": "12.12.12.12",
+  "port": 80,
+  "weight": 1
+}
+  ],
+  "timeout": {
+"connect": 6,
+"read": 6,
+"send": 6
+  },
+  "type": "roundrobin",
+  "pass_host": "pass"
+},
+"plugins": {
+  "jwt-auth": {
+"disable": false
+  }
+}
+  },
+  "Consumer": {
+"username": "test",
+"desc": "desc",
+"plugins": {
+  "basic-auth": {
+"disable": false,
+"password": "test",
+"username": "test"
+  }
+}
+  }
+}
diff --git a/web/cypress/fixtures/selector.json 
b/web/cypress/fixtures/selector.json
index 121adf1..0e1c8d3 100644
--- a/web/cypress/fixtures/selector.json
+++ b/web/cypress/fixtures/selector.json
@@ -13,6 +13,7 @@
   "pluginCard": ".ant-card",
   "pageContent": ".ant-pro-page-container",
 
+  "tableBody":".ant-table-tbody",
   "tableCell": ".ant-table-cell",
   "empty": ".ant-empty-normal",
   "refresh": ".anticon-reload",
diff --git a/web/cypress/integration/rawDataEditor/test-rawDataEditor.spec.js 
b/web/cypress/integration/rawDataEditor/test-rawDataEditor.spec.js
new file mode 100644
index 000..91856ee
--- /dev/null
+++ b/web/cypress/integration/rawDataEditor/test-rawDataEditor.spec.js
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* eslint-disable no-undef */
+
+context('Test RawDataEditor', () => {
+  const timeout = 1000;
+
+  beforeEach(() => {
+cy.login();
+
+cy.fixture('rawDataEditor-dataset.json').as('dataset');
+cy.fixture('selector.json').as('domSelector');
+

[GitHub] [apisix-dashboard] LiteSun merged pull request #1601: feat: add rawDataEditor

2021-03-21 Thread GitBox


LiteSun merged pull request #1601:
URL: https://github.com/apache/apisix-dashboard/pull/1601


   


-- 
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 #1625: docs: Updating docs for e2e tests

2021-03-21 Thread GitBox


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



##
File path: docs/en/latest/back-end-tests.md
##
@@ -0,0 +1,98 @@
+---
+title: Backend Tests

Review comment:
   I think we don't need to move the title, other docs do the same.




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

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




[GitHub] [apisix-dashboard] gxthrj commented on issue #1639: feat: Improve the regexp, reference some standard projects

2021-03-21 Thread GitBox


gxthrj commented on issue #1639:
URL: 
https://github.com/apache/apisix-dashboard/issues/1639#issuecomment-803741783


   Hi, guys.
   
   Are there any good reference projects? Please list them here. I have 
searched many projects on github.
   But there are no standard, only different needs. 
   
   There are some regular libraries, but the regular expressions still need to 
be filled in by yourself.
   
   


-- 
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] gxthrj opened a new issue #1639: feat: Improve the regexp, reference some standard projects

2021-03-21 Thread GitBox


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


   Now, we use `jsonschema` to verfiy the fields of objects.
   
   As @juzhiyuan suggested, Need to modify regexp refer to some standard 
projects . 
   
   For example, verify fields such as name, password, email. This can avoid 
some mistakes.


-- 
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 pull request #3848: feat: add dump for consul_kv

2021-03-21 Thread GitBox


spacewander commented on pull request #3848:
URL: https://github.com/apache/apisix/pull/3848#issuecomment-803740095


   @yongboy 
   You can merge master:
   
https://github.com/apache/apisix/commit/7ae302034a97da1ba33fd136f7892ba44f33abbf


-- 
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] sailershen commented on issue #3843: Using upstream_route, all requests go to node 1. How to evenly distribute the requests to all nodes?

2021-03-21 Thread GitBox


sailershen commented on issue #3843:
URL: https://github.com/apache/apisix/issues/3843#issuecomment-803732635


   Thx for help.
   
   
   ```
   curl http://127.0.0.1:9080/apisix/admin/stream_routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2' -X PUT -d '
   {
   "upstream": {
   "nodes": {
   "172.16.10.241:6500": 1,
   "172.16.10.242:6500": 1
   },
   "type": "roundrobin"
   }
   }'
   ```
   
   or 
   
   ```
   curl http://127.0.0.1:9080/apisix/admin/stream_routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2' -X PUT -d '
   {
   "remote_addr": "127.0.0.1",
   "upstream": {
   "nodes": {
   "172.16.10.241:6500": 1,
   "172.16.10.242:6500": 1
   },
   "type": "roundrobin"
   }
   }'
   ```
   
   it's still failed.
   ```
   telnet 127.0.0.1 6500
   Trying 127.0.0.1...
   Connected to 127.0.0.1.
   Escape character is '^]'.
   Connection closed by foreign host.
   ```


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

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




[GitHub] [apisix-dashboard] LiteSun commented on pull request #1601: feat: add rawDataEditor

2021-03-21 Thread GitBox


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


   ping~ @Jaycean @bzp2010 


-- 
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 #3843: Using upstream_route, all requests go to node 1. How to evenly distribute the requests to all nodes?

2021-03-21 Thread GitBox


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


   Hi, @sailershen  You try to configure two stream_routes together, like this:
   
   > Why not put these two endpoints into one route?
   > 
   > ```json
   >curl http://127.0.0.1:9080/apisix/admin/stream_routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2' -X PUT -d '
   > {
   > "upstream": {
   > "nodes": {
   > "172.16.10.241:6500": 1,
   > "172.16.10.242:6500": 1
   > },
   > "type": "roundrobin"
   > }
   > }'
   > ```


-- 
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 pull request #1597: test: add the create and delete plugin in drawer

2021-03-21 Thread GitBox


nic-chen commented on pull request #1597:
URL: https://github.com/apache/apisix-dashboard/pull/1597#issuecomment-803730145


   @stu01509  please sync codes from branch master


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

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




[GitHub] [apisix-ingress-controller] tokers merged pull request #308: feat: traffic split

2021-03-21 Thread GitBox


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


   


-- 
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: traffic split (#308)

2021-03-21 Thread tokers
This is an automated email from the ASF dual-hosted git repository.

tokers 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 7eded84  feat: traffic split (#308)
7eded84 is described below

commit 7eded843e0f1d3ef4bff4fcb7b5a2d9079d305f3
Author: Alex Zhang 
AuthorDate: Mon Mar 22 11:01:28 2021 +0800

feat: traffic split (#308)

related issue: #289
---
 docs/en/latest/concepts/apisix_route.md|  66 ++-
 docs/en/latest/references/apisix_route_v2alpha1.md |   7 +-
 pkg/kube/apisix/apis/config/v2alpha1/types.go  |  15 +-
 .../apis/config/v2alpha1/zz_generated.deepcopy.go  |  11 +
 pkg/kube/translation/apisix_route.go   |  96 ++--
 pkg/kube/translation/plugin.go |  63 +++
 pkg/kube/translation/plugin_test.go| 531 +
 pkg/kube/translation/util.go   |  86 
 pkg/types/apisix/v1/types.go   |  18 +
 test/e2e/features/traffic_split.go |  93 
 test/e2e/scaffold/k8s.go   |  26 +-
 test/e2e/testdata/apisix-gw-config.yaml|   1 +
 12 files changed, 945 insertions(+), 68 deletions(-)

diff --git a/docs/en/latest/concepts/apisix_route.md 
b/docs/en/latest/concepts/apisix_route.md
index 9d0c11f..fc32950 100644
--- a/docs/en/latest/concepts/apisix_route.md
+++ b/docs/en/latest/concepts/apisix_route.md
@@ -85,9 +85,9 @@ spec:
 - /
 methods:
 - GET
-  backend:
-serviceName: foo
-servicePort: 80
+  backends:
+- serviceName: foo
+  servicePort: 80
 ```
 
 The `exprs` allows user to configure match conditions with arbitrary 
predicates in HTTP, such as queries, HTTP headers, Cookie.
@@ -110,9 +110,9 @@ spec:
   name: id
 op: Equal
 value: 2143
-  backend:
-serviceName: foo
-servicePort: 80
+  backends:
+- serviceName: foo
+  servicePort: 80
 ```
 
 The above configuration configures an extra route match condition, which asks 
the
@@ -140,12 +140,52 @@ spec:
   - /*
 methods:
   - GET
-  backend:
-serviceName: foo
-servicePort: 80
-resolveGranularity: service
+  backends:
+- serviceName: foo
+  servicePort: 80
+  resolveGranularity: service
 ```
 
+Weight Based Traffic Split
+--
+
+There can more than one backend specified in one route rule,
+when multiple backends co-exist there, the traffic split based on weights
+will be applied (which actually uses the 
[traffic-split](http://apisix.apache.org/docs/apisix/plugins/traffic-split/) 
plugin in Apache APISIX).
+You can specify weight for each backend, the default weight is `100`.
+
+```yaml
+apiVersion: apisix.apache.org/v2alpha1
+kind: ApisixRoute
+metadata:
+  name: method-route
+spec:
+  http:
+- name: method
+  match:
+paths:
+  - /*
+methods:
+  - GET
+exprs:
+  - subject:
+  scope: Header
+  name: User-Agent
+op: RegexMatch
+value: ".*Chrome.*"
+  backends:
+- serviceName: foo
+  servicePort: 80
+  weight: 100
+- serviceName: bar
+  servicePort: 81
+  weight: 50
+```
+
+The above `ApisixRoute` has one route rule, which contains two backends `foo` 
and `bar`, the weight ratio is `100:50`,
+which means `2/3` requests (with `GET` method and `User-Agent` matching regex 
pattern `.*Chrome.*`) will be sent to service `foo` and `1/3` requests
+will be proxied to serivce `bar`.
+
 Plugins
 ---
 
@@ -165,9 +205,9 @@ spec:
 - local.httpbin.org
 paths:
   - /*
-  backend:
-serviceName: foo
-servicePort: 80
+  backends:
+- serviceName: foo
+  servicePort: 80
   plugins:
 - name: cors
   enable: true
diff --git a/docs/en/latest/references/apisix_route_v2alpha1.md 
b/docs/en/latest/references/apisix_route_v2alpha1.md
index 827d411..999dc21 100644
--- a/docs/en/latest/references/apisix_route_v2alpha1.md
+++ b/docs/en/latest/references/apisix_route_v2alpha1.md
@@ -42,10 +42,15 @@ Meaning of each field in the spec of ApisixRoute are 
followed, the top level fie
 | http[].match.exprs[].op | string | Expression operator, see [Expression 
Operators](#expression-operators) for the detail of enumerations.
 | http[].match.exprs[].value | string | Expected expression result, it's 
exclusive with `http[].match.exprs[].set`.
 | http[].match.exprs[].set | array | Expected expression result set, only used 
when the operator is `In` or `NotIn`, it's exclusive with 
`http[].match.exprs[].value`.
-| http[].backend | object | The backend service
+| http[].backend | object | The backend service. 

[GitHub] [apisix-ingress-controller] tokers closed issue #289: Support Traffic Split in ApisixRoute

2021-03-21 Thread GitBox


tokers closed issue #289:
URL: https://github.com/apache/apisix-ingress-controller/issues/289


   


-- 
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 closed issue #758: [DISCUSS] Create a new file to generalize error response

2021-03-21 Thread GitBox


nic-chen closed issue #758:
URL: https://github.com/apache/apisix-dashboard/issues/758


   


-- 
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-dashboard] branch master updated (29e9487 -> fe407d1)

2021-03-21 Thread chenjunxu
This is an automated email from the ASF dual-hosted git repository.

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


from 29e9487  fix: use APISIX 2.4 to run backend E2E test (#1638)
 add fe407d1  chore: generalize error msg to error.go (#1637)

No new revisions were added by this update.

Summary of changes:
 .../handler/authentication/authentication.go   |  4 +--
 api/internal/handler/consumer/consumer.go  |  4 +--
 api/internal/handler/data_loader/route_export.go   | 13 +-
 api/internal/handler/data_loader/route_import.go   |  7 +++--
 api/internal/handler/route/route.go|  4 +--
 api/internal/handler/ssl/ssl.go|  9 +++
 api/internal/utils/consts/error.go | 30 +-
 7 files changed, 49 insertions(+), 22 deletions(-)


[GitHub] [apisix-dashboard] nic-chen merged pull request #1637: chore: generalize error msg to error.go

2021-03-21 Thread GitBox


nic-chen merged pull request #1637:
URL: https://github.com/apache/apisix-dashboard/pull/1637


   


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

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




[GitHub] [apisix-docker] gxthrj commented on a change in pull request #152: feat: add apisix-dashboard dockerfile & CI

2021-03-21 Thread GitBox


gxthrj commented on a change in pull request #152:
URL: https://github.com/apache/apisix-docker/pull/152#discussion_r598397117



##
File path: .github/workflows/dashboard-docker-test.yaml
##
@@ -0,0 +1,41 @@
+name: dashboard docker test
+
+on:
+  push:
+branches:
+  - master
+  pull_request:
+branches:
+  - master
+
+jobs:
+  dashboard-docker-test:
+name: build dashboard & test
+runs-on: ubuntu-latest
+env:
+  APISIX_DASHBOARD_TAG: 2.4

Review comment:
   Yes, after the release of dashboard, need to update. The same as the 
APISIX.




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

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




[GitHub] [apisix-dashboard] gxthrj commented on a change in pull request #1625: docs: Updating docs for e2e tests

2021-03-21 Thread GitBox


gxthrj commented on a change in pull request #1625:
URL: https://github.com/apache/apisix-dashboard/pull/1625#discussion_r598396572



##
File path: docs/en/latest/back-end-tests.md
##
@@ -0,0 +1,98 @@
+---
+title: Backend Tests
+---
+
+
+
+This document describes how to write unit tests & e2e tests for the backend.
+
+## Writing Unit Tests
+
+Currently, all of the unit tests for `manager-api` have been written using 
Go's built-in testing package. There is nothing new about it. You can directly 
add tests in the existing `_test.go` file or create a new one. There is 
one thing that needs to be addressed that is, since `manager-api` largely 
depends on handling data from etcd, in some cases, you need to write some 
feature that depends on storing & retrieval of information on and out of etcd. 
In such a scenario, you should write your unit tests using 
`store.MockInterface` instead of directly depending upon etcd.
+
+The `MockInterface` embeds `mock.Mock` object from 
[mock](https://pkg.go.dev/github.com/stretchr/testify/mock) package by testify. 
If helps in simulating function calls of an object with desired inputs as 
arguments and outputs as return values. Currently, all the unit tests in 
`route`, `service`, `ssl` and `upstream` handlers uses mock interface. For eg.
+
+```go
+mStore := {}
+mStore.On("", mock.Anything)
+  .Run(func(args mock.Arguments) {
+   //arguements assertions or anything
+   //gets executed before returning
+   })
+  .Return("")
+```
+
+You may tinker with the mentioned tests to get an idea of how it works or go 
through the 
[docs](https://pkg.go.dev/github.com/stretchr/testify/mock#pkg-index).
+
+## Writing E2E Tests
+
+Currently, the backend of apisix-dashboard have two types of e2e tests. One is 
plain e2e, the other is e2enew, where in the first one, tests are written using 
Go's built-in, native testing package, for the later, the tests are grouped 
into test suites and are evaluated using 
[ginkgo](https://onsi.github.io/ginkgo/) - a testing framework which helps in 
writing more expressive tests such that reading and writing tests give a 
pleasant experience.
+
+**Slowly, we are migrating all of our e2e tests to e2enew. So it is always 
recommended to write any new tests using ginkgo unless some situation arises. 
In such cases, please discuss your concerns with the community.
+
+For value assertion, we are using the 
[assert](https://pkg.go.dev/github.com/stretchr/testify@v1.7.0/assert) package 
by testify. It provides lots of easy to use functions for assertion where the 
first argument is   `*testing.T` object which you can obtain from the used 
framework for testing. For the built-in testing package, each test cases have 
this as the first argument of the test itself. For ginkgo `ginkgo.GinkgoT()` 
returns the mentioned object.
+
+If you are creating any test which requires making HTTP calls to any of the 
following node which involves `manager-api` or `apisix`, after setting up the 
environment (please refer [`backend-e2e.md`](./back-end-e2e.md) for the 
details), you can use the `HttpTestCase` struct which provides a nice interface 
to make the calls along with checking the response. Here's a brief description 
of the most used fields of the struct,
+
+```go
+type HttpTestCase struct {
+Desc  string// Description about the test case.
+Object*httpexpect.Expect// returns a httpexpect object i.e. on 
which host the request is going to be made.
+Methodstring// HTTP request methods ( GET, POST, 
PATCH, PUT, DELETE, OPTIONS).
+Path  string// the route path of that host
+Query string// Query params
+Body  string// The request Body. Commonly used in 
POST, PUT, PATCH.
+Headers   map[string]string // Request headers. Include 
authorization header for secure routes.
+ExpectStatus  int   // Expected HTTP status code from the 
response
+ExpectCodeint   // Code generated by the host. 
Generally 0 for http.StatusOK.
+ExpectMessage string// The response message provided in 
the response by the host.
+ExpectBodyinterface{}   // The expected message body as a 
response.
+Sleep time.Duration //ms// Cooldown period before making next 
request.
+}
+```
+
+Now to run a test use `RunTestCase(tc HttpTestCase)` or `testCaseCheck(tc 
HttpTestCase, t *testing.T)` for the `e2enew` or `e2e` respectively.

Review comment:
   +1 Add a note here, only accept ginkgo test in new PR




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

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




[GitHub] [apisix-ingress-controller] tokers commented on a change in pull request #308: feat: traffic split

2021-03-21 Thread GitBox


tokers commented on a change in pull request #308:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/308#discussion_r598393337



##
File path: docs/en/latest/concepts/apisix_route.md
##
@@ -139,12 +139,46 @@ spec:
   - /*
 methods:
   - GET
-  backend:
-serviceName: foo
-servicePort: 80
-resolveGranularity: service
+  backends:
+- serviceName: foo
+  servicePort: 80
+  resolveGranularity: service
 ```
 
+Weight Based Traffic Split
+--
+
+There can more than one backend specified in one route rule,
+when multiple backends co-exist there, the traffic split based on weights
+will be applied (which actually uses the 
[traffic-split](http://apisix.apache.org/docs/apisix/plugins/traffic-split/) 
plugin in Apache APISIX).
+You can specify weight for each backend, the default weight is `100`.
+
+```yaml
+apiVersion: apisix.apache.org/v2alpha1
+kind: ApisixRoute
+metadata:
+  name: method-route
+spec:
+  http:
+- name: method
+  match:
+paths:
+  - /*
+methods:
+  - GET
+  backends:
+- serviceName: foo
+  servicePort: 80
+  weight: 100
+- serviceName: bar
+  servicePort: 81
+  weight: 50
+```
+
+The above `ApisixRoute` has one route rule, which contains two backends `foo` 
and `bar`, the
+weight ratio is `100:50`, which means `2/3` requests will be sent to service 
`foo` and `1/3` requests
+will be proxied to serivce `bar`.
+

Review comment:
   Added.




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

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




[GitHub] [apisix-docker] starsz commented on a change in pull request #152: feat: add apisix-dashboard dockerfile & CI

2021-03-21 Thread GitBox


starsz commented on a change in pull request #152:
URL: https://github.com/apache/apisix-docker/pull/152#discussion_r598393165



##
File path: .github/workflows/dashboard-docker-test.yaml
##
@@ -0,0 +1,41 @@
+name: dashboard docker test
+
+on:
+  push:
+branches:
+  - master
+  pull_request:
+branches:
+  - master
+
+jobs:
+  dashboard-docker-test:
+name: build dashboard & test
+runs-on: ubuntu-latest
+env:
+  APISIX_DASHBOARD_TAG: 2.4

Review comment:
   So when we update the apisix-dashboard version. Do we need to update it 
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] starsz commented on pull request #1601: feat: add rawDataEditor

2021-03-21 Thread GitBox


starsz commented on pull request #1601:
URL: https://github.com/apache/apisix-dashboard/pull/1601#issuecomment-803722466


   > Just sync master branch code and all CI passed. Please review when you 
have time. @nic-chen @starsz @bzp2010
   
   Sorry, I can't review the frontend PR.


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

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




[GitHub] [apisix-docker] gxthrj commented on a change in pull request #152: feat: add apisix-dashboard dockerfile & CI

2021-03-21 Thread GitBox


gxthrj commented on a change in pull request #152:
URL: https://github.com/apache/apisix-docker/pull/152#discussion_r598389835



##
File path: dashboard/Dockerfile
##
@@ -0,0 +1,69 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+FROM alpine:latest as pre-build
+
+ARG APISIX_DASHBOARD_VERSION=v2.4
+
+RUN set -x \
+&& apk add --no-cache --virtual .builddeps git \
+&& git clone https://github.com/apache/apisix-dashboard.git -b 
${APISIX_DASHBOARD_VERSION} /usr/local/apisix-dashboard \
+&& cd /usr/local/apisix-dashboard && git clean -Xdf \
+&& rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash
+
+FROM golang:1.14 as api-builder
+
+ARG ENABLE_PROXY=false
+
+WORKDIR /usr/local/apisix-dashboard
+
+COPY --from=pre-build /usr/local/apisix-dashboard .
+
+RUN if [ "$ENABLE_PROXY" = "true" ] ; then go env -w 
GOPROXY=https://goproxy.io,direct ; fi \
+&& go env -w GO111MODULE=on \
+&& CGO_ENABLED=0 ./api/build.sh
+
+FROM node:14-alpine as fe-builder
+
+ARG ENABLE_PROXY=false
+
+WORKDIR /usr/local/apisix-dashboard
+
+COPY --from=pre-build /usr/local/apisix-dashboard .
+
+WORKDIR /usr/local/apisix-dashboard/web
+
+RUN if [ "$ENABLE_PROXY" = "true" ] ; then yarn config set registry 
https://registry.npm.taobao.org/ ; fi \
+&& yarn install \
+&& yarn build
+
+FROM alpine:latest as prod
+
+ARG ENABLE_PROXY=false
+
+RUN if [ "$ENABLE_PROXY" = "true" ] ; then sed -i 
's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories ; fi
+
+WORKDIR /usr/local/apisix-dashboard
+
+COPY --from=api-builder /usr/local/apisix-dashboard/output/ ./
+
+COPY --from=fe-builder /usr/local/apisix-dashboard/output/ ./
+
+RUN mkdir logs
+
+EXPOSE 9000
+
+CMD [ "/usr/local/apisix-dashboard/manager-api" ]

Review comment:
   fixed




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

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




[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1637: chore: generalize error msg to error.go

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1637:
URL: https://github.com/apache/apisix-dashboard/pull/1637#issuecomment-803517079


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1637?src=pr=h1) 
Report
   > Merging 
[#1637](https://codecov.io/gh/apache/apisix-dashboard/pull/1637?src=pr=desc) 
(c94a18b) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/29e948745fc30369c0f1c92c1abc54c7f339ed50?el=desc)
 (29e9487) will **increase** coverage by `1.41%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1637/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1637?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1637  +/-   ##
   ==
   + Coverage   72.32%   73.74%   +1.41% 
   ==
 Files 134   87  -47 
 Lines5645 2529-3116 
 Branches  651  651  
   ==
   - Hits 4083 1865-2218 
   + Misses   1318  664 -654 
   + Partials  2440 -244 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `73.74% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1637?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/utils/json\_patch.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1637/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2pzb25fcGF0Y2guZ28=)
 | | |
   | 
[api/internal/utils/pid.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1637/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3BpZC5nbw==)
 | | |
   | 
[api/internal/filter/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1637/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9hdXRoZW50aWNhdGlvbi5nbw==)
 | | |
   | 
[api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1637/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv)
 | | |
   | 
[api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1637/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbGFiZWwvbGFiZWwuZ28=)
 | | |
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1637/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | | |
   | 
[api/internal/core/storage/etcd.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1637/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmFnZS9ldGNkLmdv)
 | | |
   | 
[api/internal/log/log.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1637/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2xvZy9sb2cuZ28=)
 | | |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1637/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | | |
   | 
[api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1637/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==)
 | | |
   | ... and [31 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1637/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1637?src=pr=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-dashboard/pull/1637?src=pr=footer).
 Last update 
[29e9487...c94a18b](https://codecov.io/gh/apache/apisix-dashboard/pull/1637?src=pr=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-dashboard] juzhiyuan commented on issue #1482: how to delete the historical version of the APISIX node.

2021-03-21 Thread GitBox


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






-- 
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 merged pull request #3872: test: use longer timeout for internet DNS query

2021-03-21 Thread GitBox


tokers merged pull request #3872:
URL: https://github.com/apache/apisix/pull/3872


   


-- 
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: test: use longer timeout for internet DNS query (#3872)

2021-03-21 Thread tokers
This is an automated email from the ASF dual-hosted git repository.

tokers 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 7ae3020  test: use longer timeout for internet DNS query (#3872)
7ae3020 is described below

commit 7ae302034a97da1ba33fd136f7892ba44f33abbf
Author: 罗泽轩 
AuthorDate: Mon Mar 22 10:05:50 2021 +0800

test: use longer timeout for internet DNS query (#3872)

Signed-off-by: spacewander 
---
 t/core/utils.t | 1 +
 t/node/invalid-route.t | 1 +
 t/node/route-domain.t  | 3 +++
 3 files changed, 5 insertions(+)

diff --git a/t/core/utils.t b/t/core/utils.t
index c5ea0bb..3126c09 100644
--- a/t/core/utils.t
+++ b/t/core/utils.t
@@ -317,3 +317,4 @@ apisix:
 GET /t
 --- error_log
 error: failed to query the DNS server
+--- timeout: 10
diff --git a/t/node/invalid-route.t b/t/node/invalid-route.t
index 5fa051c..3f1c293 100644
--- a/t/node/invalid-route.t
+++ b/t/node/invalid-route.t
@@ -161,3 +161,4 @@ GET /server_port
 --- error_code: 503
 --- error_log
 failed to parse domain: .invalid
+--- timeout: 10
diff --git a/t/node/route-domain.t b/t/node/route-domain.t
index 266a692..4f240a2 100644
--- a/t/node/route-domain.t
+++ b/t/node/route-domain.t
@@ -80,6 +80,7 @@ hello world
 [error]
 --- error_log eval
 qr/dns resolver domain: www.apiseven.com to \d+.\d+.\d+.\d+/
+--- timeout: 10
 
 
 
@@ -125,6 +126,7 @@ GET /uri
 qr/host: httpbin.org/
 --- no_error_log
 [error]
+--- timeout: 10
 
 
 
@@ -170,3 +172,4 @@ GET /get
 qr/"Host": "httpbin.org"/
 --- no_error_log
 [error]
+--- timeout: 10


[GitHub] [apisix-docker] gxthrj commented on a change in pull request #152: feat: add apisix-dashboard dockerfile & CI

2021-03-21 Thread GitBox


gxthrj commented on a change in pull request #152:
URL: https://github.com/apache/apisix-docker/pull/152#discussion_r598383551



##
File path: .github/workflows/dashboard-docker-test.yaml
##
@@ -0,0 +1,41 @@
+name: dashboard docker test
+
+on:
+  push:
+branches:
+  - master
+  pull_request:
+branches:
+  - master
+
+jobs:
+  dashboard-docker-test:
+name: build dashboard & test
+runs-on: ubuntu-latest
+env:
+  APISIX_DASHBOARD_TAG: 2.4

Review comment:
   The versoin is for docker image,not for the branch of APISIX dashboard.




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

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




[GitHub] [apisix] sailershen edited a comment on issue #3843: Using upstream_route, all requests go to node 1. How to evenly distribute the requests to all nodes?

2021-03-21 Thread GitBox


sailershen edited a comment on issue #3843:
URL: https://github.com/apache/apisix/issues/3843#issuecomment-803712314


   Thx.
   Now I try to use "remote_addr".
   ```
   # node 1
   curl http://127.0.0.1:9080/apisix/admin/stream_routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2' -X PUT -d '
   {
   "remote_addr": "127.0.0.1",
   "upstream": {
   "nodes": {
   "172.16.10.241:6500": 1
   },
   "type": "roundrobin"
   }
   }'
   ```
   
   ```
   # node 2
   curl http://127.0.0.1:9080/apisix/admin/stream_routes/2 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2' -X PUT -d '
   {
   "remote_addr": "127.0.0.1",
   "upstream": {
   "nodes": {
   "172.16.10.242:6500": 1
   },
   "type": "roundrobin"
   }
   }'
   ```
   
   Show the stream_routes:
   ```
   curl http://127.0.0.1:9080/apisix/admin/stream_routes/ -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2'
   ```
   
   Output:
   `
   
{"count":"3","node":{"key":"\/apisix\/stream_routes","nodes":[{"createdIndex":8533,"value":{"remote_addr":"127.0.0.1","upstream":{"pass_host":"pass","nodes":{"172.16.10.241:6500":1},"scheme":"http","hash_on":"vars","type":"roundrobin"},"id":"1"},"modifiedIndex":8533,"key":"\/apisix\/stream_routes\/1"},{"createdIndex":8534,"value":{"remote_addr":"127.0.0.1","upstream":{"pass_host":"pass","nodes":{"172.16.10.242:6500":1},"scheme":"http","hash_on":"vars","type":"roundrobin"},"id":"2"},"modifiedIndex":8534,"key":"\/apisix\/stream_routes\/2"}],"dir":true},"action":"get"}
   `
   
   But when I telnet to 127.0.0.1:6500, it's failed:
   ```
   telnet 127.0.0.1 6500
   Trying 127.0.0.1...
   Connected to 127.0.0.1.
   Escape character is '^]'.
   Connection closed by foreign host.
   ```


-- 
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] sailershen commented on issue #3843: Using upstream_route, all requests go to node 1. How to evenly distribute the requests to all nodes?

2021-03-21 Thread GitBox


sailershen commented on issue #3843:
URL: https://github.com/apache/apisix/issues/3843#issuecomment-803712314


   Thx.
   Now I try to use "remote_addr".
   ```
   # node 1
   curl http://127.0.0.1:9080/apisix/admin/stream_routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2' -X PUT -d '
   {
   "remote_addr": "127.0.0.1",
   "upstream": {
   "nodes": {
   "172.16.10.241:6500": 1
   },
   "type": "roundrobin"
   }
   }'
   ```
   
   ```
   # node 2
   curl http://127.0.0.1:9080/apisix/admin/stream_routes/2 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2' -X PUT -d '
   {
   "remote_addr": "127.0.0.1",
   "upstream": {
   "nodes": {
   "172.16.10.242:6500": 1
   },
   "type": "roundrobin"
   }
   }'
   ```
   
   Show the stream_routes:
   ```
   curl http://127.0.0.1:9080/apisix/admin/stream_routes/ -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2'
   ```
   
   Output:
   `
   
{"count":"3","node":{"key":"\/apisix\/stream_routes","nodes":[{"createdIndex":8533,"value":{"remote_addr":"127.0.0.1","upstream":{"pass_host":"pass","nodes":{"172.16.10.241:6500":1},"scheme":"http","hash_on":"vars","type":"roundrobin"},"id":"1"},"modifiedIndex":8533,"key":"\/apisix\/stream_routes\/1"},{"createdIndex":8534,"value":{"remote_addr":"127.0.0.1","upstream":{"pass_host":"pass","nodes":{"172.16.10.242:6500":1},"scheme":"http","hash_on":"vars","type":"roundrobin"},"id":"2"},"modifiedIndex":8534,"key":"\/apisix\/stream_routes\/2"}],"dir":true},"action":"get"}
   `
   
   But when I telnet to node 1 or to


-- 
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] yongboy commented on pull request #3848: feat: add dump for consul_kv

2021-03-21 Thread GitBox


yongboy commented on pull request #3848:
URL: https://github.com/apache/apisix/pull/3848#issuecomment-803712161


   @spacewander 
   How to fix the ci error, maybe you can help me :))
   
   ```
   #   Failed test 'ERROR: client socket timed out - TEST 9: disable search 
option
   # '
   #   at /home/runner/work/apisix/apisix/test-nginx/lib/Test/Nginx/Socket.pm 
line 2094.
   
   #   Failed test 'TEST 9: disable search option - status code ok'
   #   at /home/runner/work/apisix/apisix/test-nginx/lib/Test/Nginx/Socket.pm 
line 948.
   #  got: ''
   # expected: '200'
   
   #   Failed test 'TEST 9: disable search option - pattern "error: failed to 
query the DNS server" should match a line in error.log (req 0)'
   #   at /home/runner/work/apisix/apisix/test-nginx/lib/Test/Nginx/Socket.pm 
line 1213.
   t/core/utils.t . 
   Failed 3/25 subtests 
   ```


-- 
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] yongboy commented on a change in pull request #3848: feat: add dump for consul_kv

2021-03-21 Thread GitBox


yongboy commented on a change in pull request #3848:
URL: https://github.com/apache/apisix/pull/3848#discussion_r598381489



##
File path: apisix/discovery/consul_kv.lua
##
@@ -244,7 +244,7 @@ end
 local function read_dump_srvs()
 local data, err = util.read_file(dump_params.path)
 if not data then
-log.warn("read dump file get error: ", err)
+log.notice("read dump file get error: ", err)

Review comment:
   I think we don't need toimport the heavy library `penlight` at the 
moment. It is so heavy!
   If another one needs it really, then we can change the code later.




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

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




[GitHub] [apisix-dashboard] LiteSun edited a comment on pull request #1601: feat: add rawDataEditor

2021-03-21 Thread GitBox


LiteSun edited a comment on pull request #1601:
URL: https://github.com/apache/apisix-dashboard/pull/1601#issuecomment-803706471


   Just sync master branch code and all CI passed. Please review when you have 
time. @nic-chen @starsz @bzp2010  


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

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




[GitHub] [apisix-dashboard] LiteSun commented on pull request #1601: feat: add rawDataEditor

2021-03-21 Thread GitBox


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


   Just async master code and all CI passed. Please review when you have time. 
@nic-chen @starsz @bzp2010  


-- 
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] codecov-io edited a comment on pull request #1610: feat: improve the config plugin button enable disable status

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1610:
URL: https://github.com/apache/apisix-dashboard/pull/1610#issuecomment-803254054


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1610?src=pr=h1) 
Report
   > Merging 
[#1610](https://codecov.io/gh/apache/apisix-dashboard/pull/1610?src=pr=desc) 
(b21caf8) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/1ba32d9c0b47c06ebb067935692385f28aae9fe5?el=desc)
 (1ba32d9) will **increase** coverage by `2.08%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1610/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1610?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1610  +/-   ##
   ==
   + Coverage   71.69%   73.77%   +2.08% 
   ==
 Files 133   87  -46 
 Lines5469 2532-2937 
 Branches  592  654  +62 
   ==
   - Hits 3921 1868-2053 
   + Misses   1305  664 -641 
   + Partials  2430 -243 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `73.77% <100.00%> (+1.19%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1610?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[web/src/components/Plugin/PluginPage.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1610/diff?src=pr=tree#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9QbHVnaW5QYWdlLnRzeA==)
 | `97.46% <100.00%> (+0.09%)` | :arrow_up: |
   | 
[web/src/pages/SSL/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1610/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9TU0wvTGlzdC50c3g=)
 | `84.00% <0.00%> (-4.89%)` | :arrow_down: |
   | 
[web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1610/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==)
 | `85.18% <0.00%> (-4.82%)` | :arrow_down: |
   | 
[web/src/pages/Upstream/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1610/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9MaXN0LnRzeA==)
 | `85.18% <0.00%> (-4.82%)` | :arrow_down: |
   | 
[web/src/pages/Route/transform.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1610/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS90cmFuc2Zvcm0udHM=)
 | `72.56% <0.00%> (-1.44%)` | :arrow_down: |
   | 
[web/src/pages/Route/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1610/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9MaXN0LnRzeA==)
 | `83.09% <0.00%> (-0.61%)` | :arrow_down: |
   | 
[web/src/pages/PluginTemplate/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1610/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW5UZW1wbGF0ZS9MaXN0LnRzeA==)
 | `72.50% <0.00%> (-0.23%)` | :arrow_down: |
   | 
[web/src/pages/Route/components/Step3/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1610/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1N0ZXAzL2luZGV4LnRzeA==)
 | `51.85% <0.00%> (-0.15%)` | :arrow_down: |
   | 
[web/src/pages/Route/constants.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1610/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb25zdGFudHMudHM=)
 | `100.00% <0.00%> (ø)` | |
   | 
[web/src/pages/Route/components/Step1/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1610/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1N0ZXAxL2luZGV4LnRzeA==)
 | `100.00% <0.00%> (ø)` | |
   | ... and [54 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1610/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1610?src=pr=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-dashboard/pull/1610?src=pr=footer).
 Last update 
[1ba32d9...b21caf8](https://codecov.io/gh/apache/apisix-dashboard/pull/1610?src=pr=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-dashboard] codecov-io edited a comment on pull request #1604: fix: fix the button margin space

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1604:
URL: https://github.com/apache/apisix-dashboard/pull/1604#issuecomment-802904399


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=h1) 
Report
   > Merging 
[#1604](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=desc) 
(59d4774) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/1ba32d9c0b47c06ebb067935692385f28aae9fe5?el=desc)
 (1ba32d9) will **increase** coverage by `2.04%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1604  +/-   ##
   ==
   + Coverage   71.69%   73.74%   +2.04% 
   ==
 Files 133   87  -46 
 Lines5469 2529-2940 
 Branches  592  651  +59 
   ==
   - Hits 3921 1865-2056 
   + Misses   1305  664 -641 
   + Partials  2430 -243 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `73.74% <ø> (+1.16%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[web/src/pages/Upstream/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9MaXN0LnRzeA==)
 | `85.18% <ø> (-4.82%)` | :arrow_down: |
   | 
[web/src/pages/SSL/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9TU0wvTGlzdC50c3g=)
 | `84.00% <0.00%> (-4.89%)` | :arrow_down: |
   | 
[web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==)
 | `85.18% <0.00%> (-4.82%)` | :arrow_down: |
   | 
[web/src/pages/Route/transform.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS90cmFuc2Zvcm0udHM=)
 | `72.56% <0.00%> (-1.44%)` | :arrow_down: |
   | 
[web/src/pages/Route/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9MaXN0LnRzeA==)
 | `83.09% <0.00%> (-0.61%)` | :arrow_down: |
   | 
[web/src/pages/PluginTemplate/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW5UZW1wbGF0ZS9MaXN0LnRzeA==)
 | `72.50% <0.00%> (-0.23%)` | :arrow_down: |
   | 
[web/src/pages/Route/components/Step3/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1N0ZXAzL2luZGV4LnRzeA==)
 | `51.85% <0.00%> (-0.15%)` | :arrow_down: |
   | 
[web/src/pages/Route/constants.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb25zdGFudHMudHM=)
 | `100.00% <0.00%> (ø)` | |
   | 
[web/src/pages/Route/components/Step1/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1N0ZXAxL2luZGV4LnRzeA==)
 | `100.00% <0.00%> (ø)` | |
   | ... and [54 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1604/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=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-dashboard/pull/1604?src=pr=footer).
 Last update 
[1ba32d9...59d4774](https://codecov.io/gh/apache/apisix-dashboard/pull/1604?src=pr=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-dashboard] liuxiran commented on pull request #1604: fix: fix the button margin space

2021-03-21 Thread GitBox


liuxiran commented on pull request #1604:
URL: https://github.com/apache/apisix-dashboard/pull/1604#issuecomment-803701783


   > Hi @liuxiran
   > 
   > Update the commit.
   
   LGTM, be ci errors have been solved by #1638 , please try to update master 
to soluve it, thanks @stu01509 


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

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




[GitHub] [apisix] tokers commented on a change in pull request #3871: docs: admin-api.md document adds configuration https example

2021-03-21 Thread GitBox


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



##
File path: docs/en/latest/admin-api.md
##
@@ -657,12 +659,44 @@ After the execution is successful, nodes will not retain 
the original data, and
 
 ```
 
+Example 2: How to proxy upstream https.

Review comment:
   Bad title, I think "How to proxy requests to upstream with HTTPS scheme" 
is better.

##
File path: docs/zh/latest/admin-api.md
##
@@ -665,11 +668,42 @@ HTTP/1.1 200 OK
 
 ```
 
+示例二:如何代理上游 https。
+
+1、创建 route 并 配置 upstream 的 scheme 为 `https`。
+
+```shell
+$ curl -i http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+"uri": "/get",
+"upstream": {
+"type": "roundrobin",
+"scheme": "https",
+"nodes": {
+"httpbin.org:443": 1
+}
+}
+}'
+```
+
+执行成功后,请求与上游通信时的 scheme 将为 `https`。
+
+2、 发送请求进行测试。
+
+```shell
+$ curl http://127.0.0.1:9080/get -i

Review comment:
   IMHO, this test case lacks persuasion. You'd better also print the 
result returned by the upstream.

##
File path: docs/zh/latest/admin-api.md
##
@@ -665,11 +668,42 @@ HTTP/1.1 200 OK
 
 ```
 
+示例二:如何代理上游 https。
+
+1、创建 route 并 配置 upstream 的 scheme 为 `https`。

Review comment:
   The empty space between `并` and `配置` is redundant.




-- 
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 #3846: request help: Include message body when performing HMAC authentication

2021-03-21 Thread GitBox


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


   > Yes, it is not supported by default.
   > I think we could add a custom header (the hash value of the body) to 
judge, instead of reading the body directly for comparison.
   
   You may refer to the [Content-MD5 
header](https://tools.ietf.org/html/rfc1864), it's analogous.


-- 
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-dashboard] branch master updated: fix: use APISIX 2.4 to run backend E2E test (#1638)

2021-03-21 Thread sunyi
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 29e9487  fix: use APISIX 2.4 to run backend E2E test (#1638)
29e9487 is described below

commit 29e948745fc30369c0f1c92c1abc54c7f339ed50
Author: nic-chen <33000667+nic-c...@users.noreply.github.com>
AuthorDate: Mon Mar 22 08:43:18 2021 +0800

fix: use APISIX 2.4 to run backend E2E test (#1638)
---
 api/test/docker/docker-compose.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/api/test/docker/docker-compose.yaml 
b/api/test/docker/docker-compose.yaml
index 1c83ca7..4378f6c 100644
--- a/api/test/docker/docker-compose.yaml
+++ b/api/test/docker/docker-compose.yaml
@@ -131,7 +131,7 @@ services:
   context: ../../
   dockerfile: test/docker/Dockerfile-apisix
   args:
-- APISIX_VERSION=master
+- APISIX_VERSION=2.4
 restart: always
 volumes:
   - ./apisix_config.yaml:/usr/local/apisix/conf/config.yaml:ro
@@ -156,7 +156,7 @@ services:
   context: ../../
   dockerfile: test/docker/Dockerfile-apisix
   args:
-- APISIX_VERSION=master
+- APISIX_VERSION=2.4
 restart: always
 volumes:
   - ./apisix_config2.yaml:/usr/local/apisix/conf/config.yaml:ro


[GitHub] [apisix-dashboard] LiteSun merged pull request #1638: fix: use APISIX 2.4 to run backend E2E test

2021-03-21 Thread GitBox


LiteSun merged pull request #1638:
URL: https://github.com/apache/apisix-dashboard/pull/1638


   


-- 
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] stu01509 commented on pull request #1604: fix: fix the button margin space

2021-03-21 Thread GitBox


stu01509 commented on pull request #1604:
URL: https://github.com/apache/apisix-dashboard/pull/1604#issuecomment-803693642


   Hi @liuxiran 
   
   Update the commit.


-- 
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] stu01509 commented on pull request #1610: feat: improve the config plugin button enable disable status

2021-03-21 Thread GitBox


stu01509 commented on pull request #1610:
URL: https://github.com/apache/apisix-dashboard/pull/1610#issuecomment-803692743


   Hi @juzhiyuan and @guoqqqi 
   
   Update the commit :)


-- 
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] stu01509 commented on pull request #1597: test: add the create and delete plugin in drawer

2021-03-21 Thread GitBox


stu01509 commented on pull request #1597:
URL: https://github.com/apache/apisix-dashboard/pull/1597#issuecomment-803691495


   Hi @guoqqqi 
   
   Update the commit, please review it again.


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

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




[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1558: feat:Support duplicate one existing Route

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1558:
URL: https://github.com/apache/apisix-dashboard/pull/1558#issuecomment-791913462


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=h1) 
Report
   > Merging 
[#1558](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=desc) 
(25b3be9) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/1ba32d9c0b47c06ebb067935692385f28aae9fe5?el=desc)
 (1ba32d9) will **decrease** coverage by `19.88%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=tree)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#1558   +/-   ##
   ===
   - Coverage   71.69%   51.81%   -19.89% 
   ===
 Files 133   38   -95 
 Lines5469 2650 -2819 
 Branches  5920  -592 
   ===
   - Hits 3921 1373 -2548 
   + Misses   1305 1089  -216 
   + Partials  243  188   -55 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `51.81% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `0.00% <0.00%> (-71.03%)` | :arrow_down: |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | 
[api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=)
 | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | 
[api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=)
 | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
   | 
[api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==)
 | `42.59% <0.00%> (-35.19%)` | :arrow_down: |
   | 
[api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==)
 | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | ... and [117 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1558/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=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-dashboard/pull/1558?src=pr=footer).
 Last update 
[1ba32d9...25b3be9](https://codecov.io/gh/apache/apisix-dashboard/pull/1558?src=pr=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-dashboard] nic-chen commented on pull request #1601: feat: add rawDataEditor in route

2021-03-21 Thread GitBox


nic-chen commented on pull request #1601:
URL: https://github.com/apache/apisix-dashboard/pull/1601#issuecomment-803684029


   > > for the be e2e errors, may need @nic-chen @starsz @Jaycean help
   > 
   > This is APISIX delete `consumer.id` Error caused by field incompatibility, 
@nic-chen has been created PR #1638 repaired it, waiting for merge repair.
   
   yes, please help review  PR #1638
   


-- 
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

2021-03-21 Thread GitBox


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


   > Hello guys, can I give it a try to demonize the manager_api which includes 
making the necessary change in the main program (terminating on SIGTERM, 
SIGKILL & reloading configurations on SIGHUP) & create it as a systemd service 
in Linux?
   > Thank you.
   
   sure, PR is welcome!


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

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




[GitHub] [apisix] nic-chen commented on issue #3846: request help: Include message body when performing HMAC authentication

2021-03-21 Thread GitBox


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


   Yes, it is not supported by default. 
   I think we could add a custom header (the hash value of the body) to judge, 
instead of reading the body directly for comparison.
   


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

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




[GitHub] [apisix] nic-chen commented on issue #3874: bug: [grpc transcoding] Can not convert protobuf message's sub message from json input.

2021-03-21 Thread GitBox


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


   > CC @nic-chen
   
   Thanks for reminding, find out the reason later



-- 
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 #1625: docs: Updating docs for e2e tests

2021-03-21 Thread GitBox


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



##
File path: docs/en/latest/back-end-tests.md
##
@@ -0,0 +1,98 @@
+---
+title: Backend Tests
+---
+
+
+
+This document describes how to write unit tests & e2e tests for the backend.
+
+## Writing Unit Tests
+
+Currently, all of the unit tests for `manager-api` have been written using 
Go's built-in testing package. There is nothing new about it. You can directly 
add tests in the existing `_test.go` file or create a new one. There is 
one thing that needs to be addressed that is, since `manager-api` largely 
depends on handling data from etcd, in some cases, you need to write some 
feature that depends on storing & retrieval of information on and out of etcd. 
In such a scenario, you should write your unit tests using 
`store.MockInterface` instead of directly depending upon etcd.
+
+The `MockInterface` embeds `mock.Mock` object from 
[mock](https://pkg.go.dev/github.com/stretchr/testify/mock) package by testify. 
If helps in simulating function calls of an object with desired inputs as 
arguments and outputs as return values. Currently, all the unit tests in 
`route`, `service`, `ssl` and `upstream` handlers uses mock interface. For eg.
+
+```go
+mStore := {}
+mStore.On("", mock.Anything)
+  .Run(func(args mock.Arguments) {
+   //arguements assertions or anything
+   //gets executed before returning
+   })
+  .Return("")
+```
+
+You may tinker with the mentioned tests to get an idea of how it works or go 
through the 
[docs](https://pkg.go.dev/github.com/stretchr/testify/mock#pkg-index).
+
+## Writing E2E Tests
+
+Currently, the backend of apisix-dashboard have two types of e2e tests. One is 
plain e2e, the other is e2enew, where in the first one, tests are written using 
Go's built-in, native testing package, for the later, the tests are grouped 
into test suites and are evaluated using 
[ginkgo](https://onsi.github.io/ginkgo/) - a testing framework which helps in 
writing more expressive tests such that reading and writing tests give a 
pleasant experience.
+
+**Slowly, we are migrating all of our e2e tests to e2enew. So it is always 
recommended to write any new tests using ginkgo unless some situation arises. 
In such cases, please discuss your concerns with the community.
+
+For value assertion, we are using the 
[assert](https://pkg.go.dev/github.com/stretchr/testify@v1.7.0/assert) package 
by testify. It provides lots of easy to use functions for assertion where the 
first argument is   `*testing.T` object which you can obtain from the used 
framework for testing. For the built-in testing package, each test cases have 
this as the first argument of the test itself. For ginkgo `ginkgo.GinkgoT()` 
returns the mentioned object.
+
+If you are creating any test which requires making HTTP calls to any of the 
following node which involves `manager-api` or `apisix`, after setting up the 
environment (please refer [`backend-e2e.md`](./back-end-e2e.md) for the 
details), you can use the `HttpTestCase` struct which provides a nice interface 
to make the calls along with checking the response. Here's a brief description 
of the most used fields of the struct,
+
+```go
+type HttpTestCase struct {
+Desc  string// Description about the test case.
+Object*httpexpect.Expect// returns a httpexpect object i.e. on 
which host the request is going to be made.
+Methodstring// HTTP request methods ( GET, POST, 
PATCH, PUT, DELETE, OPTIONS).
+Path  string// the route path of that host
+Query string// Query params
+Body  string// The request Body. Commonly used in 
POST, PUT, PATCH.
+Headers   map[string]string // Request headers. Include 
authorization header for secure routes.
+ExpectStatus  int   // Expected HTTP status code from the 
response
+ExpectCodeint   // Code generated by the host. 
Generally 0 for http.StatusOK.
+ExpectMessage string// The response message provided in 
the response by the host.
+ExpectBodyinterface{}   // The expected message body as a 
response.
+Sleep time.Duration //ms// Cooldown period before making next 
request.
+}
+```
+
+Now to run a test use `RunTestCase(tc HttpTestCase)` or `testCaseCheck(tc 
HttpTestCase, t *testing.T)` for the `e2enew` or `e2e` respectively.

Review comment:
   > IMO, we can even not describe e2e test. Only introduce how to write 
ginkgo test.
   > For that we are migrating all of our e2e tests to e2enew.
   
   +1 , we could only introduce how to write ginkgo test.
   




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

[GitHub] [apisix-dashboard] bisakhmondal commented on issue #842: feat: support run `manager api` as OS service

2021-03-21 Thread GitBox


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


   Hello guys, can I give it a try to demonize the manager_api which includes 
making the necessary change in the main program (terminating on SIGTERM, 
SIGKILL & reloading configurations on SIGHUP) & create it as a systemd service 
in Linux?
   Thank you.


-- 
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] bisakhmondal commented on a change in pull request #1615: feat: manual deletion of apisix node data

2021-03-21 Thread GitBox


bisakhmondal commented on a change in pull request #1615:
URL: https://github.com/apache/apisix-dashboard/pull/1615#discussion_r598314148



##
File path: api/test/e2e/server_info_delete_test.go
##
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package e2e
+
+import (
+   "net/http"
+   "testing"
+)
+

Review comment:
   Thanks for the details. I think, it totally depends upon the scheduler 
to decide the ordering, modern schedulers such as go's makes a lot of fancy 
optimisation before executing something. For example, without going over the 
overhead of context switching between multiple goroutines for such small 
instruction, it may wait for others to finish and then start itself up.
   
   You can read the full issue in ginkgo mentioned in this 
[comment](https://github.com/apache/apisix-dashboard/pull/1615#discussion_r597392430).
   
   Now coming back to what you suggested, I had tried that, also even I had 
tried to comment out intermediate describe definitions & describeTable to make 
the test suite containing a single describe & describeTable container with a 
sleep timer of 2 whopping seconds in between all the tests. 2/5 times the suit 
fails. The code is available [here](https://pastebin.com/vbGmh9W0)
   TBH, I also get confused about seeing this erratic nature in ginkgo and 
after googling & reading the issue it's the only logical explanation that I 
came up with. 
   Thanks again.
   




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

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




[GitHub] [apisix-dashboard] Jaycean commented on pull request #1601: feat: add rawDataEditor in route

2021-03-21 Thread GitBox


Jaycean commented on pull request #1601:
URL: https://github.com/apache/apisix-dashboard/pull/1601#issuecomment-803620706


   > for the be e2e errors, may need @nic-chen @starsz @Jaycean help
   
   This is APISIX delete `consumer.id` Error caused by field incompatibility, 
@nic-chen has been created PR #1638 repaired it, waiting for merge repair.


-- 
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] guoqqqi commented on a change in pull request #1597: test: add the create and delete plugin in drawer

2021-03-21 Thread GitBox


guoqqqi commented on a change in pull request #1597:
URL: https://github.com/apache/apisix-dashboard/pull/1597#discussion_r598300862



##
File path: web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js
##
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* eslint-disable no-undef */
+
+context('Create and Delete Plugin List', () => {

Review comment:
   ```suggestion
   context('Delete Plugin List with the Drawer', () => {
   ```

##
File path: web/cypress/integration/route/create-edit-delete-route.spec.js
##
@@ -72,12 +73,25 @@ context('Create and Delete Route', () => {
 });
 
 // config prometheus plugin
-cy.contains(this.domSelector.pluginCard, 'prometheus').within(() => {
-  cy.get('button').first().click({
-force: true
-  });
+cy.contains('prometheus').parents('.ant-card-bordered').within(() => {
+  cy.get('button').click({ force: true });
+});
+
+cy.get('.ant-drawer-content').should('be.visible').within(() => {
+  cy.get('#disable').click();
+  cy.get('.ant-switch-checked').should('exist');
+});
+
+cy.contains('button', 'Submit').click();
+cy.get('.ant-drawer-content', { timeout }).should('not.exist');
+
+cy.contains('prometheus').parents('.ant-card-bordered').within(() => {
+  cy.get('button').click({ force: true });
 });
-cy.contains('button', 'Cancel').click();
+
+cy.get('.ant-drawer-footer').contains('button', 'Delete').click({ force: 
true });
+cy.contains('button', 'Confirm').click({ force: true });
+

Review comment:
   Also use `this.domSelector..` and `this.data...`
   I think another step should be added: check that the plugin was successfully 
removed after it was deleted.

##
File path: web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js
##
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/* eslint-disable no-undef */
+
+context('Create and Delete Plugin List', () => {
+  const timeout = 5000;
+
+  beforeEach(() => {
+cy.login();
+
+cy.fixture('selector.json').as('domSelector');
+cy.fixture('data.json').as('data');
+  });
+
+  it('should visit plugin market and create plugin', function () {
+cy.visit('/');
+cy.contains('Plugin').click();
+cy.contains('Create').click();
+
+cy.contains('basic-auth').parents('.ant-card-bordered').within(() => {
+  cy.get('button').click({ force: true });
+});
+
+cy.get('.ant-drawer-content').should('be.visible').within(() => {
+  cy.get('#disable').click();
+  cy.get('.ant-switch-checked').should('exist');
+});
+
+cy.contains('button', 'Submit').click();
+cy.get('.ant-drawer-content', { timeout }).should('not.exist');
+  });
+
+  it('should delete the plugin in drawer', function () {
+cy.visit('/plugin/list');
+cy.get(this.domSelector.refresh).click();
+cy.contains('button', 'Edit').click();
+cy.get('.ant-drawer-footer').contains('button', 'Delete').click({ force: 
true });

Review comment:
   The dom element can be moved to public data for other tests use.

##
File path: web/cypress/integration/plugin/create-delete-in-drawer-plugin.spec.js
##
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional 

[GitHub] [apisix] Firstsawyou commented on a change in pull request #3871: docs: admin-api.md document adds configuration https example

2021-03-21 Thread GitBox


Firstsawyou commented on a change in pull request #3871:
URL: https://github.com/apache/apisix/pull/3871#discussion_r598296719



##
File path: docs/zh/latest/admin-api.md
##
@@ -578,15 +578,18 @@ upstream 对象 json 配置内容:
 "checks": {},   # 配置健康检查的参数
 "hash_on": "",
 "key": "",
-"name": "upstream-xxx",  # upstream 名称
+"name": "upstream-xxx", # upstream 名称
 "desc": "hello world",  # upstream 描述
+"scheme":"http" # 跟上游通信时使用的 scheme,默认是 `http`

Review comment:
   updated.

##
File path: docs/en/latest/admin-api.md
##
@@ -571,12 +571,16 @@ Config Example:
 "key": "",
 "name": "upstream-for-test",
 "desc": "hello world",
+"scheme":"http",# The scheme used when communicating with 
upstream, the default is `http`

Review comment:
   updated.

##
File path: docs/en/latest/admin-api.md
##
@@ -657,12 +659,32 @@ After the execution is successful, nodes will not retain 
the original data, and
 
 ```
 
+Example 2: Create upstream and configure the scheme as `https`.

Review comment:
   updated.




-- 
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] codecov-io edited a comment on pull request #1638: fix: use APISIX 2.4 to run backend E2E test

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1638:
URL: https://github.com/apache/apisix-dashboard/pull/1638#issuecomment-803601385


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=h1) 
Report
   > Merging 
[#1638](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=desc) 
(f2323b3) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/d7c006766eef8dca604f6bd7ad40bdd56fec5b79?el=desc)
 (d7c0067) will **decrease** coverage by `1.00%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1638  +/-   ##
   ==
   - Coverage   72.18%   71.18%   -1.01% 
   ==
 Files 134   47  -87 
 Lines5645 3116-2529 
 Branches  6510 -651 
   ==
   - Hits 4075 2218-1857 
   + Misses   1327  654 -673 
   - Partials  243  244   +1 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `61.90% <ø> (+0.19%)` | :arrow_up: |
   | backend-e2e-test-ginkgo | `47.97% <ø> (+0.25%)` | :arrow_up: |
   | backend-unit-test | `51.81% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `87.95% <0.00%> (ø)` | |
   | 
[web/src/components/PluginOrchestration/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbk9yY2hlc3RyYXRpb24vaW5kZXgudHN4)
 | | |
   | 
[web/src/pages/SSL/components/Step2/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9TU0wvY29tcG9uZW50cy9TdGVwMi9pbmRleC50c3g=)
 | | |
   | 
[web/src/components/Footer/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-d2ViL3NyYy9jb21wb25lbnRzL0Zvb3Rlci9pbmRleC50c3g=)
 | | |
   | 
[web/src/pages/Plugin/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW4vTGlzdC50c3g=)
 | | |
   | 
[web/src/pages/Consumer/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9zZXJ2aWNlLnRz)
 | | |
   | 
[...c/pages/Route/components/ResultView/ResultView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1Jlc3VsdFZpZXcvUmVzdWx0Vmlldy50c3g=)
 | | |
   | 
[web/src/components/LabelsfDrawer/LabelsDrawer.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-d2ViL3NyYy9jb21wb25lbnRzL0xhYmVsc2ZEcmF3ZXIvTGFiZWxzRHJhd2VyLnRzeA==)
 | | |
   | 
[web/src/pages/Upstream/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9zZXJ2aWNlLnRz)
 | | |
   | 
[web/src/pages/Route/components/Step2/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1N0ZXAyL2luZGV4LnRzeA==)
 | | |
   | ... and [79 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=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-dashboard/pull/1638?src=pr=footer).
 Last update 
[d7c0067...f2323b3](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=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-dashboard] codecov-io edited a comment on pull request #1638: fix: use APISIX 2.4 to run backend E2E test

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1638:
URL: https://github.com/apache/apisix-dashboard/pull/1638#issuecomment-803601385


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=h1) 
Report
   > Merging 
[#1638](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=desc) 
(f2323b3) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/d7c006766eef8dca604f6bd7ad40bdd56fec5b79?el=desc)
 (d7c0067) will **decrease** coverage by `4.79%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1638  +/-   ##
   ==
   - Coverage   72.18%   67.39%   -4.80% 
   ==
 Files 134   47  -87 
 Lines5645 3116-2529 
 Branches  6510 -651 
   ==
   - Hits 4075 2100-1975 
   + Misses   1327  771 -556 
   - Partials  243  245   +2 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `47.97% <ø> (+0.25%)` | :arrow_up: |
   | backend-unit-test | `51.81% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `35.08% <0.00%> (-29.84%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `75.00% <0.00%> (-25.00%)` | :arrow_down: |
   | 
[api/internal/handler/global\_rule/global\_rule.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZ2xvYmFsX3J1bGUvZ2xvYmFsX3J1bGUuZ28=)
 | `66.12% <0.00%> (-17.75%)` | :arrow_down: |
   | 
[api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv)
 | `54.11% <0.00%> (-11.77%)` | :arrow_down: |
   | 
[api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv)
 | `76.47% <0.00%> (-8.83%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `67.28% <0.00%> (-3.74%)` | :arrow_down: |
   | 
[api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=)
 | `52.10% <0.00%> (-3.37%)` | :arrow_down: |
   | 
[api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=)
 | `67.03% <0.00%> (-2.24%)` | :arrow_down: |
   | 
[api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbGFiZWwvbGFiZWwuZ28=)
 | `80.18% <0.00%> (-1.89%)` | :arrow_down: |
   | 
[api/internal/utils/closer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2Nsb3Nlci5nbw==)
 | `33.33% <0.00%> (ø)` | |
   | ... and [89 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=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-dashboard/pull/1638?src=pr=footer).
 Last update 
[d7c0067...f2323b3](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=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-dashboard] liuxiran commented on pull request #1601: feat: add rawDataEditor in route

2021-03-21 Thread GitBox


liuxiran commented on pull request #1601:
URL: https://github.com/apache/apisix-dashboard/pull/1601#issuecomment-803602082


   for the be e2e errors, may need @nic-chen @starsz @Jaycean help


-- 
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] codecov-io commented on pull request #1638: fix: use APISIX 2.4 to run backend E2E test

2021-03-21 Thread GitBox


codecov-io commented on pull request #1638:
URL: https://github.com/apache/apisix-dashboard/pull/1638#issuecomment-803601385


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=h1) 
Report
   > Merging 
[#1638](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=desc) 
(f2323b3) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/d7c006766eef8dca604f6bd7ad40bdd56fec5b79?el=desc)
 (d7c0067) will **decrease** coverage by `20.37%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=tree)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#1638   +/-   ##
   ===
   - Coverage   72.18%   51.81%   -20.38% 
   ===
 Files 134   38   -96 
 Lines5645 2650 -2995 
 Branches  6510  -651 
   ===
   - Hits 4075 1373 -2702 
   + Misses   1327 1089  -238 
   + Partials  243  188   -55 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `51.81% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `0.00% <0.00%> (-71.03%)` | :arrow_down: |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | 
[api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=)
 | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | 
[api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=)
 | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
   | 
[api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==)
 | `42.59% <0.00%> (-35.19%)` | :arrow_down: |
   | 
[api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==)
 | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | ... and [120 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1638/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=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-dashboard/pull/1638?src=pr=footer).
 Last update 
[d7c0067...f2323b3](https://codecov.io/gh/apache/apisix-dashboard/pull/1638?src=pr=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-dashboard] nic-chen opened a new pull request #1638: fix: use APISIX 2.4 to run backend E2E test

2021-03-21 Thread GitBox


nic-chen opened a new pull request #1638:
URL: https://github.com/apache/apisix-dashboard/pull/1638


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [x] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   
   ___
   ### Bugfix
   - Description
   
   APISIX has remove consumer.id, see:
   https://github.com/apache/apisix/pull/3868
   
   This is an incompatible modification, causing some of the current E2E test 
cases to fail
   
   - How to fix?
   
   use APISIX 2.4 to run backend E2E test
   


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

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




[GitHub] [apisix-dashboard] starsz commented on issue #1468: discuss: When import routes, whether duplicate routes should be allowed to be imported

2021-03-21 Thread GitBox


starsz commented on issue #1468:
URL: 
https://github.com/apache/apisix-dashboard/issues/1468#issuecomment-803600513


   > I see this PR https://github.com/apache/apisix-dashboard/pull/1606/files
   > so now `duplicate is not allowed`?
   
   This issue is for the situation when we import routes.
   
   
   > When the user needs to update the route, this duplicate route also needs 
to be updated.
   If the duplicate route is not updated, the new route will not take effect 
and cause bugs.
   
   Why the duplicate also needs to be updated? IMO, if the duplicate route is 
not updated, they are two different routes.


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

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




[GitHub] [apisix-dashboard] stu01509 edited a comment on pull request #1597: test: add the create and delete plugin in drawer

2021-03-21 Thread GitBox


stu01509 edited a comment on pull request #1597:
URL: https://github.com/apache/apisix-dashboard/pull/1597#issuecomment-803591182


   I updated the commit, but it seems like occurred the error in backend test 
case.


-- 
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 #1468: discuss: When import routes, whether duplicate routes should be allowed to be imported

2021-03-21 Thread GitBox


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


   > I think it's good. Because the duplicate route is harmless, we can keep it.
   
   When the user needs to update the route, this duplicate route also needs to 
be updated.
   
   If the duplicate route is not updated, the new route will not take effect 
and cause bugs. 
   


-- 
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] starsz commented on a change in pull request #1625: docs: Updating docs for e2e tests

2021-03-21 Thread GitBox


starsz commented on a change in pull request #1625:
URL: https://github.com/apache/apisix-dashboard/pull/1625#discussion_r598289296



##
File path: docs/en/latest/back-end-tests.md
##
@@ -0,0 +1,98 @@
+---
+title: Backend Tests
+---
+
+
+
+This document describes how to write unit tests & e2e tests for the backend.
+
+## Writing Unit Tests
+
+Currently, all of the unit tests for `manager-api` have been written using 
Go's built-in testing package. There is nothing new about it. You can directly 
add tests in the existing `_test.go` file or create a new one. There is 
one thing that needs to be addressed that is, since `manager-api` largely 
depends on handling data from etcd, in some cases, you need to write some 
feature that depends on storing & retrieval of information on and out of etcd. 
In such a scenario, you should write your unit tests using 
`store.MockInterface` instead of directly depending upon etcd.
+
+The `MockInterface` embeds `mock.Mock` object from 
[mock](https://pkg.go.dev/github.com/stretchr/testify/mock) package by testify. 
If helps in simulating function calls of an object with desired inputs as 
arguments and outputs as return values. Currently, all the unit tests in 
`route`, `service`, `ssl` and `upstream` handlers uses mock interface. For eg.
+
+```go
+mStore := {}
+mStore.On("", mock.Anything)
+  .Run(func(args mock.Arguments) {
+   //arguements assertions or anything
+   //gets executed before returning
+   })
+  .Return("")
+```
+
+You may tinker with the mentioned tests to get an idea of how it works or go 
through the 
[docs](https://pkg.go.dev/github.com/stretchr/testify/mock#pkg-index).
+
+## Writing E2E Tests
+
+Currently, the backend of apisix-dashboard have two types of e2e tests. One is 
plain e2e, the other is e2enew, where in the first one, tests are written using 
Go's built-in, native testing package, for the later, the tests are grouped 
into test suites and are evaluated using 
[ginkgo](https://onsi.github.io/ginkgo/) - a testing framework which helps in 
writing more expressive tests such that reading and writing tests give a 
pleasant experience.
+
+**Slowly, we are migrating all of our e2e tests to e2enew. So it is always 
recommended to write any new tests using ginkgo unless some situation arises. 
In such cases, please discuss your concerns with the community.
+
+For value assertion, we are using the 
[assert](https://pkg.go.dev/github.com/stretchr/testify@v1.7.0/assert) package 
by testify. It provides lots of easy to use functions for assertion where the 
first argument is   `*testing.T` object which you can obtain from the used 
framework for testing. For the built-in testing package, each test cases have 
this as the first argument of the test itself. For ginkgo `ginkgo.GinkgoT()` 
returns the mentioned object.
+
+If you are creating any test which requires making HTTP calls to any of the 
following node which involves `manager-api` or `apisix`, after setting up the 
environment (please refer [`backend-e2e.md`](./back-end-e2e.md) for the 
details), you can use the `HttpTestCase` struct which provides a nice interface 
to make the calls along with checking the response. Here's a brief description 
of the most used fields of the struct,
+
+```go
+type HttpTestCase struct {
+Desc  string// Description about the test case.
+Object*httpexpect.Expect// returns a httpexpect object i.e. on 
which host the request is going to be made.
+Methodstring// HTTP request methods ( GET, POST, 
PATCH, PUT, DELETE, OPTIONS).
+Path  string// the route path of that host
+Query string// Query params
+Body  string// The request Body. Commonly used in 
POST, PUT, PATCH.
+Headers   map[string]string // Request headers. Include 
authorization header for secure routes.
+ExpectStatus  int   // Expected HTTP status code from the 
response
+ExpectCodeint   // Code generated by the host. 
Generally 0 for http.StatusOK.
+ExpectMessage string// The response message provided in 
the response by the host.
+ExpectBodyinterface{}   // The expected message body as a 
response.
+Sleep time.Duration //ms// Cooldown period before making next 
request.
+}
+```
+
+Now to run a test use `RunTestCase(tc HttpTestCase)` or `testCaseCheck(tc 
HttpTestCase, t *testing.T)` for the `e2enew` or `e2e` respectively.

Review comment:
   IMO, we can even not describe e2e test. Only introduce how to write 
ginkgo test.
   For that we are migrating all of our e2e tests to e2enew.




-- 
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 

[GitHub] [apisix-dashboard] membphis commented on issue #1624: Discussion: Is the name field required or not when BE create a route

2021-03-21 Thread GitBox


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


   > cc @membphis What's your opinion?
   
   change `name` to be required, LGTM ^_^


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

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




[GitHub] [apisix-dashboard] LiteSun commented on a change in pull request #1601: feat: add rawDataEditor in route

2021-03-21 Thread GitBox


LiteSun commented on a change in pull request #1601:
URL: https://github.com/apache/apisix-dashboard/pull/1601#discussion_r598289027



##
File path: web/src/pages/Service/service.ts
##
@@ -44,7 +47,7 @@ export const create = (data: ServiceModule.Entity) =>
 export const update = (serviceId: string, data: ServiceModule.Entity) =>
   request(`/services/${serviceId}`, {
 method: 'PUT',
-data,
+data: omit(data, DELETE_FIELDS),

Review comment:
   updated. @liuxiran 




-- 
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 #3865: bug: Routing priority matching bug

2021-03-21 Thread GitBox


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


   @ShaoZeMing I listed an example to explain the reason.
   
   Here are three routes(`A`, `B` and `C`), what is their priority?  
   I think you can talk to me `A` < `B`, and `A` < `C`, it seems fine. 
   
   Between `B` and `C`, who has the highest priority? I think it is not easy to 
reply to this question.
   The machine cannot accurately determine who has the higher priority at this 
time. 
   
   ```
   ### router A:only uri
   {
   "uris":[ "/*" ]
   }
   
   ### router B :uri + host
   {
   "uris":["/*"],
   "hosts":["test-dev-1.apisix.xthktech.cn"]
   }
   
   ### router B : uri + header
   {
   "uris":["/*"],
   "vars":[
   [
   "http_app-name",
   "==",
   "test-header"
   ]
   ]
   }
   ```
   
   In APISIX, when the URI is the same, additional priority needs to be set. 
   Here is an example, then we know that: B > C > A.
   
   ```
   router A:only uri
   {
   "uris":[ "/*" ],
   "priority": 0
   }
   
   router B :uri + host
   {
   "uris":["/*"],
   "hosts":["test-dev-1.apisix.xthktech.cn"],
   "priority": 2
   }
   
   router C : uri + header
   {
   "uris":["/*"],
   "vars":[
   [
   "http_app-name",
   "==",
   "test-header"
   ]
   ],
   "priority": 1
   }
   ```
   
   *note*: the default value of `priority` is zero.
   
   
https://github.com/apache/apisix/blob/master/docs/en/latest/admin-api.md#route
   
![image](https://user-images.githubusercontent.com/6814606/111908745-52de6980-8a95-11eb-9bd1-211aef035309.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] membphis commented on issue #3865: bug: Routing priority matching bug

2021-03-21 Thread GitBox


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


   @ShaoZeMing I listed an example to explain the reason.
   
   Here are three routes(A, B and C), what is their priority?  
   I think you can talk to me A < B, and A < C, it seems fine. 
   
   Between B and C, who has the highest priority? I think it is not easy to 
reply to this question.
   The machine cannot accurately determine who has the higher priority at this 
time. 
   
   ```
   ### router A:only uri
   {
   "uris":[ "/*" ]
   }
   
   ### router B :uri + host
   {
   "uris":["/*"],
   "hosts":["test-dev-1.apisix.xthktech.cn"]
   }
   
   ### router B : uri + header
   {
   "uris":["/*"],
   "vars":[
   [
   "http_app-name",
   "==",
   "test-header"
   ]
   ]
   }
   ```
   
   In APISIX, when the URI is the same, additional priority needs to be set. 
   Here is an example, then we know that: B > C > A.
   
   ```
   router A:only uri
   {
   "uris":[ "/*" ],
   "priority": 0
   }
   
   router B :uri + host
   {
   "uris":["/*"],
   "hosts":["test-dev-1.apisix.xthktech.cn"],
   "priority": 2
   }
   
   router C : uri + header
   {
   "uris":["/*"],
   "vars":[
   [
   "http_app-name",
   "==",
   "test-header"
   ]
   ],
   "priority": 1
   }
   ```
   
   *note*: the default value of `priority` is zero.
   
   
https://github.com/apache/apisix/blob/master/docs/en/latest/admin-api.md#route
   
![image](https://user-images.githubusercontent.com/6814606/111908745-52de6980-8a95-11eb-9bd1-211aef035309.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] starsz commented on a change in pull request #1625: docs: Updating docs for e2e tests

2021-03-21 Thread GitBox


starsz commented on a change in pull request #1625:
URL: https://github.com/apache/apisix-dashboard/pull/1625#discussion_r598288550



##
File path: docs/en/latest/back-end-tests.md
##
@@ -0,0 +1,98 @@
+---
+title: Backend Tests

Review comment:
   > Hii. Sorry, I didn't get you. Do you mean adding the license before 
the title?
   
   Yeah. That's what I mean.




-- 
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] codecov-io edited a comment on pull request #1601: feat: add rawDataEditor in route

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1601:
URL: https://github.com/apache/apisix-dashboard/pull/1601#issuecomment-800291441


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1601?src=pr=h1) 
Report
   > Merging 
[#1601](https://codecov.io/gh/apache/apisix-dashboard/pull/1601?src=pr=desc) 
(2f4bf52) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/76f083a97ae475fcce6258d207fe61e4674a3c0b?el=desc)
 (76f083a) will **increase** coverage by `1.38%`.
   > The diff coverage is `73.91%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1601?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1601  +/-   ##
   ==
   + Coverage   72.32%   73.70%   +1.38% 
   ==
 Files 134   87  -47 
 Lines5647 2620-3027 
 Branches  651  665  +14 
   ==
   - Hits 4084 1931-2153 
   + Misses   1319  689 -630 
   + Partials  2440 -244 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `73.70% <73.91%> (-0.03%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1601?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[...pages/Route/components/Step1/MatchingRulesView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1N0ZXAxL01hdGNoaW5nUnVsZXNWaWV3LnRzeA==)
 | `52.74% <ø> (ø)` | |
   | 
[web/src/components/RawDataEditor/RawDataEditor.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9jb21wb25lbnRzL1Jhd0RhdGFFZGl0b3IvUmF3RGF0YUVkaXRvci50c3g=)
 | `37.73% <31.57%> (-15.21%)` | :arrow_down: |
   | 
[web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==)
 | `90.00% <94.44%> (+4.81%)` | :arrow_up: |
   | 
[web/src/pages/Route/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9MaXN0LnRzeA==)
 | `84.51% <94.44%> (+1.41%)` | :arrow_up: |
   | 
[web/src/pages/Service/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL0xpc3QudHN4)
 | `97.43% <94.44%> (+1.28%)` | :arrow_up: |
   | 
[web/src/pages/Upstream/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9MaXN0LnRzeA==)
 | `90.00% <94.44%> (+4.81%)` | :arrow_up: |
   | 
[web/src/constants.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9jb25zdGFudHMudHM=)
 | `100.00% <100.00%> (ø)` | |
   | 
[web/src/pages/Route/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9zZXJ2aWNlLnRz)
 | `88.88% <100.00%> (+0.65%)` | :arrow_up: |
   | 
[web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9oZWxwZXJzLnRzeA==)
 | `77.04% <0.00%> (-3.28%)` | :arrow_down: |
   | 
[api/cmd/manager/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-YXBpL2NtZC9tYW5hZ2VyL21haW4uZ28=)
 | | |
   | ... and [49 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1601?src=pr=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-dashboard/pull/1601?src=pr=footer).
 Last update 
[76f083a...2f4bf52](https://codecov.io/gh/apache/apisix-dashboard/pull/1601?src=pr=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-dashboard] stu01509 commented on pull request #1597: test: add the create and delete plugin in drawer

2021-03-21 Thread GitBox


stu01509 commented on pull request #1597:
URL: https://github.com/apache/apisix-dashboard/pull/1597#issuecomment-803591182


   I updated the commit, but it seems like occurred the error in another test 
case.


-- 
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] codecov-io edited a comment on pull request #1601: feat: add rawDataEditor in route

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1601:
URL: https://github.com/apache/apisix-dashboard/pull/1601#issuecomment-800291441


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1601?src=pr=h1) 
Report
   > Merging 
[#1601](https://codecov.io/gh/apache/apisix-dashboard/pull/1601?src=pr=desc) 
(152a76a) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/76f083a97ae475fcce6258d207fe61e4674a3c0b?el=desc)
 (76f083a) will **increase** coverage by `1.38%`.
   > The diff coverage is `73.91%`.
   
   > :exclamation: Current head 152a76a differs from pull request most recent 
head 2f4bf52. Consider uploading reports for the commit 2f4bf52 to get more 
accurate results
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1601?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1601  +/-   ##
   ==
   + Coverage   72.32%   73.70%   +1.38% 
   ==
 Files 134   87  -47 
 Lines5647 2620-3027 
 Branches  651  665  +14 
   ==
   - Hits 4084 1931-2153 
   + Misses   1319  689 -630 
   + Partials  2440 -244 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `73.70% <73.91%> (-0.03%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1601?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[web/src/pages/Consumer/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9zZXJ2aWNlLnRz)
 | `92.30% <ø> (+7.69%)` | :arrow_up: |
   | 
[...pages/Route/components/Step1/MatchingRulesView.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9jb21wb25lbnRzL1N0ZXAxL01hdGNoaW5nUnVsZXNWaWV3LnRzeA==)
 | `52.74% <ø> (ø)` | |
   | 
[web/src/pages/Service/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL3NlcnZpY2UudHM=)
 | `100.00% <ø> (ø)` | |
   | 
[web/src/pages/Upstream/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9zZXJ2aWNlLnRz)
 | `100.00% <ø> (+11.11%)` | :arrow_up: |
   | 
[web/src/components/RawDataEditor/RawDataEditor.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9jb21wb25lbnRzL1Jhd0RhdGFFZGl0b3IvUmF3RGF0YUVkaXRvci50c3g=)
 | `37.73% <31.57%> (-15.21%)` | :arrow_down: |
   | 
[web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==)
 | `90.00% <94.44%> (+4.81%)` | :arrow_up: |
   | 
[web/src/pages/Route/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9MaXN0LnRzeA==)
 | `84.51% <94.44%> (+1.41%)` | :arrow_up: |
   | 
[web/src/pages/Service/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL0xpc3QudHN4)
 | `97.43% <94.44%> (+1.28%)` | :arrow_up: |
   | 
[web/src/pages/Upstream/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9MaXN0LnRzeA==)
 | `90.00% <94.44%> (+4.81%)` | :arrow_up: |
   | 
[web/src/constants.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree#diff-d2ViL3NyYy9jb25zdGFudHMudHM=)
 | `100.00% <100.00%> (ø)` | |
   | ... and [50 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1601/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1601?src=pr=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-dashboard/pull/1601?src=pr=footer).
 Last update 
[76f083a...2f4bf52](https://codecov.io/gh/apache/apisix-dashboard/pull/1601?src=pr=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 

[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1597: test: add the create and delete plugin in drawer

2021-03-21 Thread GitBox


codecov-io edited a comment on pull request #1597:
URL: https://github.com/apache/apisix-dashboard/pull/1597#issuecomment-799889165


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=h1) 
Report
   > Merging 
[#1597](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=desc) 
(e7d7609) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/d7c006766eef8dca604f6bd7ad40bdd56fec5b79?el=desc)
 (d7c0067) will **decrease** coverage by `20.37%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=tree)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#1597   +/-   ##
   ===
   - Coverage   72.18%   51.81%   -20.38% 
   ===
 Files 134   38   -96 
 Lines5645 2650 -2995 
 Branches  6510  -651 
   ===
   - Hits 4075 1373 -2702 
   + Misses   1327 1089  -238 
   + Partials  243  188   -55 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `51.81% <ø> (ø)` | |
   | frontend-e2e-test | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/utils/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3ZlcnNpb24uZ28=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/entity/entity.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvZW50aXR5L2VudGl0eS5nbw==)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | `0.00% <0.00%> (-71.03%)` | :arrow_down: |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | 
[api/internal/filter/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9zY2hlbWEuZ28=)
 | `0.00% <0.00%> (-55.47%)` | :arrow_down: |
   | 
[api/internal/utils/consts/api\_error.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2NvbnN0cy9hcGlfZXJyb3IuZ28=)
 | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
   | 
[api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==)
 | `42.59% <0.00%> (-35.19%)` | :arrow_down: |
   | 
[api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==)
 | `66.66% <0.00%> (-33.34%)` | :arrow_down: |
   | ... and [120 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1597/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=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-dashboard/pull/1597?src=pr=footer).
 Last update 
[d7c0067...e7d7609](https://codecov.io/gh/apache/apisix-dashboard/pull/1597?src=pr=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




  1   2   >