[GitHub] [apisix] ShaoZeMing commented on issue #3865: bug: Routing priority matching bug

2021-03-18 Thread GitBox


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


   > Your configuration data looks strange. It seems that the field names of 
apisix have been modified?
   
   Sorry i didn't understand you too much


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

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




[GitHub] [apisix] Chinaxiang commented on issue #3851: The upstrem configuration rewrite and upstrem_host in the traffic-split plug-in did not take effect correctly

2021-03-18 Thread GitBox


Chinaxiang commented on issue #3851:
URL: https://github.com/apache/apisix/issues/3851#issuecomment-802568704


   > @aiyiyi121
   > Please use English in the public channel, thx
   
   @moonming 没必要崇洋,中国人的产品,自信起来。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #1619: fix: (route_online_debug)Change the appended Content-type data to overlay to ensure that the Content-type is unique

2021-03-18 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1619?src=pr=h1) 
Report
   > Merging 
[#1619](https://codecov.io/gh/apache/apisix-dashboard/pull/1619?src=pr=desc) 
(c6ce4dd) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/f4f27d1a7b2f2a712c15dd922a30afd7e5d671db?el=desc)
 (f4f27d1) will **increase** coverage by `0.80%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1619?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1619  +/-   ##
   ==
   + Coverage   71.77%   72.58%   +0.80% 
   ==
 Files 133   86  -47 
 Lines5471 2356-3115 
 Branches  592  592  
   ==
   - Hits 3927 1710-2217 
   + Misses   1301  646 -655 
   + Partials  2430 -243 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `72.58% <ø> (+0.08%)` | :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/1619?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbGFiZWwvbGFiZWwuZ28=)
 | | |
   | 
[api/internal/core/store/validate\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGVfbW9jay5nbw==)
 | | |
   | 
[api/internal/filter/request\_id.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZXF1ZXN0X2lkLmdv)
 | | |
   | 
[api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=)
 | | |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | | |
   | 
[api/internal/handler/global\_rule/global\_rule.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZ2xvYmFsX3J1bGUvZ2xvYmFsX3J1bGUuZ28=)
 | | |
   | 
[api/cmd/manager/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2NtZC9tYW5hZ2VyL21haW4uZ28=)
 | | |
   | 
[.../internal/handler/authentication/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvYXV0aGVudGljYXRpb24vYXV0aGVudGljYXRpb24uZ28=)
 | | |
   | 
[api/internal/utils/utils.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3V0aWxzLmdv)
 | | |
   | 
[api/internal/handler/schema/plugin.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3BsdWdpbi5nbw==)
 | | |
   | ... and [37 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1619?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/1619?src=pr=footer).
 Last update 
[f4f27d1...c6ce4dd](https://codecov.io/gh/apache/apisix-dashboard/pull/1619?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 #1617: feat: remove unnecessary cookie session

2021-03-18 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?src=pr=h1) 
Report
   > Merging 
[#1617](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?src=pr=desc) 
(707202c) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/f4f27d1a7b2f2a712c15dd922a30afd7e5d671db?el=desc)
 (f4f27d1) will **decrease** coverage by `0.62%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1617  +/-   ##
   ==
   - Coverage   71.77%   71.15%   -0.63% 
   ==
 Files 133   47  -86 
 Lines5471 3113-2358 
 Branches  5920 -592 
   ==
   - Hits 3927 2215-1712 
   + Misses   1301  655 -646 
 Partials  243  243  
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `61.86% <ø> (-0.09%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `47.67% <ø> (-0.42%)` | :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/1617?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv)
 | `85.29% <ø> (-0.82%)` | :arrow_down: |
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `87.95% <0.00%> (-1.21%)` | :arrow_down: |
   | 
[web/src/pages/Route/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9zZXJ2aWNlLnRz)
 | | |
   | 
[web/src/pages/SSL/components/Step2/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9TU0wvY29tcG9uZW50cy9TdGVwMi9pbmRleC50c3g=)
 | | |
   | 
[web/src/pages/PluginTemplate/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW5UZW1wbGF0ZS9zZXJ2aWNlLnRz)
 | | |
   | 
[web/src/pages/Metrics/service.ts](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9NZXRyaWNzL3NlcnZpY2UudHM=)
 | | |
   | 
[web/src/components/ActionBar/ActionBar.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-d2ViL3NyYy9jb21wb25lbnRzL0FjdGlvbkJhci9BY3Rpb25CYXIudHN4)
 | | |
   | 
[web/src/pages/Route/Create.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Sb3V0ZS9DcmVhdGUudHN4)
 | | |
   | 
[web/src/components/Plugin/data.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9kYXRhLnRzeA==)
 | | |
   | 
[...eb/src/pages/PluginTemplate/components/Preview.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW5UZW1wbGF0ZS9jb21wb25lbnRzL1ByZXZpZXcudHN4)
 | | |
   | ... and [78 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?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/1617?src=pr=footer).
 Last update 
[f4f27d1...707202c](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?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-ingress-controller] codecov-io commented on pull request #308: feat: traffic split

2021-03-18 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/308?src=pr=h1)
 Report
   > Merging 
[#308](https://codecov.io/gh/apache/apisix-ingress-controller/pull/308?src=pr=desc)
 (d08cfec) into 
[master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/f45203e67c5875ecdd0407814f1742ccf4bd6859?el=desc)
 (f45203e) will **decrease** coverage by `1.54%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/308/graphs/tree.svg?width=650=150=pr=WPLQXPY3V0)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/308?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master #308  +/-   ##
   ==
   - Coverage   53.00%   51.46%   -1.55% 
   ==
 Files  33   34   +1 
 Lines2394 2460  +66 
   ==
   - Hits 1269 1266   -3 
   - Misses965 1034  +69 
 Partials  160  160  
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/308?src=pr=tree)
 | Coverage Δ | |
   |---|---|---|
   | 
[pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/308/diff?src=pr=tree#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv)
 | `28.41% <0.00%> (ø)` | |
   | 
[pkg/kube/translation/plugin.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/308/diff?src=pr=tree#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vcGx1Z2luLmdv)
 | `0.00% <0.00%> (ø)` | |
   | 
[pkg/kube/translation/util.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/308/diff?src=pr=tree#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vdXRpbC5nbw==)
 | `0.00% <0.00%> (ø)` | |
   | 
[pkg/seven/state/solver.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/308/diff?src=pr=tree#diff-cGtnL3NldmVuL3N0YXRlL3NvbHZlci5nbw==)
 | `2.00% <0.00%> (-2.00%)` | :arrow_down: |
   | 
[test/e2e/e2e.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/308/diff?src=pr=tree#diff-dGVzdC9lMmUvZTJlLmdv)
 | | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/308?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-ingress-controller/pull/308?src=pr=footer).
 Last update 
[f45203e...d08cfec](https://codecov.io/gh/apache/apisix-ingress-controller/pull/308?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 #1617: feat: remove unnecessary cookie session

2021-03-18 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?src=pr=h1) 
Report
   > Merging 
[#1617](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?src=pr=desc) 
(707202c) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/f4f27d1a7b2f2a712c15dd922a30afd7e5d671db?el=desc)
 (f4f27d1) will **decrease** coverage by `9.90%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1617  +/-   ##
   ==
   - Coverage   71.77%   61.86%   -9.91% 
   ==
 Files 133   47  -86 
 Lines5471 3113-2358 
 Branches  5920 -592 
   ==
   - Hits 3927 1926-2001 
   + Misses   1301  875 -426 
   - Partials  243  312  +69 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `61.86% <ø> (-0.09%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `47.67% <ø> (-0.42%)` | :arrow_down: |
   | backend-unit-test | `?` | |
   | 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/1617?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv)
 | `85.29% <ø> (-0.82%)` | :arrow_down: |
   | 
[api/internal/utils/runtime/runtime.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3J1bnRpbWUvcnVudGltZS5nbw==)
 | `0.00% <0.00%> (-64.29%)` | :arrow_down: |
   | 
[api/internal/core/store/validate\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGVfbW9jay5nbw==)
 | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `58.43% <0.00%> (-30.73%)` | :arrow_down: |
   | 
[api/internal/filter/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9hdXRoZW50aWNhdGlvbi5nbw==)
 | `47.22% <0.00%> (-30.56%)` | :arrow_down: |
   | 
[api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv)
 | `62.60% <0.00%> (-29.57%)` | :arrow_down: |
   | 
[api/internal/filter/ip\_filter.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9pcF9maWx0ZXIuZ28=)
 | `48.71% <0.00%> (-23.08%)` | :arrow_down: |
   | 
[api/internal/handler/global\_rule/global\_rule.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZ2xvYmFsX3J1bGUvZ2xvYmFsX3J1bGUuZ28=)
 | `64.51% <0.00%> (-19.36%)` | :arrow_down: |
   | 
[...pi/internal/handler/plugin\_config/plugin\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcGx1Z2luX2NvbmZpZy9wbHVnaW5fY29uZmlnLmdv)
 | `59.57% <0.00%> (-18.09%)` | :arrow_down: |
   | 
[api/internal/utils/json\_patch.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2pzb25fcGF0Y2guZ28=)
 | `44.82% <0.00%> (-13.80%)` | :arrow_down: |
   | ... and [99 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?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/1617?src=pr=footer).
 Last update 
[f4f27d1...707202c](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?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 

[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1617: feat: remove unnecessary cookie session

2021-03-18 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?src=pr=h1) 
Report
   > Merging 
[#1617](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?src=pr=desc) 
(707202c) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/f4f27d1a7b2f2a712c15dd922a30afd7e5d671db?el=desc)
 (f4f27d1) will **decrease** coverage by `23.17%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?src=pr=tree)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#1617   +/-   ##
   ===
   - Coverage   71.77%   48.60%   -23.18% 
   ===
 Files 133   47   -86 
 Lines5471 3113 -2358 
 Branches  5920  -592 
   ===
   - Hits 3927 1513 -2414 
   - Misses   1301 1337   +36 
   - Partials  243  263   +20 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `48.60% <ø> (-13.36%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | 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/1617?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv)
 | `85.29% <ø> (-0.82%)` | :arrow_down: |
   | 
[api/internal/handler/schema/plugin.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3BsdWdpbi5nbw==)
 | `15.00% <0.00%> (-85.00%)` | :arrow_down: |
   | 
[api/internal/handler/tool/tool.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdG9vbC90b29sLmdv)
 | `13.88% <0.00%> (-80.56%)` | :arrow_down: |
   | 
[api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==)
 | `23.80% <0.00%> (-76.20%)` | :arrow_down: |
   | 
[...l/handler/route\_online\_debug/route\_online\_debug.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGVfb25saW5lX2RlYnVnL3JvdXRlX29ubGluZV9kZWJ1Zy5nbw==)
 | `5.88% <0.00%> (-68.63%)` | :arrow_down: |
   | 
[api/internal/utils/runtime/runtime.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3J1bnRpbWUvcnVudGltZS5nbw==)
 | `0.00% <0.00%> (-64.29%)` | :arrow_down: |
   | 
[api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==)
 | `12.04% <0.00%> (-61.26%)` | :arrow_down: |
   | 
[api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=)
 | `31.42% <0.00%> (-59.29%)` | :arrow_down: |
   | 
[api/internal/handler/server\_info/server\_info.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmVyX2luZm8vc2VydmVyX2luZm8uZ28=)
 | `33.33% <0.00%> (-57.15%)` | :arrow_down: |
   | 
[api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv)
 | `41.73% <0.00%> (-50.44%)` | :arrow_down: |
   | ... and [107 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1617/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?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/1617?src=pr=footer).
 Last update 
[f4f27d1...707202c](https://codecov.io/gh/apache/apisix-dashboard/pull/1617?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-ingress-controller] tokers opened a new pull request #308: feat: traffic split

2021-03-18 Thread GitBox


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


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [ ] Bugfix
   - [x] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   - Related issues
   #289 
   
   ### New feature or improvement
   - Describe the details and related test reports.
   
   This PR supports the traffic split in ApisixRoute.
   ___
   ### Backport patches
   - Why need to backport?
   
   - Source branch
   
   - Related commits and pull requests
   
   - Target branch
   


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

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




[GitHub] [apisix] iamayushdas commented on issue #3857: Optimize the Serverless plugin

2021-03-18 Thread GitBox


iamayushdas commented on issue #3857:
URL: https://github.com/apache/apisix/issues/3857#issuecomment-802558881


   Could you elaborate me like in which file i have to make changes or 
something like that. Please 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #3857: Optimize the Serverless plugin

2021-03-18 Thread GitBox


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


   @iamayushdas Sure, assigned to 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] aiyiyi121 closed issue #3851: The upstrem configuration rewrite and upstrem_host in the traffic-split plug-in did not take effect correctly

2021-03-18 Thread GitBox


aiyiyi121 closed issue #3851:
URL: https://github.com/apache/apisix/issues/3851


   


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

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




[GitHub] [apisix] aiyiyi121 commented on issue #3851: The upstrem configuration rewrite and upstrem_host in the traffic-split plug-in did not take effect correctly

2021-03-18 Thread GitBox


aiyiyi121 commented on issue #3851:
URL: https://github.com/apache/apisix/issues/3851#issuecomment-802543381


   > @aiyiyi121
   > Please use English in the public channel, thx
   
   OK,thx. I think this issue can be closed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #1576: fix: config proxy-rewrite out of the plugin market in route module

2021-03-18 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?src=pr=h1) 
Report
   > Merging 
[#1576](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?src=pr=desc) 
(f6a8e63) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/f4f27d1a7b2f2a712c15dd922a30afd7e5d671db?el=desc)
 (f4f27d1) will **decrease** coverage by `0.63%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1576  +/-   ##
   ==
   - Coverage   71.77%   71.13%   -0.64% 
   ==
 Files 133   47  -86 
 Lines5471 3115-2356 
 Branches  5920 -592 
   ==
   - Hits 3927 2216-1711 
   + Misses   1301  655 -646 
   - Partials  243  244   +1 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `61.89% <ø> (-0.07%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `47.86% <ø> (-0.23%)` | :arrow_down: |
   | backend-unit-test | `51.77% <ø> (-0.04%)` | :arrow_down: |
   | 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/1576?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `87.34% <0.00%> (-1.81%)` | :arrow_down: |
   | 
[web/src/components/ActionBar/ActionBar.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-d2ViL3NyYy9jb21wb25lbnRzL0FjdGlvbkJhci9BY3Rpb25CYXIudHN4)
 | | |
   | 
[web/src/pages/SSL/components/Step1/index.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9TU0wvY29tcG9uZW50cy9TdGVwMS9pbmRleC50c3g=)
 | | |
   | 
[web/src/pages/Consumer/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9MaXN0LnRzeA==)
 | | |
   | 
[web/src/pages/Consumer/Create.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9DcmVhdGUudHN4)
 | | |
   | 
[web/src/components/RawDataEditor/RawDataEditor.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-d2ViL3NyYy9jb21wb25lbnRzL1Jhd0RhdGFFZGl0b3IvUmF3RGF0YUVkaXRvci50c3g=)
 | | |
   | 
[web/src/app.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-d2ViL3NyYy9hcHAudHN4)
 | | |
   | 
[web/src/pages/User/Login.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9Vc2VyL0xvZ2luLnRzeA==)
 | | |
   | 
[web/src/pages/Service/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL0xpc3QudHN4)
 | | |
   | 
[web/src/components/Upstream/UpstreamForm.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL1Vwc3RyZWFtRm9ybS50c3g=)
 | | |
   | ... and [71 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?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/1576?src=pr=footer).
 Last update 
[f4f27d1...f6a8e63](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?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] Jaycean commented on a change in pull request #1615: feat: manual deletion of apisix node data

2021-03-18 Thread GitBox


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



##
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:
   Thank you for your patient explanation. I think we should discuss this 
problem. Do you have a better idea about the problem caused by the inability of 
ginkgo to run serially? @starsz @nic-chen @tokers 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 issue #1616: when creating a `Service`, `Select Upstream` should be optional, not required

2021-03-18 Thread GitBox


stu01509 commented on issue #1616:
URL: 
https://github.com/apache/apisix-dashboard/issues/1616#issuecomment-802539418


   I would like to fix it, please assign this issue to me :)


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

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




[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1576: fix: config proxy-rewrite out of the plugin market in route module

2021-03-18 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?src=pr=h1) 
Report
   > Merging 
[#1576](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?src=pr=desc) 
(f6a8e63) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/f4f27d1a7b2f2a712c15dd922a30afd7e5d671db?el=desc)
 (f4f27d1) will **decrease** coverage by `9.88%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?src=pr=tree)
   
   ```diff
   @@Coverage Diff @@
   ##   master#1576  +/-   ##
   ==
   - Coverage   71.77%   61.89%   -9.89% 
   ==
 Files 133   47  -86 
 Lines5471 3115-2356 
 Branches  5920 -592 
   ==
   - Hits 3927 1928-1999 
   + Misses   1301  874 -427 
   - Partials  243  313  +70 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `61.89% <ø> (-0.07%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `47.86% <ø> (-0.23%)` | :arrow_down: |
   | backend-unit-test | `?` | |
   | 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/1576?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/utils/runtime/runtime.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3J1bnRpbWUvcnVudGltZS5nbw==)
 | `0.00% <0.00%> (-64.29%)` | :arrow_down: |
   | 
[api/internal/core/store/validate\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGVfbW9jay5nbw==)
 | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `58.43% <0.00%> (-30.73%)` | :arrow_down: |
   | 
[api/internal/filter/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9hdXRoZW50aWNhdGlvbi5nbw==)
 | `47.22% <0.00%> (-30.56%)` | :arrow_down: |
   | 
[api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv)
 | `62.60% <0.00%> (-29.57%)` | :arrow_down: |
   | 
[api/internal/filter/ip\_filter.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9pcF9maWx0ZXIuZ28=)
 | `48.71% <0.00%> (-23.08%)` | :arrow_down: |
   | 
[api/internal/handler/global\_rule/global\_rule.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZ2xvYmFsX3J1bGUvZ2xvYmFsX3J1bGUuZ28=)
 | `64.51% <0.00%> (-19.36%)` | :arrow_down: |
   | 
[...pi/internal/handler/plugin\_config/plugin\_config.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcGx1Z2luX2NvbmZpZy9wbHVnaW5fY29uZmlnLmdv)
 | `59.57% <0.00%> (-18.09%)` | :arrow_down: |
   | 
[api/internal/utils/json\_patch.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL2pzb25fcGF0Y2guZ28=)
 | `44.82% <0.00%> (-13.80%)` | :arrow_down: |
   | 
[api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=)
 | `77.14% <0.00%> (-13.58%)` | :arrow_down: |
   | ... and [92 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?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/1576?src=pr=footer).
 Last update 
[f4f27d1...f6a8e63](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?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 

[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1576: fix: config proxy-rewrite out of the plugin market in route module

2021-03-18 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?src=pr=h1) 
Report
   > Merging 
[#1576](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?src=pr=desc) 
(f6a8e63) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/f4f27d1a7b2f2a712c15dd922a30afd7e5d671db?el=desc)
 (f4f27d1) will **decrease** coverage by `23.91%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?src=pr=tree)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#1576   +/-   ##
   ===
   - Coverage   71.77%   47.86%   -23.92% 
   ===
 Files 133   47   -86 
 Lines5471 3115 -2356 
 Branches  5920  -592 
   ===
   - Hits 3927 1491 -2436 
   - Misses   1301 1340   +39 
   - Partials  243  284   +41 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `47.86% <ø> (-0.23%)` | :arrow_down: |
   | backend-unit-test | `?` | |
   | 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/1576?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbGFiZWwvbGFiZWwuZ28=)
 | `9.43% <0.00%> (-72.65%)` | :arrow_down: |
   | 
[api/internal/handler/data\_loader/route\_export.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfZXhwb3J0Lmdv)
 | `3.38% <0.00%> (-65.79%)` | :arrow_down: |
   | 
[api/internal/utils/runtime/runtime.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3J1bnRpbWUvcnVudGltZS5nbw==)
 | `0.00% <0.00%> (-64.29%)` | :arrow_down: |
   | 
[api/internal/handler/global\_rule/global\_rule.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZ2xvYmFsX3J1bGUvZ2xvYmFsX3J1bGUuZ28=)
 | `27.41% <0.00%> (-56.46%)` | :arrow_down: |
   | 
[api/internal/core/store/validate\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGVfbW9jay5nbw==)
 | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | 
[api/internal/filter/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9hdXRoZW50aWNhdGlvbi5nbw==)
 | `36.11% <0.00%> (-41.67%)` | :arrow_down: |
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `24.59% <0.00%> (-40.33%)` | :arrow_down: |
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `58.43% <0.00%> (-30.73%)` | :arrow_down: |
   | 
[api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv)
 | `62.60% <0.00%> (-29.57%)` | :arrow_down: |
   | 
[api/internal/handler/route/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGUvcm91dGUuZ28=)
 | `51.83% <0.00%> (-26.94%)` | :arrow_down: |
   | ... and [97 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1576/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?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/1576?src=pr=footer).
 Last update 
[f4f27d1...f6a8e63](https://codecov.io/gh/apache/apisix-dashboard/pull/1576?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 

[GitHub] [apisix-dashboard] stu01509 commented on pull request #1617: feat: remove unnecessary cookie session

2021-03-18 Thread GitBox


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


   > Hi @stu01509, would you mind pushing codes from the master branch to this 
PR? It fixes some test issues.
   
   Done


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

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




[GitHub] [apisix] spacewander opened a new pull request #3869: docs: remove duplicated section from discovery.md

2021-03-18 Thread GitBox


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


   Signed-off-by: spacewander 
   
   ### What this PR does / why we need it:
   
   
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features 
have been added?
   * [ ] Have you added corresponding test cases?
   * [x] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix/tree/master#community) first**
   


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

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




[GitHub] [apisix] spacewander opened a new pull request #3868: chore: remove unused consumer.id

2021-03-18 Thread GitBox


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


   Signed-off-by: spacewander 
   
   ### What this PR does / why we need it:
   
   
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features 
have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix/tree/master#community) first**
   


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

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




[GitHub] [apisix-dashboard] bisakhmondal commented on a change in pull request #1615: feat: manual deletion of apisix node data

2021-03-18 Thread GitBox


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



##
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:
   Hii @Jaycean, thanks for the suggestion. I intentionally didn't go with 
ginkgo as it runs **independent** tests concurrently/parallelly. Going with 
ginkgo introduces a racing condition between tests if one of the tests alters 
data in the environment on which the success of other test cases largely 
depends (which is the case here, removing a node data before other tests on 
server_info runs causes a failure). It breaks the entire test suite. I have 
faced the same scenario, you could check 
[here](https://github.com/apache/apisix-dashboard/pull/1583#issuecomment-799639410).
   Still, I don't know any good hack to get around the issue. An alternative, 
not so good approach could be creating another suite for this type of scenarios 
(as we are running cleanups after each test suite) 
[ref](https://github.com/onsi/ginkgo/issues/294#issuecomment-305999281).
   
   Just for the reconfirmation. 
   
![image](https://user-images.githubusercontent.com/41498427/111729659-881c6900-8895-11eb-89e0-d5eacbbaa06f.png)
   Broke suite, haha.
   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-docker] nic-chen commented on pull request #152: feat: add apisix-dashboard dockerfile & CI

2021-03-18 Thread GitBox


nic-chen commented on pull request #152:
URL: https://github.com/apache/apisix-docker/pull/152#issuecomment-802532581


   CI failed. @gxthrj 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #1612: add more fe e2e test cases for online debug

2021-03-18 Thread GitBox


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



##
File path: web/cypress/fixtures/route-json-data.json
##
@@ -0,0 +1,30 @@
+{
+  "debugPostJson": {
+"name": "test_https",
+"status": 1,
+"methods": ["GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"],
+"priority": 0,
+"uris": ["/*"],
+"labels": {},
+"plugins": {
+  "redirect": {
+"http_to_https": true
+  }
+},
+"vars": [],
+"upstream": {
+  "type": "roundrobin",
+  "nodes": [{
+"host": "httpbin.org",
+"port": 80,
+"weight": 1
+  }],
+  "pass_host": "pass",
+  "timeout": {
+"connect": 6,
+"send": 6,
+"read": 6
+  }
+}
+  }
+}

Review comment:
   new line please 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #1616: when creating a `Service`, `Select Upstream` should be optional, not required

2021-03-18 Thread GitBox


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


   > How about adding an optional `None` to the `Upstream Setector`?
   
   agree +1


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

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




[GitHub] [apisix-dashboard] LiteSun commented on a change in pull request #1584: feat: save Service list page's meta status

2021-03-18 Thread GitBox


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



##
File path: web/cypress/integration/service/save-paginator-status.spec.js
##
@@ -0,0 +1,84 @@
+/*
+ * 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('Save Paginator Status', () => {
+  const timeout = 300;
+  beforeEach(() => {
+cy.login();
+
+cy.fixture('selector.json').as('domSelector');
+cy.fixture('data.json').as('data');
+  });
+
+  it('should create 11 test services', function () {
+cy.visit('/');
+cy.contains('Service').click();
+
+for (let i = 0; i <= 10; i++) {
+  cy.contains('Create').click();

Review comment:
   There are already testcase for testing the creation of services through 
the UI. Using the api call to create the service here will save a lot of time. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #1482: how to delete the historical version of the APISIX node.

2021-03-18 Thread GitBox


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


   > Hi, after discuss with @nic-chen @starsz @LiteSun, we have a new way to 
support this feature.
   > 
   > How about only adding one extra message that tells users: `APISIX Node 
List will get updated in 2 hours by default.`, then we don't have necessary to 
remove nodes by hand & calling APIs.
   
   OK


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

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




[GitHub] [apisix-dashboard] nic-chen commented on issue #1136: Adding useful information to backend E2E test cases

2021-03-18 Thread GitBox


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


   We have another issue #1500 to track. And we have used ginkgo to rewrite 
many e2e test cases in milestone 2.5.
   This issue can be closed now.
   
   


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

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




[GitHub] [apisix-dashboard] nic-chen closed issue #1136: Adding useful information to backend E2E test cases

2021-03-18 Thread GitBox


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


   


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

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




[GitHub] [apisix] spacewander closed issue #3855: The available key types in limit-count plugin are not recorded in docs

2021-03-18 Thread GitBox


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


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #3855: The available key types in limit-count plugin are not recorded in docs

2021-03-18 Thread GitBox


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


   Close this issue as we don't need it actually.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #1593: [discuss] Better management of plugins by users and third-party developers apisix

2021-03-18 Thread GitBox


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


   How many resources can be put into this project?
   Is there any market investigation?
   
   Run a `PluginHub` needs  , develop tools for the ecosystem needs   


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

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




[GitHub] [apisix] iamayushdas commented on issue #3855: The available key types in limit-count plugin are not recorded in docs

2021-03-18 Thread GitBox


iamayushdas commented on issue #3855:
URL: https://github.com/apache/apisix/issues/3855#issuecomment-802525169


   yeah got your point. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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-18 Thread GitBox


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


   If we support deleting nodes, it will take some other issues:
   
   1. Where should we put the Delete button on this page?
   2. Nodes in ETCD have the TTL option, it will expire in 2 hours by default, 
we don't have the necessary to delete it by hand.
   3. If users delete nodes by mistake, they have to wait for APISIX to report 
its status, though it doesn't take a long time, users like me will get scared 
if we are not familiar with this logic (Only delete metrics from ETCD).


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

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




[GitHub] [apisix] Firstsawyou commented on issue #3865: bug: Routing priority matching bug

2021-03-18 Thread GitBox


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


   Your configuration data looks strange. It seems that the field names of 
apisix have been modified?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #3855: The available key types in limit-count plugin are not recorded in docs

2021-03-18 Thread GitBox


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


   Note that the website is generated from the markdown.
   This is the markdown source: 
https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/limit-count.md#attributes


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

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




[GitHub] [apisix] iamayushdas commented on issue #3855: The available key types in limit-count plugin are not recorded in docs

2021-03-18 Thread GitBox


iamayushdas commented on issue #3855:
URL: https://github.com/apache/apisix/issues/3855#issuecomment-802523989


   > I don't like to repeat the same words multiple times.
   
   okay my bad


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #3855: The available key types in limit-count plugin are not recorded in docs

2021-03-18 Thread GitBox


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


   I don't like to repeat the same words multiple times.


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

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




[GitHub] [apisix] juzhiyuan commented on issue #1593: [discuss] Better management of plugins by users and third-party developers apisix

2021-03-18 Thread GitBox


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


   > So for now, I think spending so much works to develop and maintain a 
Plugins Hub will not bring much value.
   
   I just rechecked this issue, the concept `PluginHub` looks good to me. Do we 
have the necessary to support Plugin Manager first in the dashboard?


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

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




[GitHub] [apisix] Firstsawyou opened a new issue #3867: docs: add route uri regular matching in the FAQ doc

2021-03-18 Thread GitBox


Firstsawyou opened a new issue #3867:
URL: https://github.com/apache/apisix/issues/3867


   # Improve Docs
   
   ## Please describe which part of docs should be improved or typo fixed
   
   How to perform regular matching on the uri of the route is a relatively 
common problem, we should record it in the FAQ document (by combining the vars 
field of the route, we can achieve it).


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

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




[GitHub] [apisix-dashboard] codecov-io commented on pull request #1619: fix: (route_online_debug)Change the appended Content-type data to overlay to ensure that the Content-type is unique

2021-03-18 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1619?src=pr=h1) 
Report
   > Merging 
[#1619](https://codecov.io/gh/apache/apisix-dashboard/pull/1619?src=pr=desc) 
(68b2e71) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/f4f27d1a7b2f2a712c15dd922a30afd7e5d671db?el=desc)
 (f4f27d1) will **decrease** coverage by `23.12%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1619?src=pr=tree)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#1619   +/-   ##
   ===
   - Coverage   71.77%   48.65%   -23.13% 
   ===
 Files 133   47   -86 
 Lines5471 3118 -2353 
 Branches  5920  -592 
   ===
   - Hits 3927 1517 -2410 
   - Misses   1301 1338   +37 
   - Partials  243  263   +20 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `48.65% <0.00%> (-13.31%)` | :arrow_down: |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | 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/1619?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[...l/handler/route\_online\_debug/route\_online\_debug.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvcm91dGVfb25saW5lX2RlYnVnL3JvdXRlX29ubGluZV9kZWJ1Zy5nbw==)
 | `5.55% <0.00%> (-68.96%)` | :arrow_down: |
   | 
[api/internal/handler/schema/plugin.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3BsdWdpbi5nbw==)
 | `15.00% <0.00%> (-85.00%)` | :arrow_down: |
   | 
[api/internal/handler/tool/tool.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdG9vbC90b29sLmdv)
 | `13.88% <0.00%> (-80.56%)` | :arrow_down: |
   | 
[api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==)
 | `23.80% <0.00%> (-76.20%)` | :arrow_down: |
   | 
[api/internal/utils/runtime/runtime.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3J1bnRpbWUvcnVudGltZS5nbw==)
 | `0.00% <0.00%> (-64.29%)` | :arrow_down: |
   | 
[api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==)
 | `12.04% <0.00%> (-61.26%)` | :arrow_down: |
   | 
[api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=)
 | `31.42% <0.00%> (-59.29%)` | :arrow_down: |
   | 
[api/internal/handler/server\_info/server\_info.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmVyX2luZm8vc2VydmVyX2luZm8uZ28=)
 | `33.33% <0.00%> (-57.15%)` | :arrow_down: |
   | 
[api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv)
 | `41.73% <0.00%> (-50.44%)` | :arrow_down: |
   | ... and [107 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1619/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1619?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/1619?src=pr=footer).
 Last update 
[f4f27d1...68b2e71](https://codecov.io/gh/apache/apisix-dashboard/pull/1619?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] iamayushdas edited a comment on issue #3855: The available key types in limit-count plugin are not recorded in docs

2021-03-18 Thread GitBox


iamayushdas edited a comment on issue #3855:
URL: https://github.com/apache/apisix/issues/3855#issuecomment-802511090


   i think markdown file of limit-count plugin will be more helpful for user 
after this: #3866 i guess
   @spacewander 


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

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




[GitHub] [apisix] iamayushdas commented on issue #3855: The available key types in limit-count plugin are not recorded in docs

2021-03-18 Thread GitBox


iamayushdas commented on issue #3855:
URL: https://github.com/apache/apisix/issues/3855#issuecomment-802511090


   i think markdown file of limit-count plugin will be more helpful for user 
after this: #3866 i guess


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

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




[GitHub] [apisix] iamayushdas commented on a change in pull request #3866: docs: added key types for limit-count plugin

2021-03-18 Thread GitBox


iamayushdas commented on a change in pull request #3866:
URL: https://github.com/apache/apisix/pull/3866#discussion_r597376468



##
File path: docs/en/latest/plugins/limit-count.md
##
@@ -79,7 +79,17 @@ curl -i http://127.0.0.1:9080/apisix/admin/routes/1 -H 
'X-API-KEY: edd1c9f034335
 You can open dashboard with a browser: 
`http://127.0.0.1:9080/apisix/dashboard/`, to complete the above operation 
through the web interface, first add a route:
 ![Add a router.](../../../assets/images/plugin/limit-count-1.png)
 
-Then add limit-count plugin:
+## Then add limit-count plugin:
+
+The Key type in limit-count plugin can be the following:

Review comment:
   changes done in next 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] iamayushdas commented on a change in pull request #3866: docs: added key types for limit-count plugin

2021-03-18 Thread GitBox


iamayushdas commented on a change in pull request #3866:
URL: https://github.com/apache/apisix/pull/3866#discussion_r597375631



##
File path: docs/en/latest/plugins/limit-count.md
##
@@ -79,7 +79,17 @@ curl -i http://127.0.0.1:9080/apisix/admin/routes/1 -H 
'X-API-KEY: edd1c9f034335
 You can open dashboard with a browser: 
`http://127.0.0.1:9080/apisix/dashboard/`, to complete the above operation 
through the web interface, first add a route:
 ![Add a router.](../../../assets/images/plugin/limit-count-1.png)
 
-Then add limit-count plugin:
+## Then add limit-count plugin:

Review comment:
    Then add limit-count plugin:
   
   is this size good to go?
   to make it lil bit more noticed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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] Firstsawyou commented on issue #1616: when creating a `Service`, `Select Upstream` should be optional, not required

2021-03-18 Thread GitBox


Firstsawyou commented on issue #1616:
URL: 
https://github.com/apache/apisix-dashboard/issues/1616#issuecomment-802505986


   > How about adding an optional `None` to the `Upstream Setector`?
   
   Yes, I think it is appropriate to add an optional None.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 edited a comment on issue #3855: The available key types in limit-count plugin are not recorded in docs

2021-03-18 Thread GitBox


spacewander edited a comment on issue #3855:
URL: https://github.com/apache/apisix/issues/3855#issuecomment-802503020


   @tokers @iamayushdas 
   The key types are recorded in docs.
   See http://apisix.apache.org/docs/apisix/plugins/limit-count
   
   ```
   ["remote_addr", "server_addr", "http_x_real_ip", "http_x_forwarded_for", 
"consumer_name", "service_id"]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #3855: The available key types in limit-count plugin are not recorded in docs

2021-03-18 Thread GitBox


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


   @tokers 
   The key types are recorded in docs.
   See http://apisix.apache.org/docs/apisix/plugins/limit-count
   
   ```
   ["remote_addr", "server_addr", "http_x_real_ip", "http_x_forwarded_for", 
"consumer_name", "service_id"]
   ```


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

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




[GitHub] [apisix] spacewander commented on a change in pull request #3866: docs: added key types for limit-count plugin

2021-03-18 Thread GitBox


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



##
File path: docs/en/latest/plugins/limit-count.md
##
@@ -79,7 +79,17 @@ curl -i http://127.0.0.1:9080/apisix/admin/routes/1 -H 
'X-API-KEY: edd1c9f034335
 You can open dashboard with a browser: 
`http://127.0.0.1:9080/apisix/dashboard/`, to complete the above operation 
through the web interface, first add a route:
 ![Add a router.](../../../assets/images/plugin/limit-count-1.png)
 
-Then add limit-count plugin:
+## Then add limit-count plugin:

Review comment:
   Why make it a title?

##
File path: docs/en/latest/plugins/limit-count.md
##
@@ -79,7 +79,17 @@ curl -i http://127.0.0.1:9080/apisix/admin/routes/1 -H 
'X-API-KEY: edd1c9f034335
 You can open dashboard with a browser: 
`http://127.0.0.1:9080/apisix/dashboard/`, to complete the above operation 
through the web interface, first add a route:
 ![Add a router.](../../../assets/images/plugin/limit-count-1.png)
 
-Then add limit-count plugin:
+## Then add limit-count plugin:
+
+The Key type in limit-count plugin can be the following:

Review comment:
   Please use markdown syntax if possible




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

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




[GitHub] [apisix] benx203 commented on a change in pull request #3820: feat: add nacos support

2021-03-18 Thread GitBox


benx203 commented on a change in pull request #3820:
URL: https://github.com/apache/apisix/pull/3820#discussion_r597369333



##
File path: apisix/discovery/nacos.lua
##
@@ -0,0 +1,237 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local local_conf = require("apisix.core.config_local").local_conf()
+local http   = require("resty.http")
+local core   = require("apisix.core")
+local ipairs = ipairs
+local tostring   = tostring
+local type   = type
+local math_random= math.random
+local error  = error
+local ngx= ngx
+local ngx_timer_at   = ngx.timer.at
+local ngx_timer_every= ngx.timer.every
+local string_sub = string.sub
+local str_find   = core.string.find
+local log= core.log
+
+local default_weight
+local applications
+local service_list_path
+local instance_list_path
+
+local schema = {
+type = "object",
+properties = {
+host = {
+type = "array",
+minItems = 1,
+items = {
+type = "string",
+},
+},
+fetch_interval = {type = "integer", minimum = 1, default = 30},
+prefix = {type = "string"},
+weight = {type = "integer", minimum = 0},
+timeout = {
+type = "object",
+properties = {
+connect = {type = "integer", minimum = 1, default = 2000},
+send = {type = "integer", minimum = 1, default = 2000},
+read = {type = "integer", minimum = 1, default = 5000},
+}
+},
+},
+required = {"host"}
+}
+
+
+local _M = {
+version = 0.1,
+}
+
+
+local function service_info()
+local host = local_conf.discovery and
+local_conf.discovery.nacos and local_conf.discovery.nacos.host
+if not host then
+log.error("do not set nacos.host")
+return
+end
+
+local basic_auth
+-- TODO Add health check to get healthy nodes.
+local url = host[math_random(#host)]
+local auth_idx = str_find(url, "@")
+if auth_idx then
+local protocol_idx = str_find(url, "://")
+local protocol = string_sub(url, 1, protocol_idx + 2)
+local user_and_password = string_sub(url, protocol_idx + 3, auth_idx - 
1)
+local other = string_sub(url, auth_idx + 1)
+url = protocol .. other
+basic_auth = "Basic " .. ngx.encode_base64(user_and_password)
+end
+if local_conf.discovery.nacos.prefix then
+url = url .. local_conf.discovery.nacos.prefix
+end
+if string_sub(url, #url) ~= "/" then
+url = url .. "/"
+end
+
+return url, basic_auth
+end
+
+
+local function request(request_uri, basic_auth, method, path, query, body)
+log.info("nacos uri:", request_uri, ".")
+local url = request_uri .. path
+local headers = core.table.new(0, 5)
+headers['Connection'] = 'Keep-Alive'
+headers['Accept'] = 'application/json'
+
+if basic_auth then
+headers['Authorization'] = basic_auth
+end
+
+if body and 'table' == type(body) then
+local err
+body, err = core.json.encode(body)
+if not body then
+return nil, 'invalid body : ' .. err
+end
+-- log.warn(method, url, body)
+headers['Content-Type'] = 'application/json'
+end
+
+local httpc = http.new()
+local timeout = local_conf.discovery.nacos.timeout
+local connect_timeout = timeout and timeout.connect or 2000
+local send_timeout = timeout and timeout.send or 2000
+local read_timeout = timeout and timeout.read or 5000
+log.info("connect_timeout:", connect_timeout, ", send_timeout:", 
send_timeout,
+", read_timeout:", read_timeout, ".")
+httpc:set_timeouts(connect_timeout, send_timeout, read_timeout)
+return httpc:request_uri(url, {
+version = 1.1,
+method = method,
+headers = headers,
+query = query,
+body = body,
+ssl_verify = false,
+})
+end
+
+
+local function get_url(request_url,basic_auth,path)
+local res, err = request(request_url, basic_auth, "GET", path)
+if 

[GitHub] [apisix] damonchen commented on issue #1593: [discuss] Better management of plugins by users and third-party developers apisix

2021-03-18 Thread GitBox


damonchen commented on issue #1593:
URL: https://github.com/apache/apisix/issues/1593#issuecomment-802491900


   great! 
   
   is it the feature completed?  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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-18 Thread GitBox


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



##
File path: apisix/discovery/consul_kv.lua
##
@@ -230,6 +241,73 @@ local function update_application(server_name_prefix, data)
 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)

Review comment:
   No, we don't prepare the dump file.
   Maybe the log level is `notice` would be suitable.




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

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




[GitHub] [apisix] spacewander commented on a change in pull request #3820: feat: add nacos support

2021-03-18 Thread GitBox


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



##
File path: apisix/discovery/nacos.lua
##
@@ -0,0 +1,237 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local local_conf = require("apisix.core.config_local").local_conf()
+local http   = require("resty.http")
+local core   = require("apisix.core")
+local ipairs = ipairs
+local tostring   = tostring
+local type   = type
+local math_random= math.random
+local error  = error
+local ngx= ngx
+local ngx_timer_at   = ngx.timer.at
+local ngx_timer_every= ngx.timer.every
+local string_sub = string.sub
+local str_find   = core.string.find
+local log= core.log
+
+local default_weight
+local applications
+local service_list_path
+local instance_list_path
+
+local schema = {
+type = "object",
+properties = {
+host = {
+type = "array",
+minItems = 1,
+items = {
+type = "string",
+},
+},
+fetch_interval = {type = "integer", minimum = 1, default = 30},
+prefix = {type = "string"},
+weight = {type = "integer", minimum = 0},
+timeout = {
+type = "object",
+properties = {
+connect = {type = "integer", minimum = 1, default = 2000},
+send = {type = "integer", minimum = 1, default = 2000},
+read = {type = "integer", minimum = 1, default = 5000},
+}
+},
+},
+required = {"host"}
+}
+
+
+local _M = {
+version = 0.1,
+}
+
+
+local function service_info()
+local host = local_conf.discovery and
+local_conf.discovery.nacos and local_conf.discovery.nacos.host
+if not host then
+log.error("do not set nacos.host")
+return
+end
+
+local basic_auth
+-- TODO Add health check to get healthy nodes.
+local url = host[math_random(#host)]
+local auth_idx = str_find(url, "@")
+if auth_idx then
+local protocol_idx = str_find(url, "://")
+local protocol = string_sub(url, 1, protocol_idx + 2)
+local user_and_password = string_sub(url, protocol_idx + 3, auth_idx - 
1)
+local other = string_sub(url, auth_idx + 1)
+url = protocol .. other
+basic_auth = "Basic " .. ngx.encode_base64(user_and_password)
+end
+if local_conf.discovery.nacos.prefix then
+url = url .. local_conf.discovery.nacos.prefix
+end
+if string_sub(url, #url) ~= "/" then
+url = url .. "/"
+end
+
+return url, basic_auth
+end
+
+
+local function request(request_uri, basic_auth, method, path, query, body)
+log.info("nacos uri:", request_uri, ".")
+local url = request_uri .. path
+local headers = core.table.new(0, 5)
+headers['Connection'] = 'Keep-Alive'
+headers['Accept'] = 'application/json'
+
+if basic_auth then
+headers['Authorization'] = basic_auth
+end
+
+if body and 'table' == type(body) then
+local err
+body, err = core.json.encode(body)
+if not body then
+return nil, 'invalid body : ' .. err
+end
+-- log.warn(method, url, body)
+headers['Content-Type'] = 'application/json'
+end
+
+local httpc = http.new()
+local timeout = local_conf.discovery.nacos.timeout
+local connect_timeout = timeout and timeout.connect or 2000
+local send_timeout = timeout and timeout.send or 2000
+local read_timeout = timeout and timeout.read or 5000
+log.info("connect_timeout:", connect_timeout, ", send_timeout:", 
send_timeout,
+", read_timeout:", read_timeout, ".")
+httpc:set_timeouts(connect_timeout, send_timeout, read_timeout)
+return httpc:request_uri(url, {
+version = 1.1,
+method = method,
+headers = headers,
+query = query,
+body = body,
+ssl_verify = false,
+})
+end
+
+
+local function get_url(request_url,basic_auth,path)
+local res, err = request(request_url, basic_auth, "GET", path)
+

[apisix] branch master updated (f3a6c2a -> 1064e2d)

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

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


from f3a6c2a  change: remove deprecated upstream.enable_websocket (#3854)
 add 1064e2d  docs: update plugin-develop.md (#3862)

No new revisions were added by this update.

Summary of changes:
 docs/en/latest/plugin-develop.md | 26 +++---
 docs/zh/latest/plugin-develop.md | 27 +++
 2 files changed, 22 insertions(+), 31 deletions(-)


[GitHub] [apisix] spacewander merged pull request #3862: docs: update plugin-develop.md

2021-03-18 Thread GitBox


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


   


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

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




[GitHub] [apisix] iamayushdas opened a new pull request #3866: docs: added key types for limit-count plugin

2021-03-18 Thread GitBox


iamayushdas opened a new pull request #3866:
URL: https://github.com/apache/apisix/pull/3866


   ### What this PR does / why we need it:
   To make users aware of limit-count key types the can use
   #3855 
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features 
have been added?
   * [ ] Have you added corresponding test cases?
   * [x] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix/tree/master#community) first**
   


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

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




[GitHub] [apisix] spacewander commented on a change in pull request #3839: feat: add allow_origins_by_regex to cors plugin

2021-03-18 Thread GitBox


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



##
File path: apisix/plugins/cors.lua
##
@@ -133,7 +157,7 @@ local function set_cors_headers(conf, ctx)
 end
 
 core.response.set_header("Access-Control-Allow-Origin", 
ctx.cors_allow_origins)
-if ctx.cors_allow_origins ~= "*" then
+if ctx.cors_allow_origins ~= "*" or conf.allow_origins_by_regex ~= nil then

Review comment:
   Yes. 
   
   >if allow_origins_by_regex is matched, the cors_allow_origins will be the 
matched domain. not *
   
   So `ctx.cors_allow_origins ~= "*"` will be true.
   Therefore there is no need to add an additional condition.




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

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




[GitHub] [apisix] moonming closed issue #3800: request help: 用openssl生成证书和秘钥后,不能直接用,还要把私有CA证书cacert.pem文件内容,追加到/etc/pkis/certs/ca-bundle.crt,才能用https访问

2021-03-18 Thread GitBox


moonming closed issue #3800:
URL: https://github.com/apache/apisix/issues/3800


   


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

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




[GitHub] [apisix] moonming commented on issue #3800: request help: 用openssl生成证书和秘钥后,不能直接用,还要把私有CA证书cacert.pem文件内容,追加到/etc/pkis/certs/ca-bundle.crt,才能用https访问

2021-03-18 Thread GitBox


moonming commented on issue #3800:
URL: https://github.com/apache/apisix/issues/3800#issuecomment-802462603


   @xuyancheng24 
   Please use English in the public channel, thx


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

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




[GitHub] [apisix] moonming commented on issue #3843: 使用upstream_route,所有请求都到1号节点上,如何把请求平均分配到所有节点上?

2021-03-18 Thread GitBox


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


   @sailershen 
   Please use English in the public channel, thx


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

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




[GitHub] [apisix] moonming commented on issue #3778: bug: 跨域请求bug

2021-03-18 Thread GitBox


moonming commented on issue #3778:
URL: https://github.com/apache/apisix/issues/3778#issuecomment-802461989


   @miaoyb 
   Please use English in the public channel, thx


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

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




[GitHub] [apisix] moonming commented on issue #3851: bug: traffic-split插件里的upstrem配置rewrite和upstrem_host,没有正确生效

2021-03-18 Thread GitBox


moonming commented on issue #3851:
URL: https://github.com/apache/apisix/issues/3851#issuecomment-802461657


   @aiyiyi121 
   Please use English in the public channel, thx


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

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




[GitHub] [apisix-dashboard] liuxiran commented on pull request #1619: fix: (route_online_debug)Change the appended Content-type data to overlay to ensure that the Content-type is unique

2021-03-18 Thread GitBox


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


   related fe pr: #1612 


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

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




[GitHub] [apisix] moonming commented on issue #3849: bug: roundrobin 负载均衡 k8s短域名 和 ip 同时配置只会选择一种轮询

2021-03-18 Thread GitBox


moonming commented on issue #3849:
URL: https://github.com/apache/apisix/issues/3849#issuecomment-802461303


   @godsoul 
   Please use English in the public channel, thx


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

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




[GitHub] [apisix] iamayushdas commented on issue #3857: Optimize the Serverless plugin

2021-03-18 Thread GitBox


iamayushdas commented on issue #3857:
URL: https://github.com/apache/apisix/issues/3857#issuecomment-802458769


   can i have more help in this from you. i want to understand and solve this 
issue from myself. @tokers 
   


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

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




[GitHub] [apisix] batman-ezio commented on a change in pull request #3839: feat: add allow_origins_by_regex to cors plugin

2021-03-18 Thread GitBox


batman-ezio commented on a change in pull request #3839:
URL: https://github.com/apache/apisix/pull/3839#discussion_r597354235



##
File path: t/plugin/cors.t
##
@@ -757,4 +757,132 @@ GET /t
 --- response_body eval
 qr/failed to check the configuration of plugin cors err: you can not/
 --- no_error_log
+
+
+
+=== TEST 28: set route (regex specified)
+--- config
+location /t {
+content_by_lua_block {
+local t = require("lib.test_admin").test
+local code, body = t('/apisix/admin/routes/1',
+ ngx.HTTP_PUT,
+ [[{
+"plugins": {
+"cors": {
+"allow_origins": 
"http://sub.domain.com,http://sub2.domain.com;,
+"allow_methods": "GET,POST",
+"allow_headers": "headr1,headr2",
+"expose_headers": "ex-headr1,ex-headr2",
+"max_age": 50,
+"allow_credential": true,
+"allow_origins_by_regex":[".*\\.test.com"]
+}
+},
+"upstream": {
+"nodes": {
+"127.0.0.1:1980": 1
+},
+"type": "roundrobin"
+},
+"uri": "/hello"
+}]]
+)
+
+if code >= 300 then
+ngx.status = code
+end
+ngx.say(body)
+}
+}
+--- request
+GET /t
+--- response_body
+passed
+--- no_error_log
+[error]
+
+
+
+=== TEST 29: regex specified
+--- request
+GET /hello HTTP/1.1
+--- more_headers
+Origin: http://a.test.com
+resp-vary: Via
+--- response_body
+hello world
+--- response_headers
+Access-Control-Allow-Origin: http://a.test.com
+Vary: Via, Origin
+Access-Control-Allow-Methods: GET,POST
+Access-Control-Allow-Headers: headr1,headr2
+Access-Control-Expose-Headers: ex-headr1,ex-headr2
+Access-Control-Max-Age: 50
+Access-Control-Allow-Credentials: true
+--- no_error_log
+[error]
+
+
+
+=== TEST 30: set route (regex specified not match)

Review comment:
   test cases 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] batman-ezio commented on a change in pull request #3839: feat: add allow_origins_by_regex to cors plugin

2021-03-18 Thread GitBox


batman-ezio commented on a change in pull request #3839:
URL: https://github.com/apache/apisix/pull/3839#discussion_r597353916



##
File path: apisix/plugins/cors.lua
##
@@ -133,7 +157,7 @@ local function set_cors_headers(conf, ctx)
 end
 
 core.response.set_header("Access-Control-Allow-Origin", 
ctx.cors_allow_origins)
-if ctx.cors_allow_origins ~= "*" then
+if ctx.cors_allow_origins ~= "*" or conf.allow_origins_by_regex ~= nil then

Review comment:
   if allow_origins_by_regex is matched, the  cors_allow_origins will be 
the matched domain. not `*`
   for example. it we use `[".*.test.com"]` and the request is from a.test.com
   then the cors_allow_origins will set to  `a.test.com`. not `*`
   
   `conf.allow_origins_by_regex ~= nil` means we use regex to match many 
domains.
   the Vary must set as `Origin `
   f a request may contain a Access-Control-Allow-Origin with different values, 
then the CDN should always respond with Vary: Origin,
   check 
   
https://stackoverflow.com/questions/25329405/why-isnt-vary-origin-response-set-on-a-cors-miss




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #1617: feat: remove unnecessary cookie session

2021-03-18 Thread GitBox


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


   Hi @stu01509, would you mind pushing codes from the master branch to this 
PR? It fixes some test issues.


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

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




[GitHub] [apisix-dashboard] Jaycean commented on a change in pull request #1615: feat: manual deletion of apisix node data

2021-03-18 Thread GitBox


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



##
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:
   We are using ginkgo to rewrite the E2E test. If you have time, you can 
use ginkgo to write the E2E test directly in the e2enew folder. Thks.




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

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




[GitHub] [apisix] ShaoZeMing commented on issue #3865: bug: Routing priority matching bug

2021-03-18 Thread GitBox


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


   > You should provide more detailed route configuration information.
   
   ```
   {
 "components": {
   "securitySchemes": {
 "api_key": {
   "in": "header",
   "name": "X-XSRF-TOKEN",
   "type": "apiKey"
 },
 "basicAuth": {
   "in": "header",
   "name": "basicAuth",
   "type": "basicAuth"
 },
 "bearerAuth": {
   "bearerFormat": "JWT",
   "scheme": "bearer",
   "type": "http"
 }
   }
 },
 "info": {
   "title": "RoutesExport",
   "version": "3.0.0"
 },
 "openapi": "3.0.0",
 "paths": {
   "/test/{params}": {
 "get": {
   "operationId": "test_pathGET",
   "parameters": [{
 "description": "params in path",
 "in": "path",
 "name": "params",
 "required": true,
 "schema": {
   "type": "string"
 }
   }, {
 "description": "params in path",
 "in": "path",
 "name": "params",
 "required": true,
 "schema": {
   "type": "string"
 }
   }, {
 "description": "params in path",
 "in": "path",
 "name": "params",
 "required": true,
 "schema": {
   "type": "string"
 }
   }, {
 "description": "params in path",
 "in": "path",
 "name": "params",
 "required": true,
 "schema": {
   "type": "string"
 }
   }],
   "requestBody": {},
   "responses": {
 "default": {
   "description": ""
 }
   },
   "security": [{
 "basicAuth": [" "]
   }],
   "x-apisix-enable_websocket": false,
   "x-apisix-plugins": {},
   "x-apisix-priority": 0,
   "x-apisix-status": 1,
   "x-apisix-upstream": {
 "id": "341144078647297023",
 "create_time": 1612867316,
 "update_time": 1614741356,
 "nodes": [{
   "host": "xthy-sso-api-pub",
   "port": 80,
   "weight": 1
 }],
 "timeout": {
   "connect": 6000,
   "read": 6000,
   "send": 6000
 },
 "type": "roundrobin",
 "pass_host": "rewrite",
 "upstream_host": "xthy-sso-api-pub",
 "name": "花园认证服务",
 "desc": "花园认证服务"
   },
   "x-apisix-vars": []
 }
   },
   "/{params}": {
 "get": {
   "operationId": "test_hostGET",
   "parameters": [{
 "description": "params in path",
 "in": "path",
 "name": "params",
 "required": true,
 "schema": {
   "type": "string"
 }
   }],
   "requestBody": {},
   "responses": {
 "default": {
   "description": ""
 }
   },
   "security": [{
 "bearerAuth": [" "]
   }],
   "summary": "测试仅只有host",
   "x-apisix-enable_websocket": false,
   "x-apisix-hosts": ["test-dev-1.apisix.xthktech.cn"],
   "x-apisix-labels": {
 "API_VERSION": "v0.0.1"
   },
   "x-apisix-plugins": {},
   "x-apisix-priority": 0,
   "x-apisix-status": 1,
   "x-apisix-upstream": {
 "id": "341144078647297023",
 "create_time": 1612867316,
 "update_time": 1614741356,
 "nodes": [{
   "host": "xthy-sso-api-pub",
   "port": 80,
   "weight": 1
 }],
 "timeout": {
   "connect": 6000,
   "read": 6000,
   "send": 6000
 },
 "type": "roundrobin",
 "pass_host": "rewrite",
 "upstream_host": "xthy-sso-api-pub",
 "name": "花园认证服务",
 "desc": "花园认证服务"
   },
   "x-apisix-vars": []
 }
   },
   "/{params}-APISIX-REPEAT-URI-2": {
 "get": {
   "operationId": "test_host_headerGET",
   "parameters": [{
 "description": "params in path",
 "in": "path",
 "name": "params",
 "required": true,
 "schema": {
   "type": "string"
 }
   }, {
 "description": "params in path",
 "in": "path",
 "name": "params",
 "required": true,
 "schema": {
   "type": "string"
 }
   }],
   "requestBody": {},
   

[GitHub] [apisix] benx203 commented on a change in pull request #3820: feat: add nacos support

2021-03-18 Thread GitBox


benx203 commented on a change in pull request #3820:
URL: https://github.com/apache/apisix/pull/3820#discussion_r597352555



##
File path: apisix/discovery/nacos.lua
##
@@ -0,0 +1,237 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local local_conf = require("apisix.core.config_local").local_conf()
+local http   = require("resty.http")
+local core   = require("apisix.core")
+local ipairs = ipairs
+local tostring   = tostring
+local type   = type
+local math_random= math.random
+local error  = error
+local ngx= ngx
+local ngx_timer_at   = ngx.timer.at
+local ngx_timer_every= ngx.timer.every
+local string_sub = string.sub
+local str_find   = core.string.find
+local log= core.log
+
+local default_weight
+local applications
+local service_list_path
+local instance_list_path
+
+local schema = {
+type = "object",
+properties = {
+host = {
+type = "array",
+minItems = 1,
+items = {
+type = "string",
+},
+},
+fetch_interval = {type = "integer", minimum = 1, default = 30},
+prefix = {type = "string"},
+weight = {type = "integer", minimum = 0},
+timeout = {
+type = "object",
+properties = {
+connect = {type = "integer", minimum = 1, default = 2000},
+send = {type = "integer", minimum = 1, default = 2000},
+read = {type = "integer", minimum = 1, default = 5000},
+}
+},
+},
+required = {"host"}
+}
+
+
+local _M = {
+version = 0.1,
+}
+
+
+local function service_info()
+local host = local_conf.discovery and
+local_conf.discovery.nacos and local_conf.discovery.nacos.host
+if not host then
+log.error("do not set nacos.host")
+return
+end
+
+local basic_auth
+-- TODO Add health check to get healthy nodes.
+local url = host[math_random(#host)]
+local auth_idx = str_find(url, "@")
+if auth_idx then
+local protocol_idx = str_find(url, "://")
+local protocol = string_sub(url, 1, protocol_idx + 2)
+local user_and_password = string_sub(url, protocol_idx + 3, auth_idx - 
1)
+local other = string_sub(url, auth_idx + 1)
+url = protocol .. other
+basic_auth = "Basic " .. ngx.encode_base64(user_and_password)
+end
+if local_conf.discovery.nacos.prefix then
+url = url .. local_conf.discovery.nacos.prefix
+end
+if string_sub(url, #url) ~= "/" then
+url = url .. "/"
+end
+
+return url, basic_auth
+end
+
+
+local function request(request_uri, basic_auth, method, path, query, body)
+log.info("nacos uri:", request_uri, ".")
+local url = request_uri .. path
+local headers = core.table.new(0, 5)
+headers['Connection'] = 'Keep-Alive'
+headers['Accept'] = 'application/json'
+
+if basic_auth then
+headers['Authorization'] = basic_auth
+end
+
+if body and 'table' == type(body) then
+local err
+body, err = core.json.encode(body)
+if not body then
+return nil, 'invalid body : ' .. err
+end
+-- log.warn(method, url, body)
+headers['Content-Type'] = 'application/json'
+end
+
+local httpc = http.new()
+local timeout = local_conf.discovery.nacos.timeout
+local connect_timeout = timeout and timeout.connect or 2000
+local send_timeout = timeout and timeout.send or 2000
+local read_timeout = timeout and timeout.read or 5000
+log.info("connect_timeout:", connect_timeout, ", send_timeout:", 
send_timeout,
+", read_timeout:", read_timeout, ".")
+httpc:set_timeouts(connect_timeout, send_timeout, read_timeout)
+return httpc:request_uri(url, {
+version = 1.1,
+method = method,
+headers = headers,
+query = query,
+body = body,
+ssl_verify = false,
+})
+end
+
+
+local function get_url(request_url,basic_auth,path)
+local res, err = request(request_url, basic_auth, "GET", path)
+if 

[GitHub] [apisix] benx203 commented on a change in pull request #3820: feat: add nacos support

2021-03-18 Thread GitBox


benx203 commented on a change in pull request #3820:
URL: https://github.com/apache/apisix/pull/3820#discussion_r597351976



##
File path: apisix/discovery/nacos.lua
##
@@ -0,0 +1,237 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local local_conf = require("apisix.core.config_local").local_conf()
+local http   = require("resty.http")
+local core   = require("apisix.core")
+local ipairs = ipairs
+local tostring   = tostring
+local type   = type
+local math_random= math.random
+local error  = error
+local ngx= ngx
+local ngx_timer_at   = ngx.timer.at
+local ngx_timer_every= ngx.timer.every
+local string_sub = string.sub
+local str_find   = core.string.find
+local log= core.log
+
+local default_weight
+local applications
+local service_list_path
+local instance_list_path
+
+local schema = {
+type = "object",
+properties = {
+host = {
+type = "array",
+minItems = 1,
+items = {
+type = "string",
+},
+},
+fetch_interval = {type = "integer", minimum = 1, default = 30},
+prefix = {type = "string"},
+weight = {type = "integer", minimum = 0},
+timeout = {
+type = "object",
+properties = {
+connect = {type = "integer", minimum = 1, default = 2000},
+send = {type = "integer", minimum = 1, default = 2000},
+read = {type = "integer", minimum = 1, default = 5000},
+}
+},
+},
+required = {"host"}
+}
+
+
+local _M = {
+version = 0.1,
+}
+
+
+local function service_info()
+local host = local_conf.discovery and
+local_conf.discovery.nacos and local_conf.discovery.nacos.host
+if not host then
+log.error("do not set nacos.host")
+return
+end
+
+local basic_auth
+-- TODO Add health check to get healthy nodes.
+local url = host[math_random(#host)]
+local auth_idx = str_find(url, "@")
+if auth_idx then
+local protocol_idx = str_find(url, "://")
+local protocol = string_sub(url, 1, protocol_idx + 2)
+local user_and_password = string_sub(url, protocol_idx + 3, auth_idx - 
1)
+local other = string_sub(url, auth_idx + 1)
+url = protocol .. other
+basic_auth = "Basic " .. ngx.encode_base64(user_and_password)
+end
+if local_conf.discovery.nacos.prefix then
+url = url .. local_conf.discovery.nacos.prefix
+end
+if string_sub(url, #url) ~= "/" then
+url = url .. "/"
+end
+
+return url, basic_auth
+end
+
+
+local function request(request_uri, basic_auth, method, path, query, body)
+log.info("nacos uri:", request_uri, ".")
+local url = request_uri .. path
+local headers = core.table.new(0, 5)
+headers['Connection'] = 'Keep-Alive'
+headers['Accept'] = 'application/json'
+
+if basic_auth then
+headers['Authorization'] = basic_auth
+end
+
+if body and 'table' == type(body) then
+local err
+body, err = core.json.encode(body)
+if not body then
+return nil, 'invalid body : ' .. err
+end
+-- log.warn(method, url, body)
+headers['Content-Type'] = 'application/json'
+end
+
+local httpc = http.new()
+local timeout = local_conf.discovery.nacos.timeout
+local connect_timeout = timeout and timeout.connect or 2000
+local send_timeout = timeout and timeout.send or 2000
+local read_timeout = timeout and timeout.read or 5000
+log.info("connect_timeout:", connect_timeout, ", send_timeout:", 
send_timeout,
+", read_timeout:", read_timeout, ".")
+httpc:set_timeouts(connect_timeout, send_timeout, read_timeout)
+return httpc:request_uri(url, {
+version = 1.1,
+method = method,
+headers = headers,
+query = query,
+body = body,
+ssl_verify = false,
+})
+end
+
+
+local function get_url(request_url,basic_auth,path)
+local res, err = request(request_url, basic_auth, "GET", path)
+if 

[GitHub] [apisix-dashboard] juzhiyuan commented on pull request #1584: feat: save Service list page's meta status

2021-03-18 Thread GitBox


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


   @guoqqqi Hi, I see there don't have all test cases for each page, because 
they have the same logic, right?
   
   Please try to make a public List component, and for each module, we could 
use this component directly, and the only test that component is enough. You 
could create one issue to track this for now.


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

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




[GitHub] [apisix] tokers merged pull request #3854: change: remove deprecated upstream.enable_websocket

2021-03-18 Thread GitBox


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


   


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

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




[GitHub] [apisix] benx203 commented on a change in pull request #3820: feat: add nacos support

2021-03-18 Thread GitBox


benx203 commented on a change in pull request #3820:
URL: https://github.com/apache/apisix/pull/3820#discussion_r597350777



##
File path: apisix/discovery/nacos.lua
##
@@ -0,0 +1,237 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local local_conf = require("apisix.core.config_local").local_conf()
+local http   = require("resty.http")
+local core   = require("apisix.core")
+local ipairs = ipairs
+local tostring   = tostring
+local type   = type
+local math_random= math.random
+local error  = error
+local ngx= ngx
+local ngx_timer_at   = ngx.timer.at
+local ngx_timer_every= ngx.timer.every
+local string_sub = string.sub
+local str_find   = core.string.find
+local log= core.log
+
+local default_weight
+local applications
+local service_list_path
+local instance_list_path
+
+local schema = {
+type = "object",
+properties = {
+host = {
+type = "array",
+minItems = 1,
+items = {
+type = "string",
+},
+},
+fetch_interval = {type = "integer", minimum = 1, default = 30},
+prefix = {type = "string"},
+weight = {type = "integer", minimum = 0},
+timeout = {
+type = "object",
+properties = {
+connect = {type = "integer", minimum = 1, default = 2000},
+send = {type = "integer", minimum = 1, default = 2000},
+read = {type = "integer", minimum = 1, default = 5000},
+}
+},
+},
+required = {"host"}
+}
+
+
+local _M = {
+version = 0.1,
+}
+
+
+local function service_info()
+local host = local_conf.discovery and
+local_conf.discovery.nacos and local_conf.discovery.nacos.host
+if not host then
+log.error("do not set nacos.host")
+return
+end
+
+local basic_auth
+-- TODO Add health check to get healthy nodes.
+local url = host[math_random(#host)]
+local auth_idx = str_find(url, "@")
+if auth_idx then
+local protocol_idx = str_find(url, "://")
+local protocol = string_sub(url, 1, protocol_idx + 2)
+local user_and_password = string_sub(url, protocol_idx + 3, auth_idx - 
1)
+local other = string_sub(url, auth_idx + 1)
+url = protocol .. other
+basic_auth = "Basic " .. ngx.encode_base64(user_and_password)
+end
+if local_conf.discovery.nacos.prefix then
+url = url .. local_conf.discovery.nacos.prefix
+end
+if string_sub(url, #url) ~= "/" then
+url = url .. "/"
+end
+
+return url, basic_auth
+end
+
+
+local function request(request_uri, basic_auth, method, path, query, body)
+log.info("nacos uri:", request_uri, ".")
+local url = request_uri .. path
+local headers = core.table.new(0, 5)
+headers['Connection'] = 'Keep-Alive'
+headers['Accept'] = 'application/json'
+
+if basic_auth then
+headers['Authorization'] = basic_auth
+end
+
+if body and 'table' == type(body) then
+local err
+body, err = core.json.encode(body)
+if not body then
+return nil, 'invalid body : ' .. err
+end
+-- log.warn(method, url, body)
+headers['Content-Type'] = 'application/json'
+end
+
+local httpc = http.new()
+local timeout = local_conf.discovery.nacos.timeout
+local connect_timeout = timeout and timeout.connect or 2000
+local send_timeout = timeout and timeout.send or 2000
+local read_timeout = timeout and timeout.read or 5000
+log.info("connect_timeout:", connect_timeout, ", send_timeout:", 
send_timeout,
+", read_timeout:", read_timeout, ".")
+httpc:set_timeouts(connect_timeout, send_timeout, read_timeout)
+return httpc:request_uri(url, {
+version = 1.1,
+method = method,
+headers = headers,
+query = query,
+body = body,
+ssl_verify = false,
+})
+end
+
+
+local function get_url(request_url,basic_auth,path)
+local res, err = request(request_url, basic_auth, "GET", path)
+if 

[apisix] branch master updated (6b3140e -> f3a6c2a)

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

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


from 6b3140e  docs: fix limit-count typo (#3863)
 add f3a6c2a  change: remove deprecated upstream.enable_websocket (#3854)

No new revisions were added by this update.

Summary of changes:
 apisix/init.lua   | 6 --
 apisix/schema_def.lua | 5 -
 2 files changed, 11 deletions(-)


[GitHub] [apisix] benx203 commented on a change in pull request #3820: feat: add nacos support

2021-03-18 Thread GitBox


benx203 commented on a change in pull request #3820:
URL: https://github.com/apache/apisix/pull/3820#discussion_r597350658



##
File path: apisix/discovery/nacos.lua
##
@@ -0,0 +1,237 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local local_conf = require("apisix.core.config_local").local_conf()
+local http   = require("resty.http")
+local core   = require("apisix.core")
+local ipairs = ipairs
+local tostring   = tostring
+local type   = type
+local math_random= math.random
+local error  = error
+local ngx= ngx
+local ngx_timer_at   = ngx.timer.at
+local ngx_timer_every= ngx.timer.every
+local string_sub = string.sub
+local str_find   = core.string.find
+local log= core.log
+
+local default_weight
+local applications
+local service_list_path
+local instance_list_path
+
+local schema = {
+type = "object",
+properties = {
+host = {
+type = "array",
+minItems = 1,
+items = {
+type = "string",
+},
+},
+fetch_interval = {type = "integer", minimum = 1, default = 30},
+prefix = {type = "string"},
+weight = {type = "integer", minimum = 0},
+timeout = {
+type = "object",
+properties = {
+connect = {type = "integer", minimum = 1, default = 2000},
+send = {type = "integer", minimum = 1, default = 2000},
+read = {type = "integer", minimum = 1, default = 5000},
+}
+},
+},
+required = {"host"}
+}
+
+
+local _M = {
+version = 0.1,
+}
+
+
+local function service_info()
+local host = local_conf.discovery and
+local_conf.discovery.nacos and local_conf.discovery.nacos.host
+if not host then
+log.error("do not set nacos.host")
+return
+end
+
+local basic_auth
+-- TODO Add health check to get healthy nodes.
+local url = host[math_random(#host)]
+local auth_idx = str_find(url, "@")
+if auth_idx then
+local protocol_idx = str_find(url, "://")
+local protocol = string_sub(url, 1, protocol_idx + 2)
+local user_and_password = string_sub(url, protocol_idx + 3, auth_idx - 
1)
+local other = string_sub(url, auth_idx + 1)
+url = protocol .. other
+basic_auth = "Basic " .. ngx.encode_base64(user_and_password)
+end
+if local_conf.discovery.nacos.prefix then
+url = url .. local_conf.discovery.nacos.prefix
+end
+if string_sub(url, #url) ~= "/" then
+url = url .. "/"
+end
+
+return url, basic_auth
+end
+
+
+local function request(request_uri, basic_auth, method, path, query, body)
+log.info("nacos uri:", request_uri, ".")
+local url = request_uri .. path
+local headers = core.table.new(0, 5)
+headers['Connection'] = 'Keep-Alive'
+headers['Accept'] = 'application/json'
+
+if basic_auth then
+headers['Authorization'] = basic_auth
+end
+
+if body and 'table' == type(body) then
+local err
+body, err = core.json.encode(body)
+if not body then
+return nil, 'invalid body : ' .. err
+end
+-- log.warn(method, url, body)
+headers['Content-Type'] = 'application/json'
+end
+
+local httpc = http.new()
+local timeout = local_conf.discovery.nacos.timeout
+local connect_timeout = timeout and timeout.connect or 2000

Review comment:
   OK.




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

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




[GitHub] [apisix] tokers merged pull request #3863: docs: fix limit-count typo

2021-03-18 Thread GitBox


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


   


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

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




[GitHub] [apisix-website] tokers closed issue #264: Typo in the title of limit-count plugin

2021-03-18 Thread GitBox


tokers closed issue #264:
URL: https://github.com/apache/apisix-website/issues/264


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub 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: docs: fix limit-count typo (#3863)

2021-03-18 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 6b3140e  docs: fix limit-count typo (#3863)
6b3140e is described below

commit 6b3140e5c130afed27ae4a2888643a0d5cc6badb
Author: Cliff Su 
AuthorDate: Fri Mar 19 09:34:40 2021 +0800

docs: fix limit-count typo (#3863)
---
 docs/en/latest/plugins/limit-count.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/en/latest/plugins/limit-count.md 
b/docs/en/latest/plugins/limit-count.md
index 9540996..30e11fc 100644
--- a/docs/en/latest/plugins/limit-count.md
+++ b/docs/en/latest/plugins/limit-count.md
@@ -1,5 +1,5 @@
 ---
-title: limit-connt
+title: limit-count
 ---
 
 

[GitHub] [apisix-ingress-controller] tokers commented on pull request #307: chore: add yaml tags for types

2021-03-18 Thread GitBox


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


   @fgksgf The types in `config/v2alpha1` should also be added these tags :).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 closed issue #305: bug: failed to open file: /usr/local/apisix/conf/nginx.conf on Openshift 4.6

2021-03-18 Thread GitBox


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


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 issue #305: bug: failed to open file: /usr/local/apisix/conf/nginx.conf on Openshift 4.6

2021-03-18 Thread GitBox


tokers commented on issue #305:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/305#issuecomment-802443496


   @itfabrik You're welcome, now considering it was solved, I will close this 
issue.


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

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




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

2021-03-18 Thread GitBox


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



##
File path: Makefile
##
@@ -20,6 +20,10 @@ APISIX_VERSION ?= 2.4
 IMAGE_NAME = apache/apisix
 IMAGE_TAR_NAME = apache_apisix
 
+APISIX_DASHBOARD_VERSION ?= 2.4
+DASHBOARD_IMAGE_NAME = apache/apisix-dashboard

Review comment:
   Would be better to always add the `APISIX` prefix.

##
File path: compose/dashboard-compose.yaml
##
@@ -0,0 +1,35 @@
+version: "3"

Review comment:
   It would be great to add the dashboard to the 
`compose/docker-compose.yaml`, let people can run APISIX, Dashboard, and ETCD 
together.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #1618: APISIX-Dashboard Backend API Development in Windows

2021-03-18 Thread GitBox


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


   thanks for feedback. 


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

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




[GitHub] [apisix] spacewander commented on issue #3861: Proposition ldap-auth plugin

2021-03-18 Thread GitBox


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


   LGTM.
   
   Only a small thing: we can map the dn to an existed consumer instead of 
creating a temporary one.
   
   For example,
   
https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/key-auth.md#how-to-enable
   
   ```
   curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
   "username": "jack",
   "plugins": {
   "ldap-auth": {
   "dn": "cn=admin,dc=example,dc=org"
   }
   }
   }'
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #3865: bug: Routing priority matching bug

2021-03-18 Thread GitBox


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


   You should provide more detailed route configuration information.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 merged pull request #1598: feat: check if the service is used by route when deleting

2021-03-18 Thread GitBox


starsz merged pull request #1598:
URL: https://github.com/apache/apisix-dashboard/pull/1598


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub 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: check if the service is used by route when deleting (#1598)

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

starsz 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 f4f27d1  feat: check if the service is used by route when deleting 
(#1598)
f4f27d1 is described below

commit f4f27d1a7b2f2a712c15dd922a30afd7e5d671db
Author: Peter Zhu 
AuthorDate: Fri Mar 19 09:21:18 2021 +0800

feat: check if the service is used by route when deleting (#1598)
---
 api/internal/handler/service/service.go  |  30 +++-
 api/internal/handler/service/service_test.go |  81 +++--
 api/test/e2enew/service/service_test.go  | 105 +++
 3 files changed, 207 insertions(+), 9 deletions(-)

diff --git a/api/internal/handler/service/service.go 
b/api/internal/handler/service/service.go
index 184c409..fe382b0 100644
--- a/api/internal/handler/service/service.go
+++ b/api/internal/handler/service/service.go
@@ -38,12 +38,14 @@ import (
 type Handler struct {
serviceStore  store.Interface
upstreamStore store.Interface
+   routeStorestore.Interface
 }
 
 func NewHandler() (handler.RouteRegister, error) {
return {
serviceStore:  store.GetStore(store.HubKeyService),
upstreamStore: store.GetStore(store.HubKeyUpstream),
+   routeStore:store.GetStore(store.HubKeyRoute),
}, nil
 }
 
@@ -232,8 +234,34 @@ type BatchDelete struct {
 
 func (h *Handler) BatchDelete(c droplet.Context) (interface{}, error) {
input := c.Input().(*BatchDelete)
+   ids := strings.Split(input.IDs, ",")
+   mp := make(map[string]struct{})
+   for _, id := range ids {
+   mp[id] = struct{}{}
+   }
+
+   ret, err := h.routeStore.List(c.Context(), store.ListInput{
+   Predicate: func(obj interface{}) bool {
+   route := obj.(*entity.Route)
+   if _, exist := 
mp[utils.InterfaceToString(route.ServiceID)]; exist {
+   return true
+   }
+
+   return false
+   },
+   PageSize:   0,
+   PageNumber: 0,
+   })
+   if err != nil {
+   return handler.SpecCodeResponse(err), err
+   }
+
+   if ret.TotalSize > 0 {
+   return {StatusCode: 
http.StatusBadRequest},
+   fmt.Errorf("route: %s is using this service", 
ret.Rows[0].(*entity.Route).Name)
+   }
 
-   if err := h.serviceStore.BatchDelete(c.Context(), 
strings.Split(input.IDs, ",")); err != nil {
+   if err := h.serviceStore.BatchDelete(c.Context(), ids); err != nil {
return handler.SpecCodeResponse(err), err
}
 
diff --git a/api/internal/handler/service/service_test.go 
b/api/internal/handler/service/service_test.go
index 55c47b5..3c508d0 100644
--- a/api/internal/handler/service/service_test.go
+++ b/api/internal/handler/service/service_test.go
@@ -18,6 +18,7 @@
 package service
 
 import (
+   "errors"
"fmt"
"net/http"
"testing"
@@ -819,12 +820,15 @@ func TestService_Patch(t *testing.T) {
 
 func TestServices_Delete(t *testing.T) {
tests := []struct {
-   caseDesc  string
-   giveInput *BatchDelete
-   giveErr   error
-   wantInput []string
-   wantErr   error
-   wantRet   interface{}
+   caseDesc  string
+   giveInput *BatchDelete
+   giveErr   error
+   wantInput []string
+   wantErr   error
+   wantRet   interface{}
+   routeMockData []*entity.Route
+   routeMockErr  error
+   getCalled bool
}{
{
caseDesc: "delete success",
@@ -832,6 +836,7 @@ func TestServices_Delete(t *testing.T) {
IDs: "s1",
},
wantInput: []string{"s1"},
+   getCalled: true,
},
{
caseDesc: "batch delete success",
@@ -839,6 +844,7 @@ func TestServices_Delete(t *testing.T) {
IDs: "s1,s2",
},
wantInput: []string{"s1", "s2"},
+   getCalled: true,
},
{
caseDesc: "delete failed",
@@ -849,6 +855,45 @@ func TestServices_Delete(t *testing.T) {
wantInput: []string{"s1"},
wantRet:   handler.SpecCodeResponse(fmt.Errorf("delete 
error")),
wantErr:   fmt.Errorf("delete error"),
+   getCalled: true,
+   },
+   {
+   caseDesc: 

[GitHub] [apisix-dashboard] Jaycean opened a new pull request #1619: fix: Change the appended content type data to overlay to ensure that the content type is unique

2021-03-18 Thread GitBox


Jaycean opened a new pull request #1619:
URL: https://github.com/apache/apisix-dashboard/pull/1619


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [x] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   - Related issues
   
   ___
   ### Bugfix
   - Description
   There is a bug in the use process. The user writes the `Content-type` to the 
`header-params` to forward the content type of the URL. The old logic uses the 
`req.Header.Add` method to generate multiple `Content-type` values, which leads 
to the failure of the forwarding request.
   
   - How to fix?
   use `req.Header.Set` To override the ·Content-type· and ensure that the 
value is unique。
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #3846: request help: Include message body when performing HMAC authentication

2021-03-18 Thread GitBox


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


   > Hi @Firstsawyou thanks for your response. The message body is signed by 
our vendor in order to not only authenticate the message but also show that the 
message has not been altered. I'm a still little unclear from the answer above 
about how to achieve my desired result. Are you suggesting that omitting the 
**request headers** and **url parameters** would produce the required result 
(i.e. include the message body) ?
   
   The hmac-auth plugin does not sign the request body. If you want to include 
the signature of the request body, I think the plugin needs to be modified.
   @nic-chen  What do you think?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 opened a new issue #1618: APISIX-Dashboard Backend API Development in Windows

2021-03-18 Thread GitBox


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


   ## Issue description
   Currently, according to the [Start 
developing](https://github.com/apache/apisix-dashboard/blob/master/docs/en/latest/develop.md#start-developing
 ) doc, in Windows platform will occur the error. I think we need to create 
another file to help the Windows platform developer to set up the `api` project.
   
   ## Expected behavior
   
   
   ## How to Reproduce
   
   1. Go to '...'
   2. Click on ''
   3. Scroll down to ''
   4. See error
   
   ## Screenshots
   
   
![image](https://user-images.githubusercontent.com/22230889/111717311-c3696880-8892-11eb-9139-a422b447c987.png)
   
   ## Environment
   
   * apisix version (cmd: `apisix version`):
   * OS (cmd: `uname -a`):
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   * etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   * apisix-dashboard version, if have:
   * Browser version, if have:
   
   ## Additional context
   


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

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




[GitHub] [apisix] spacewander commented on a change in pull request #3839: feat: add allow_origins_by_regex to cors plugin

2021-03-18 Thread GitBox


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



##
File path: apisix/plugins/cors.lua
##
@@ -133,7 +157,7 @@ local function set_cors_headers(conf, ctx)
 end
 
 core.response.set_header("Access-Control-Allow-Origin", 
ctx.cors_allow_origins)
-if ctx.cors_allow_origins ~= "*" then
+if ctx.cors_allow_origins ~= "*" or conf.allow_origins_by_regex ~= nil then

Review comment:
   I still don't understand why we need `or conf.allow_origins_by_regex ~= 
nil`.
   If `allow_origins_by_regex` is given but not matched, it can't go into this 
function.
   If `allow_origins_by_regex` is given but matched, the `cors_allow_origins` 
can't be `*` as `*` is just a mark used in `allow_origins`.




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

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




[GitHub] [apisix] spacewander commented on a change in pull request #3848: feat: add dump for consul_kv

2021-03-18 Thread GitBox


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



##
File path: apisix/discovery/consul_kv.lua
##
@@ -230,6 +241,73 @@ local function update_application(server_name_prefix, data)
 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)

Review comment:
   So you suggest to prepare the dump file before staring APISIX to avoid 
the unexpected event (file not found)?

##
File path: apisix/discovery/consul_kv.lua
##
@@ -230,6 +241,73 @@ local function update_application(server_name_prefix, data)
 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)

Review comment:
   @yongboy 
   So you suggest to prepare the dump file before staring APISIX to avoid the 
unexpected event (file not found)?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use 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 #1576: fix: config proxy-rewrite out of the plugin market in route module

2021-03-18 Thread GitBox


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


   @imjoey @guoqqqi thanks for review, after update to the latest master 
branch, there are some new errors occurred in ci, let me try to fix it. 
   
   


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

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




[GitHub] [apisix] batman-ezio commented on a change in pull request #3839: feat: add allow_origins_by_regex to cors plugin

2021-03-18 Thread GitBox


batman-ezio commented on a change in pull request #3839:
URL: https://github.com/apache/apisix/pull/3839#discussion_r597323673



##
File path: docs/en/latest/plugins/cors.md
##
@@ -43,6 +43,7 @@ title: cors
 | expose_headers   | string  | optional| "*" |   | Which headers 
are allowed to set in response when access cross-origin resource. Multiple 
value use `,` to split. |
 | max_age  | integer | optional| 5   |   | Maximum number 
of seconds the results can be cached.. Within this time range, the browser will 
reuse the last check result. `-1` means no cache. Please note that the maximum 
value is depended on browser, please refer to 
[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age#Directives)
 for details. |
 | allow_credential | boolean | optional| false   |   | Enable request 
include credential (such as Cookie etc.). According to CORS specification, if 
you set this option to `true`, you can not use '*' for other options. |
+| allow_origins_by_regex | array | optional| nil   |   | Use regex 
expressions to match which origins is allowed to enable CORS, for example, 
[".*\.test.com"] can use to match all subdomain of test.com  |

Review comment:
   ok




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

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




[GitHub] [apisix] batman-ezio commented on a change in pull request #3839: feat: add allow_origins_by_regex to cors plugin

2021-03-18 Thread GitBox


batman-ezio commented on a change in pull request #3839:
URL: https://github.com/apache/apisix/pull/3839#discussion_r597322902



##
File path: apisix/plugins/cors.lua
##
@@ -179,8 +196,56 @@ function _M.header_filter(conf, ctx)
 end
 end
 
-ctx.cors_allow_origins = allow_origins
-set_cors_headers(conf, ctx)
+return allow_origins
+end
+
+local function process_with_allow_origins_by_regex(conf, ctx)
+local allow_origins_by_regex = conf.allow_origins_by_regex or {}

Review comment:
   ok




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

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




[GitHub] [apisix] batman-ezio commented on a change in pull request #3839: feat: add allow_origins_by_regex to cors plugin

2021-03-18 Thread GitBox


batman-ezio commented on a change in pull request #3839:
URL: https://github.com/apache/apisix/pull/3839#discussion_r597322877



##
File path: apisix/plugins/cors.lua
##
@@ -179,8 +196,56 @@ function _M.header_filter(conf, ctx)
 end
 end
 
-ctx.cors_allow_origins = allow_origins
-set_cors_headers(conf, ctx)
+return allow_origins
+end
+
+local function process_with_allow_origins_by_regex(conf, ctx)
+local allow_origins_by_regex = conf.allow_origins_by_regex or {}
+if next(allow_origins_by_regex) == nil then

Review comment:
   ok. thanks. 




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

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




[GitHub] [apisix] batman-ezio commented on a change in pull request #3839: feat: add allow_origins_by_regex to cors plugin

2021-03-18 Thread GitBox


batman-ezio commented on a change in pull request #3839:
URL: https://github.com/apache/apisix/pull/3839#discussion_r597322804



##
File path: apisix/plugins/cors.lua
##
@@ -151,16 +176,8 @@ local function set_cors_headers(conf, ctx)
 end
 end
 
-
-function _M.rewrite(conf, ctx)
-if ctx.var.request_method == "OPTIONS" then
-return 200
-end
-end
-
-
-function _M.header_filter(conf, ctx)
-local allow_origins = conf.allow_origins
+local function process_with_allow_origins(conf, ctx)
+local allow_origins = conf.allow_origins or {}
 local req_origin = core.request.header(ctx, "Origin")

Review comment:
   sure




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

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




[GitHub] [apisix] batman-ezio commented on a change in pull request #3839: feat: add allow_origins_by_regex to cors plugin

2021-03-18 Thread GitBox


batman-ezio commented on a change in pull request #3839:
URL: https://github.com/apache/apisix/pull/3839#discussion_r597322755



##
File path: apisix/plugins/cors.lua
##
@@ -121,19 +137,28 @@ function _M.check_schema(conf)
 return false, "you can not set '*' for other option when 
'allow_credential' is true"
 end
 end
+if conf.allow_origins_by_regex then
+for i, re_rule in ipairs(conf.allow_origins_by_regex) do
+local ok, err = re_compile(re_rule, "j")
+if not ok then
+return false, err
+end
+end
+end
 
 return true
 end
 
 
 local function set_cors_headers(conf, ctx)
 local allow_methods = conf.allow_methods
+local allow_origins_by_regex = conf.allow_origins_by_regex or {}
 if allow_methods == "**" then
 allow_methods = "GET,POST,PUT,DELETE,PATCH,HEAD,OPTIONS,CONNECT,TRACE"
 end
 
 core.response.set_header("Access-Control-Allow-Origin", 
ctx.cors_allow_origins)
-if ctx.cors_allow_origins ~= "*" then
+if ctx.cors_allow_origins ~= "*" or next(allow_origins_by_regex) ~= nil 
then

Review comment:
   this function set_cors_headers can call not only matched by regex,. 
   if it matched by `allow_origins = '**'` then it will go here and needs to 
add `Vary` Origin header




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

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




[GitHub] [apisix-dashboard] codecov-io edited a comment on pull request #1598: feat: check if the service is used by route when deleting

2021-03-18 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1598?src=pr=h1) 
Report
   > Merging 
[#1598](https://codecov.io/gh/apache/apisix-dashboard/pull/1598?src=pr=desc) 
(182ce58) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/e6872470abc1eef27aa37d8d25a7daff4c57b24c?el=desc)
 (e687247) will **decrease** coverage by `13.11%`.
   > The diff coverage is `75.00%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/1598/graphs/tree.svg?width=650=150=pr=Q1HERXN96P)](https://codecov.io/gh/apache/apisix-dashboard/pull/1598?src=pr=tree)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#1598   +/-   ##
   ===
   - Coverage   71.68%   58.56%   -13.12% 
   ===
 Files 133  133   
 Lines5456 5471   +15 
 Branches  592  592   
   ===
   - Hits 3911 3204  -707 
   - Misses   1301 1984  +683 
   - Partials  244  283   +39 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `47.96% <75.00%> (+0.15%)` | :arrow_up: |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `72.58% <ø> (+0.08%)` | :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/1598?src=pr=tree) 
| Coverage Δ | |
   |---|---|---|
   | 
[api/internal/handler/service/service.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1598/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2VydmljZS9zZXJ2aWNlLmdv)
 | `62.60% <75.00%> (-29.40%)` | :arrow_down: |
   | 
[api/internal/handler/label/label.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1598/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbGFiZWwvbGFiZWwuZ28=)
 | `9.43% <0.00%> (-72.65%)` | :arrow_down: |
   | 
[api/internal/handler/data\_loader/route\_export.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1598/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfZXhwb3J0Lmdv)
 | `3.38% <0.00%> (-65.79%)` | :arrow_down: |
   | 
[api/internal/utils/runtime/runtime.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1598/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL3V0aWxzL3J1bnRpbWUvcnVudGltZS5nbw==)
 | `0.00% <0.00%> (-64.29%)` | :arrow_down: |
   | 
[api/internal/handler/global\_rule/global\_rule.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1598/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZ2xvYmFsX3J1bGUvZ2xvYmFsX3J1bGUuZ28=)
 | `27.41% <0.00%> (-56.46%)` | :arrow_down: |
   | 
[api/internal/core/store/validate\_mock.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1598/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGVfbW9jay5nbw==)
 | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
   | 
[api/internal/filter/authentication.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1598/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2ZpbHRlci9hdXRoZW50aWNhdGlvbi5nbw==)
 | `36.11% <0.00%> (-41.67%)` | :arrow_down: |
   | 
[api/internal/handler/data\_loader/route\_import.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1598/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvZGF0YV9sb2FkZXIvcm91dGVfaW1wb3J0Lmdv)
 | `27.41% <0.00%> (-37.50%)` | :arrow_down: |
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/1598/diff?src=pr=tree#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | `57.22% <0.00%> (-30.73%)` | :arrow_down: |
   | ... and [20 
more](https://codecov.io/gh/apache/apisix-dashboard/pull/1598/diff?src=pr=tree-more)
 | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/1598?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/1598?src=pr=footer).
 Last update 
[e687247...182ce58](https://codecov.io/gh/apache/apisix-dashboard/pull/1598?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   3   >