[GitHub] [apisix] mangoGoForward opened a new pull request #6316: test(core): fix test cases in `t/core/utils.t`

2022-02-13 Thread GitBox


mangoGoForward opened a new pull request #6316:
URL: https://github.com/apache/apisix/pull/6316


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


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander closed issue #6288: bug: traffic-split plugin do not match if the first matcher failed

2022-02-13 Thread GitBox


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


   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander merged pull request #6292: fix(traffic-split): failed to match rule when the first rule failed

2022-02-13 Thread GitBox


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


   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[apisix] branch master updated (3f965c4 -> 605141c)

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

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


from 3f965c4  build(install-deps): noops installed apisix-repo (#6308)
 add 605141c  fix(traffic-split): failed to match rule when the first rule 
failed (#6292)

No new revisions were added by this update.

Summary of changes:
 apisix/plugins/traffic-split.lua |   1 +
 t/plugin/traffic-split5.t| 106 +++
 2 files changed, 107 insertions(+)


[GitHub] [apisix-dashboard] oil-oil commented on pull request #2312: fix: add rejected_msg field to limit-req plugin form

2022-02-13 Thread GitBox


oil-oil commented on pull request #2312:
URL: 
https://github.com/apache/apisix-dashboard/pull/2312#issuecomment-1038755073


   I added a new field to the form.
   
   before:
   https://user-images.githubusercontent.com/57465570/153820523-d0a176b7-9e5f-4101-b0f2-6e3693c63e8e.png;>
   
   after:
   https://user-images.githubusercontent.com/57465570/153820603-44af96e1-9a27-41de-9cfc-45f8bc5fcaf9.png;>
   
   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] tzssangglass commented on a change in pull request #6136: ci: support for generating flame graph

2022-02-13 Thread GitBox


tzssangglass commented on a change in pull request #6136:
URL: https://github.com/apache/apisix/pull/6136#discussion_r805567341



##
File path: .github/workflows/performance.yml
##
@@ -0,0 +1,56 @@
+name: Performance Test
+
+on:
+  pull_request:
+branches: [master, 'release/**']
+paths-ignore:
+  - 'docs/**'
+  - '**/*.md'
+
+jobs:
+  performance:
+if: github.event_name == 'pull_request' || github.event.label.name == 
'performance'

Review comment:
   > We can apply a label if needed
   
   Now this PR is satisfied, add `performance` and it will run. To run it again 
you need to remove `performance` and add it again.
   
   > Note that people can run anything based on their PR.
   
   Yes, the idealization is so. But this requires continued enhancements to the 
performance testing framework.
   Maybe we can change it the next time we need to run performance tests for 
other PRs.




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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] codecov-commenter commented on pull request #2314: chore: update https://registry.npm.taobao.org to https://registry.npmmirror.com

2022-02-13 Thread GitBox


codecov-commenter commented on pull request #2314:
URL: 
https://github.com/apache/apisix-dashboard/pull/2314#issuecomment-1038743358


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2314?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2314](https://codecov.io/gh/apache/apisix-dashboard/pull/2314?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (02c675f) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/758c43262a3ae26d6f4a51e2f0a765842b66936d?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (758c432) will **decrease** coverage by `1.74%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2314/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2314?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#2314  +/-   ##
   ==
   - Coverage   69.91%   68.16%   -1.75% 
   ==
 Files 184  127  -57 
 Lines7280 3374-3906 
 Branches  830  830  
   ==
   - Hits 5090 2300-2790 
   + Misses   1896 1074 -822 
   + Partials  2940 -294 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `68.16% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2314?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[api/internal/handler/stream\_route/stream\_route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2314/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3RyZWFtX3JvdXRlL3N0cmVhbV9yb3V0ZS5nbw==)
 | | |
   | 
[api/internal/utils/json\_patch.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2314/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL2pzb25fcGF0Y2guZ28=)
 | | |
   | 
[api/internal/filter/ip\_filter.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2314/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9pcF9maWx0ZXIuZ28=)
 | | |
   | 
[api/internal/core/migrate/conflict.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2314/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9jb25mbGljdC5nbw==)
 | | |
   | 
[api/internal/utils/pid.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2314/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3BpZC5nbw==)
 | | |
   | 
[api/internal/handler/handler.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2314/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvaGFuZGxlci5nbw==)
 | | |
   | 
[api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2314/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=)
 | | |
   | 
[api/internal/handler/ssl/ssl.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2314/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc3NsL3NzbC5nbw==)
 | | |
   | 

[GitHub] [apisix] liangliang4ward removed a comment on pull request #6300: fix: when proxy-rewrite plugin's conf.headers are missing,conf.method can make effect

2022-02-13 Thread GitBox


liangliang4ward removed a comment on pull request #6300:
URL: https://github.com/apache/apisix/pull/6300#issuecomment-1038740595


   > > > The fix LGTM.
   > > > You can learn how to write tests via 
[https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md](https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md?rgh-link-date=2022-02-14T01%3A06%3A06Z)
 and the current test
   > > > 
https://github.com/apache/apisix/blob/ebe91aa64c4fd26a03ea1ebddc089c577f4e730b/t/plugin/proxy-rewrite3.t#L87-L129
   > > 
   > > 
   > > in proxy-rewrite3.t ,I thought the `TEST 2` case according to the 
original code, it should not succeed。
   > 
   > Let's add a test to prove your suspect. The test is passed in the CI.
   
   ok,`TEST 2` case 


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] liangliang4ward commented on pull request #6300: fix: when proxy-rewrite plugin's conf.headers are missing,conf.method can make effect

2022-02-13 Thread GitBox


liangliang4ward commented on pull request #6300:
URL: https://github.com/apache/apisix/pull/6300#issuecomment-1038740595


   > > > The fix LGTM.
   > > > You can learn how to write tests via 
[https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md](https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md?rgh-link-date=2022-02-14T01%3A06%3A06Z)
 and the current test
   > > > 
https://github.com/apache/apisix/blob/ebe91aa64c4fd26a03ea1ebddc089c577f4e730b/t/plugin/proxy-rewrite3.t#L87-L129
   > > 
   > > 
   > > in proxy-rewrite3.t ,I thought the `TEST 2` case according to the 
original code, it should not succeed。
   > 
   > Let's add a test to prove your suspect. The test is passed in the CI.
   
   ok,`TEST 2` case 


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] liangliang4ward closed pull request #6300: fix: when proxy-rewrite plugin's conf.headers are missing,conf.method can make effect

2022-02-13 Thread GitBox


liangliang4ward closed pull request #6300:
URL: https://github.com/apache/apisix/pull/6300


   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] kwanhur commented on a change in pull request #6306: build: rm luarocks tar file behind successful installation

2022-02-13 Thread GitBox


kwanhur commented on a change in pull request #6306:
URL: https://github.com/apache/apisix/pull/6306#discussion_r805558979



##
File path: utils/linux-install-luarocks.sh
##
@@ -42,7 +42,7 @@ fi
 make build > build.log 2>&1 || (cat build.log && exit 1)
 sudo make install > build.log 2>&1 || (cat build.log && exit 1)
 cd .. || exit
-rm -rf luarocks-"$LUAROCKS_VER"
+rm -rf luarocks-"$LUAROCKS_VER" luarocks-"$LUAROCKS_VER".tar.gz

Review comment:
   no, #6307 occurs at `configure` failure, so download twice.




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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] Drery commented on pull request #5940: feat: mocking plugin

2022-02-13 Thread GitBox


Drery commented on pull request #5940:
URL: https://github.com/apache/apisix/pull/5940#issuecomment-1038727785


   @spacewander @bisakhmondal All comment resolved, please take a look if 
that's right!


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] zhendongcmss commented on a change in pull request #6311: fix(http-logger): http-logger ssl verify

2022-02-13 Thread GitBox


zhendongcmss commented on a change in pull request #6311:
URL: https://github.com/apache/apisix/pull/6311#discussion_r805550649



##
File path: apisix/plugins/http-logger.lua
##
@@ -45,7 +45,8 @@ local schema = {
 }
 },
 concat_method = {type = "string", default = "json",
- enum = {"json", "new_line"}}
+ enum = {"json", "new_line"}},
+ssl_verify = {type = "boolean", default = true},

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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] HelloBug0 commented on issue #2848: request help: High cpu & network traffic triggered when batch processing router rules with large number of rules

2022-02-13 Thread GitBox


HelloBug0 commented on issue #2848:
URL: https://github.com/apache/apisix/issues/2848#issuecomment-1038720329


   Maybe it's also a good idea to support range request for GET too, like 
[kebernetes 
api](https://kubernetes.io/zh/docs/reference/using-api/api-concepts/#retrieving-large-results-sets-in-chunks)
   @tokers @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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[apisix] branch master updated (537a8da -> 3f965c4)

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

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


from 537a8da  docs: clearer description for Prometheus plugin (#6280)
 add 3f965c4  build(install-deps): noops installed apisix-repo (#6308)

No new revisions were added by this update.

Summary of changes:
 utils/install-dependencies.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


[GitHub] [apisix] HelloBug0 removed a comment on issue #2848: request help: High cpu & network traffic triggered when batch processing router rules with large number of rules

2022-02-13 Thread GitBox


HelloBug0 removed a comment on issue #2848:
URL: https://github.com/apache/apisix/issues/2848#issuecomment-1038718842


   Maybe it's also a good idea to support range request for GET too, like 
[kebernetes 
api](https://kubernetes.io/zh/docs/reference/using-api/api-concepts/#retrieving-large-results-sets-in-chunks)


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander merged pull request #6308: build(install-deps): noops installed apisix-repo

2022-02-13 Thread GitBox


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


   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander closed issue #4502: bug: No file openssl/ssl.h in /usr/local/openresty/openssl/include

2022-02-13 Thread GitBox


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


   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] HelloBug0 commented on issue #2848: request help: High cpu & network traffic triggered when batch processing router rules with large number of rules

2022-02-13 Thread GitBox


HelloBug0 commented on issue #2848:
URL: https://github.com/apache/apisix/issues/2848#issuecomment-1038718842


   Maybe it's also a good idea to support range request for GET too, like 
[kebernetes 
api](https://kubernetes.io/zh/docs/reference/using-api/api-concepts/#retrieving-large-results-sets-in-chunks)


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] tzssangglass opened a new pull request #6315: chore: update ngxin-lua-prometheus verison

2022-02-13 Thread GitBox


tzssangglass opened a new pull request #6315:
URL: https://github.com/apache/apisix/pull/6315


   Closes #5755
   
   ### 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?
   * [x] Is this PR backward compatible? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix/tree/master#community) first**
   
   
   The following is a simple test
   
   prepare
   
   1. add prometheus plugin
   
   ```shell
   curl -i http://127.0.0.1:9080/apisix/adminglobal_rules/1  -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
   "plugins": {
   "prometheus": {}
   }
   }'
   ```
   
   2. add rouet
   
   ```shell
   curl -i http://127.0.0.1:9080/apisix/adminroutes/1  -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
   "upstream": {
   "nodes": {
   "127.0.0.1:1980": 1
   },
   "type": "roundrobin"
   },
   "uri": "/hello"
   }'
   ```
   
   3. wrk2
   
   ```shell
   # mock client request
   wrk -t4 -c100 -d90s -R5000 --u_latency http://127.0.0.1:9080/hello
   
   # mock prometheus  collection
   wrk -t4 -c100 -d100s -R10 --u_latency 
http://127.0.0.1:9091/apisix/prometheus/metrics
   ```
   
   
    before update prometheus version:
   
   *request latency*
   
   ```
 Latency Distribution (HdrHistogram - Uncorrected Latency (measured without 
taking delayed starts into account))
50.000%  415.00us
75.000%  594.00us
90.000%0.87ms
99.000%4.95ms
99.900%   17.26ms
99.990%   33.53ms
99.999%   40.96ms
   100.000%   46.69ms
   ```
   
   
   *prometheus latency*
   
   ```
 Latency Distribution (HdrHistogram - Uncorrected Latency (measured without 
taking delayed starts into account))
50.000%9.73ms
75.000%   17.36ms
90.000%   27.34ms
99.000%   38.85ms
99.900%   41.50ms
99.990%   43.49ms
99.999%   43.49ms
   100.000%   43.49ms
   ```
   
   flamegraph 
   
![origin_flame](https://user-images.githubusercontent.com/30819887/153814102-fdee5494-f355-4cd3-8e57-d4dd683ce0d7.png)
   
    after update prometheus version:
   
   *request latency*
   
   ```
 Latency Distribution (HdrHistogram - Uncorrected Latency (measured without 
taking delayed starts into account))
50.000%  605.00us
75.000%0.89ms
90.000%1.26ms
99.000%2.58ms
99.900%9.80ms
99.990%   14.20ms
99.999%   18.74ms
   100.000%   19.65ms
   ```
   
   
   *prometheus latency*
   
   ```
 Latency Distribution (HdrHistogram - Uncorrected Latency (measured without 
taking delayed starts into account))
50.000%1.67ms
75.000%2.10ms
90.000%2.86ms
99.000%6.89ms
99.900%   10.61ms
99.990%   10.67ms
99.999%   10.67ms
   100.000%   10.67ms
   ```
   
   flamegraph 
   
![update_flame](https://user-images.githubusercontent.com/30819887/153814246-11743666-f791-44d6-9a86-75e645e415c3.png)
   
   
   We can assume that the impact on request latency when prometheus collects 
information is significantly reduced after the update.
   
    why not use `ngx.timer(0)`
   
   From the flamegraph, the code in the prometheus plugin does not 
significantly increase latency, which is most noticeable in the 
`fix_histogram_bucket_labels` function of nginx-lua-prometheus, even if this 
function is optimized.
   
   The main delay is due to the regular matching in this function.
   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on pull request #6300: fix: when proxy-rewrite plugin's conf.headers are missing,conf.method can make effect

2022-02-13 Thread GitBox


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


   > > The fix LGTM.
   > > You can learn how to write tests via 
[https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md](https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md?rgh-link-date=2022-02-14T01%3A06%3A06Z)
 and the current test
   > > 
https://github.com/apache/apisix/blob/ebe91aa64c4fd26a03ea1ebddc089c577f4e730b/t/plugin/proxy-rewrite3.t#L87-L129
   > 
   > in proxy-rewrite3.t ,I thought the `TEST 2` case according to the original 
code, it should not succeed。
   
   Let's add a test to prove your suspect. The test is passed in the CI.


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] crazyMonkey1995 commented on a change in pull request #4880: feat: add kubernetes discovery module

2022-02-13 Thread GitBox


crazyMonkey1995 commented on a change in pull request #4880:
URL: https://github.com/apache/apisix/pull/4880#discussion_r805547085



##
File path: apisix/discovery/kubernetes/informer_factory.lua
##
@@ -0,0 +1,376 @@
+--
+-- 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 ngx = ngx
+local ipairs = ipairs
+local string = string
+local math = math
+local type = type
+local core = require("apisix.core")
+local http = require("resty.http")
+
+local empty_table = {}
+
+local function list_query(informer)
+local arguments = {
+limit = informer.limit,
+}
+
+if informer.continue and informer.continue ~= "" then
+arguments.continue = informer.continue
+end
+
+if informer.label_selector and informer.label_selector ~= "" then
+arguments.labelSelector = informer.label_selector
+end
+
+if informer.field_selector and informer.field_selector ~= "" then
+arguments.fieldSelector = informer.field_selector
+end
+
+return ngx.encode_args(arguments)
+end
+
+
+local function list(httpc, apiserver, informer)
+local response, err = httpc:request({
+path = informer.path,
+query = list_query(informer),
+headers = {
+["Host"] = apiserver.host .. ":" .. apiserver.port,
+["Authorization"] = "Bearer " .. apiserver.token,
+["Accept"] = "application/json",
+["Connection"] = "keep-alive"
+}
+})
+
+core.log.info("--raw=", informer.path, "?", list_query(informer))
+
+if not response then
+return false, "RequestError", err or ""
+end
+
+if response.status ~= 200 then
+return false, response.reason, response:read_body() or ""
+end
+
+local body, err = response:read_body()
+if err then
+return false, "ReadBodyError", err
+end
+
+local data = core.json.decode(body)
+if not data or data.kind ~= informer.list_kind then
+return false, "UnexpectedBody", body
+end
+
+informer.version = data.metadata.resourceVersion
+
+if informer.on_added then
+for _, item in ipairs(data.items or empty_table) do
+informer:on_added(item, "list")
+end
+end
+
+informer.continue = data.metadata.continue
+if informer.continue and informer.continue ~= "" then
+list(httpc, informer)

Review comment:
   Seems like the apiserver(the second parameter of the function) is 
missing here?




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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] zaunist commented on pull request #2312: fix: add rejected_msg field to limit-req plugin form

2022-02-13 Thread GitBox


zaunist commented on pull request #2312:
URL: 
https://github.com/apache/apisix-dashboard/pull/2312#issuecomment-1038714854


   Could you provide some screenshoot about your change?


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] HelloBug0 commented on issue #5246: bug: http request to upstream, roundrobin is imbalance when multi nginx worker process

2022-02-13 Thread GitBox


HelloBug0 commented on issue #5246:
URL: https://github.com/apache/apisix/issues/5246#issuecomment-1038714311


   If you want roundrobin works in all workers, may be you can try 
[this](http://nginx.org/en/docs/http/ngx_http_upstream_module.html#zone) 
@wbaweto 


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on a change in pull request #6136: ci: support for generating flame graph

2022-02-13 Thread GitBox


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



##
File path: .github/workflows/performance.yml
##
@@ -0,0 +1,56 @@
+name: Performance Test
+
+on:
+  pull_request:
+branches: [master, 'release/**']
+paths-ignore:
+  - 'docs/**'
+  - '**/*.md'
+
+jobs:
+  performance:
+if: github.event_name == 'pull_request' || github.event.label.name == 
'performance'

Review comment:
   We can apply a label if needed. Note that people can run anything based 
on their PR.




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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on issue #6296: request help: apisix enforces the translation of routed domain names to IP addresses

2022-02-13 Thread GitBox


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


   > > OK, but if there are multiple backend services in my upstream, how 
should my host be written?
   > 
   > You have to use the same domain name for all these upstream nodes.
   
   No. We can use different hosts for different nodes with the `pass_host = 
node`.
   See https://apisix.apache.org/docs/apisix/admin-api#request-body-parameters-3


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on a change in pull request #6215: feat: clickhouse logger

2022-02-13 Thread GitBox


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



##
File path: t/plugin/clickhouse-logger.t
##
@@ -0,0 +1,222 @@
+#
+# 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.
+#
+
+use t::APISIX 'no_plan';
+
+log_level("info");
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+
+my $http_config = $block->http_config // <<_EOC_;
+server {
+listen 10420;
+location /clickhouse-logger/test {
+content_by_lua_block {
+ngx.req.read_body()
+local data = ngx.req.get_body_data()
+local headers = ngx.req.get_headers()
+ngx.log(ngx.WARN, "clickhouse body: ", data)
+for k, v in pairs(headers) do
+ngx.log(ngx.WARN, "clickhouse headers: " .. k .. ":" .. v)
+end
+ngx.say("ok")
+}
+}
+}
+_EOC_
+
+$block->set_value("http_config", $http_config);
+});
+
+run_tests();
+
+__DATA__
+
+=== TEST 1: Full configuration verification
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.clickhouse-logger")
+local ok, err = plugin.check_schema({timeout = 3,
+ retry_delay = 1,
+ batch_max_size = 500,
+ user = "default",
+ password = "a",
+ database = "default",
+ logtable = "t",
+ endpoint_addr = 
"http://127.0.0.1:10420/clickhouse-logger/test;,
+ max_retry_count = 1,
+ name = "clickhouse logger",
+ ssl_verify = false
+ })
+
+if not ok then
+ngx.say(err)
+else
+ngx.say("passed")
+end
+}
+}
+--- response_body
+passed
+
+
+
+=== TEST 2: Basic configuration verification
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.clickhouse-logger")
+local ok, err = plugin.check_schema({user = "default",
+ password = "a",
+ database = "default",
+ logtable = "t",
+ endpoint_addr = 
"http://127.0.0.1:10420/clickhouse-logger/test;
+ })
+
+if not ok then
+ngx.say(err)
+else
+ngx.say("passed")
+end
+}
+}
+--- response_body
+passed
+
+
+
+=== TEST 3: auth configure undefined
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.clickhouse-logger")
+local ok, err = plugin.check_schema({user = "default",
+ password = "a",
+ database = "default",
+ logtable = "t"
+ })
+
+if not ok then
+ngx.say(err)
+else
+ngx.say("passed")
+end
+}
+}
+--- response_body
+property "endpoint_addr" is required
+
+
+
+=== TEST 4: add plugin on routes
+apisix:
+node_listen: 1984
+admin_key: null
+--- config
+location /t {
+content_by_lua_block {
+

[GitHub] [apisix] spacewander commented on a change in pull request #6215: feat: clickhouse logger

2022-02-13 Thread GitBox


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



##
File path: t/plugin/clickhouse-logger.t
##
@@ -0,0 +1,222 @@
+#
+# 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.
+#
+
+use t::APISIX 'no_plan';
+
+log_level("info");
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+
+my $http_config = $block->http_config // <<_EOC_;
+server {
+listen 10420;
+location /clickhouse-logger/test {
+content_by_lua_block {
+ngx.req.read_body()
+local data = ngx.req.get_body_data()
+local headers = ngx.req.get_headers()
+ngx.log(ngx.WARN, "clickhouse body: ", data)
+for k, v in pairs(headers) do
+ngx.log(ngx.WARN, "clickhouse headers: " .. k .. ":" .. v)
+end
+ngx.say("ok")
+}
+}
+}
+_EOC_
+
+$block->set_value("http_config", $http_config);
+});
+
+run_tests();
+
+__DATA__
+
+=== TEST 1: Full configuration verification
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.clickhouse-logger")
+local ok, err = plugin.check_schema({timeout = 3,
+ retry_delay = 1,
+ batch_max_size = 500,
+ user = "default",
+ password = "a",
+ database = "default",
+ logtable = "t",
+ endpoint_addr = 
"http://127.0.0.1:10420/clickhouse-logger/test;,
+ max_retry_count = 1,
+ name = "clickhouse logger",
+ ssl_verify = false
+ })
+
+if not ok then
+ngx.say(err)
+else
+ngx.say("passed")
+end
+}
+}
+--- response_body
+passed
+
+
+
+=== TEST 2: Basic configuration verification
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.clickhouse-logger")
+local ok, err = plugin.check_schema({user = "default",
+ password = "a",
+ database = "default",
+ logtable = "t",
+ endpoint_addr = 
"http://127.0.0.1:10420/clickhouse-logger/test;
+ })
+
+if not ok then
+ngx.say(err)
+else
+ngx.say("passed")
+end
+}
+}
+--- response_body
+passed
+
+
+
+=== TEST 3: auth configure undefined
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.clickhouse-logger")
+local ok, err = plugin.check_schema({user = "default",
+ password = "a",
+ database = "default",
+ logtable = "t"
+ })
+
+if not ok then
+ngx.say(err)
+else
+ngx.say("passed")
+end
+}
+}
+--- response_body
+property "endpoint_addr" is required
+
+
+
+=== TEST 4: add plugin on routes
+apisix:
+node_listen: 1984
+admin_key: null
+--- config
+location /t {
+content_by_lua_block {
+

[GitHub] [apisix] spacewander commented on a change in pull request #6215: feat: clickhouse logger

2022-02-13 Thread GitBox


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



##
File path: t/plugin/clickhouse-logger.t
##
@@ -0,0 +1,222 @@
+#
+# 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.
+#
+
+use t::APISIX 'no_plan';
+
+log_level("info");
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+
+my $http_config = $block->http_config // <<_EOC_;
+server {
+listen 10420;
+location /clickhouse-logger/test {
+content_by_lua_block {
+ngx.req.read_body()
+local data = ngx.req.get_body_data()
+local headers = ngx.req.get_headers()
+ngx.log(ngx.WARN, "clickhouse body: ", data)
+for k, v in pairs(headers) do
+ngx.log(ngx.WARN, "clickhouse headers: " .. k .. ":" .. v)
+end
+ngx.say("ok")
+}
+}
+}
+_EOC_
+
+$block->set_value("http_config", $http_config);
+});
+
+run_tests();
+
+__DATA__
+
+=== TEST 1: Full configuration verification
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.clickhouse-logger")
+local ok, err = plugin.check_schema({timeout = 3,
+ retry_delay = 1,
+ batch_max_size = 500,
+ user = "default",
+ password = "a",
+ database = "default",
+ logtable = "t",
+ endpoint_addr = 
"http://127.0.0.1:10420/clickhouse-logger/test;,
+ max_retry_count = 1,
+ name = "clickhouse logger",
+ ssl_verify = false
+ })
+
+if not ok then
+ngx.say(err)
+else
+ngx.say("passed")
+end
+}
+}
+--- response_body
+passed
+
+
+
+=== TEST 2: Basic configuration verification
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.clickhouse-logger")
+local ok, err = plugin.check_schema({user = "default",
+ password = "a",
+ database = "default",
+ logtable = "t",
+ endpoint_addr = 
"http://127.0.0.1:10420/clickhouse-logger/test;
+ })
+
+if not ok then
+ngx.say(err)
+else
+ngx.say("passed")
+end
+}
+}
+--- response_body
+passed
+
+
+
+=== TEST 3: auth configure undefined
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.clickhouse-logger")
+local ok, err = plugin.check_schema({user = "default",
+ password = "a",
+ database = "default",
+ logtable = "t"
+ })
+
+if not ok then
+ngx.say(err)
+else
+ngx.say("passed")
+end
+}
+}
+--- response_body
+property "endpoint_addr" is required
+
+
+
+=== TEST 4: add plugin on routes
+apisix:
+node_listen: 1984
+admin_key: null
+--- config
+location /t {
+content_by_lua_block {
+

[GitHub] [apisix] spacewander commented on a change in pull request #6215: feat: clickhouse logger

2022-02-13 Thread GitBox


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



##
File path: t/plugin/clickhouse-logger.t
##
@@ -0,0 +1,222 @@
+#
+# 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.
+#
+
+use t::APISIX 'no_plan';
+
+log_level("info");
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+
+my $http_config = $block->http_config // <<_EOC_;
+server {
+listen 10420;
+location /clickhouse-logger/test {
+content_by_lua_block {
+ngx.req.read_body()
+local data = ngx.req.get_body_data()
+local headers = ngx.req.get_headers()
+ngx.log(ngx.WARN, "clickhouse body: ", data)
+for k, v in pairs(headers) do
+ngx.log(ngx.WARN, "clickhouse headers: " .. k .. ":" .. v)
+end
+ngx.say("ok")
+}
+}
+}
+_EOC_
+
+$block->set_value("http_config", $http_config);
+});
+
+run_tests();
+
+__DATA__
+
+=== TEST 1: Full configuration verification
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.clickhouse-logger")
+local ok, err = plugin.check_schema({timeout = 3,
+ retry_delay = 1,
+ batch_max_size = 500,
+ user = "default",
+ password = "a",
+ database = "default",
+ logtable = "t",
+ endpoint_addr = 
"http://127.0.0.1:10420/clickhouse-logger/test;,
+ max_retry_count = 1,
+ name = "clickhouse logger",
+ ssl_verify = false
+ })
+
+if not ok then
+ngx.say(err)
+else
+ngx.say("passed")
+end
+}
+}
+--- response_body
+passed
+
+
+
+=== TEST 2: Basic configuration verification
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.clickhouse-logger")
+local ok, err = plugin.check_schema({user = "default",
+ password = "a",
+ database = "default",
+ logtable = "t",
+ endpoint_addr = 
"http://127.0.0.1:10420/clickhouse-logger/test;
+ })
+
+if not ok then
+ngx.say(err)
+else
+ngx.say("passed")
+end
+}
+}
+--- response_body
+passed
+
+
+
+=== TEST 3: auth configure undefined
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.clickhouse-logger")
+local ok, err = plugin.check_schema({user = "default",
+ password = "a",
+ database = "default",
+ logtable = "t"
+ })
+
+if not ok then
+ngx.say(err)
+else
+ngx.say("passed")
+end
+}
+}
+--- response_body
+property "endpoint_addr" is required
+
+
+
+=== TEST 4: add plugin on routes
+apisix:
+node_listen: 1984
+admin_key: null
+--- config
+location /t {
+content_by_lua_block {
+

[GitHub] [apisix-go-plugin-runner] Belyenochi commented on pull request #63: feature: try to introduce context to plugin runner

2022-02-13 Thread GitBox


Belyenochi commented on pull request #63:
URL: 
https://github.com/apache/apisix-go-plugin-runner/pull/63#issuecomment-1038708045


   > Need to set the `ctx` to nil in
   > 
   > 
https://github.com/apache/apisix-go-plugin-runner/blob/1a00a4b14f930c4588ede207c18c341336a760fd/internal/http/request.go#L160
   
   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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on pull request #6308: build(install-deps): noops installed apisix-repo

2022-02-13 Thread GitBox


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


   CC @leslie-tsang 
   Please take a review when you have 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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] kevinw66 opened a new pull request #6314: fix(hmac-auth): hmac-auth plugin sort array param

2022-02-13 Thread GitBox


kevinw66 opened a new pull request #6314:
URL: https://github.com/apache/apisix/pull/6314


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


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] oil-oil opened a new pull request #2317: style: add ellipsis for route table

2022-02-13 Thread GitBox


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


   Please answer these questions before submitting a pull request, **or your PR 
will get closed**.
   
   **Why submit this pull request?**
   
   - [x] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   **What changes will this PR take into?**
   Set width for table column and add ellipsis for route table content,If the 
table content is too long, it will be omitted and displayed in the form of a 
tooltip.
   
   https://user-images.githubusercontent.com/57465570/153812447-2f73ea46-8153-4658-9663-1f61f385f3da.png;>
   
   **Related issues**
   https://github.com/apache/apisix-dashboard/issues/1992
   
   **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 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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on a change in pull request #6311: fix(http-logger): http-logger ssl verify

2022-02-13 Thread GitBox


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



##
File path: apisix/plugins/http-logger.lua
##
@@ -45,7 +45,8 @@ local schema = {
 }
 },
 concat_method = {type = "string", default = "json",
- enum = {"json", "new_line"}}
+ enum = {"json", "new_line"}},
+ssl_verify = {type = "boolean", default = true},

Review comment:
   For compatibility, we have to use false by default.




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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] kevinw66 opened a new issue #6313: bug: hmac-auth plugin will not sort array value in param

2022-02-13 Thread GitBox


kevinw66 opened a new issue #6313:
URL: https://github.com/apache/apisix/issues/6313


   ### Issue description
   
   When I passing url like /api/xxx?age=123=123=2=1
   this should be sorted as a=1=2=123=123
   but I got a=2=1=2=1
   
   ### 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:
   - the plugin runner version, if the issue is about a plugin runner (cmd: 
depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks 
--version`):
   
   
   ### Steps to reproduce
   
   same as description
   
   ### Actual result
   
   same as description
   
   ### Error log
   
   same as description
   
   ### Expected result
   
   _No response_


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-website] netlify[bot] edited a comment on pull request #870: chore: add the LTS download button of 'apisix'

2022-02-13 Thread GitBox


netlify[bot] edited a comment on pull request #870:
URL: https://github.com/apache/apisix-website/pull/870#issuecomment-1032163360


   ✔️ Deploy Preview for *apache-apisix* ready!
   
   
    Explore the source changes: 0416814fa22cf554afd03c2ae2c5c660366e09c1
   
    Inspect the deploy log: 
[https://app.netlify.com/sites/apache-apisix/deploys/6209f62c71a4ed0007baef5a](https://app.netlify.com/sites/apache-apisix/deploys/6209f62c71a4ed0007baef5a)
   
    Browse the preview: 
[https://deploy-preview-870--apache-apisix.netlify.app](https://deploy-preview-870--apache-apisix.netlify.app)
   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-docker] spacewander merged pull request #284: feat: update apisix image version in `docker-compose-arm64.yml`

2022-02-13 Thread GitBox


spacewander merged pull request #284:
URL: https://github.com/apache/apisix-docker/pull/284


   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[apisix-docker] branch master updated: feat: update apisix image version in `docker-compose-arm64.yml` (#284)

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

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


The following commit(s) were added to refs/heads/master by this push:
 new a82d73e  feat: update apisix image version in 
`docker-compose-arm64.yml` (#284)
a82d73e is described below

commit a82d73e61af6ea03632620df33c8ac7155a524e0
Author: leslie <59061168+leslie-ts...@users.noreply.github.com>
AuthorDate: Mon Feb 14 14:33:09 2022 +0800

feat: update apisix image version in `docker-compose-arm64.yml` (#284)
---
 example/docker-compose-arm64.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/example/docker-compose-arm64.yml b/example/docker-compose-arm64.yml
index cb6f263..dff001b 100644
--- a/example/docker-compose-arm64.yml
+++ b/example/docker-compose-arm64.yml
@@ -29,7 +29,7 @@ services:
   apisix:
 
   apisix:
-image: apache/apisix:2.11.0-alpine
+image: apache/apisix:2.12.1-alpine
 restart: always
 volumes:
   - ./apisix_log:/usr/local/apisix/logs


[GitHub] [apisix] purekeeper commented on issue #6303: MTLS error

2022-02-13 Thread GitBox


purekeeper commented on issue #6303:
URL: https://github.com/apache/apisix/issues/6303#issuecomment-1038701411


   Thanks everyone, resolved by  increase the max length limit in the schema .


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] purekeeper closed issue #6303: MTLS error

2022-02-13 Thread GitBox


purekeeper closed issue #6303:
URL: https://github.com/apache/apisix/issues/6303


   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] purekeeper opened a new issue #6312: request help: Does Api6 support nginx's slow start directive ?

2022-02-13 Thread GitBox


purekeeper opened a new issue #6312:
URL: https://github.com/apache/apisix/issues/6312


   ### Issue description
   
   nginx's upstream support slow start directive ,like :
   
   server 172.41.66.25:321 slow_start=10s;
   server 172.41.66.26:321 slow_start=5s;
   
   
   So what about api6 ?  
   
   ### 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:
   - the plugin runner version, if the issue is about a plugin runner (cmd: 
depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks 
--version`):
   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-go-plugin-runner] spacewander commented on a change in pull request #63: feature: try to introduce context to plugin runner

2022-02-13 Thread GitBox


spacewander commented on a change in pull request #63:
URL: 
https://github.com/apache/apisix-go-plugin-runner/pull/63#discussion_r805534037



##
File path: internal/plugin/plugin.go
##
@@ -20,13 +20,12 @@ package plugin
 import (
"errors"
"fmt"
+   hrc "github.com/api7/ext-plugin-proto/go/A6/HTTPReqCall"

Review comment:
   Need a configuration to separate the imports




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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] liangliang4ward edited a comment on pull request #6300: fix: when proxy-rewrite plugin's conf.headers are missing,conf.method can make effect

2022-02-13 Thread GitBox


liangliang4ward edited a comment on pull request #6300:
URL: https://github.com/apache/apisix/pull/6300#issuecomment-1038515471


   > The fix LGTM.
   > 
   > You can learn how to write tests via 
https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md
 and the current test
   > 
   > 
https://github.com/apache/apisix/blob/ebe91aa64c4fd26a03ea1ebddc089c577f4e730b/t/plugin/proxy-rewrite3.t#L87-L129
   
   in proxy-rewrite3.t ,I thought the `TEST 2` case according to the original 
code, it should not succeed。
   
   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-website] netlify[bot] edited a comment on pull request #870: chore: add the LTS download button of 'apisix'

2022-02-13 Thread GitBox


netlify[bot] edited a comment on pull request #870:
URL: https://github.com/apache/apisix-website/pull/870#issuecomment-1032163360


    Deploy Preview for *apache-apisix* processing.
   
   
    Explore the source changes: 0416814fa22cf554afd03c2ae2c5c660366e09c1
   
    Inspect the deploy log: 
[https://app.netlify.com/sites/apache-apisix/deploys/6209f62c71a4ed0007baef5a](https://app.netlify.com/sites/apache-apisix/deploys/6209f62c71a4ed0007baef5a)
   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] codecov-commenter edited a comment on pull request #2312: fix: add rejected_msg field to limit-req plugin form

2022-02-13 Thread GitBox


codecov-commenter edited a comment on pull request #2312:
URL: 
https://github.com/apache/apisix-dashboard/pull/2312#issuecomment-1038036134


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2312?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2312](https://codecov.io/gh/apache/apisix-dashboard/pull/2312?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6a57c4c) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/758c43262a3ae26d6f4a51e2f0a765842b66936d?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (758c432) will **decrease** coverage by `1.74%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-dashboard/pull/2312/graphs/tree.svg?width=650=150=pr=Q1HERXN96P_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-dashboard/pull/2312?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#2312  +/-   ##
   ==
   - Coverage   69.91%   68.16%   -1.75% 
   ==
 Files 184  127  -57 
 Lines7280 3374-3906 
 Branches  830  830  
   ==
   - Hits 5090 2300-2790 
   + Misses   1896 1074 -822 
   + Partials  2940 -294 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `68.16% <ø> (ø)` | |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-dashboard/pull/2312?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[web/src/components/Plugin/UI/limit-req.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2312/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9saW1pdC1yZXEudHN4)
 | `100.00% <ø> (ø)` | |
   | 
[api/internal/core/migrate/conflict.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2312/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvbWlncmF0ZS9jb25mbGljdC5nbw==)
 | | |
   | 
[api/internal/utils/runtime/runtime.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2312/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3V0aWxzL3J1bnRpbWUvcnVudGltZS5nbw==)
 | | |
   | 
[api/internal/filter/recover.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2312/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9yZWNvdmVyLmdv)
 | | |
   | 
[api/internal/handler/upstream/upstream.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2312/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvdXBzdHJlYW0vdXBzdHJlYW0uZ28=)
 | | |
   | 
[api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2312/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL21haW4uZ28=)
 | | |
   | 
[api/internal/handler/migrate/migrate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2312/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvbWlncmF0ZS9taWdyYXRlLmdv)
 | | |
   | 
[api/internal/core/store/validate.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2312/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvdmFsaWRhdGUuZ28=)
 | | |
   | 

[GitHub] [apisix] nic-6443 commented on issue #6301: bug: some mistakes in prometheus plugin

2022-02-13 Thread GitBox


nic-6443 commented on issue #6301:
URL: https://github.com/apache/apisix/issues/6301#issuecomment-1038693977


   > I will vote for `http_requests_total`.
   
   Got it. As discussed above, I will be introducing two new metrics:
   1. `http_requests_total`(counter type)
   2. `nginx_http_connections_total`(counter type) with a `type` label, which 
has two values: `accepts`, `handled`
   
   Also, the `state` label in the old `nginx_http_current_connections` metric 
will only have four values: `active`/ `reading`/ `writing`/ `waiting` and the 
`accepted`/ `handled`/ `total` will be removed. 
 
   I will submit this PR as soon as 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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on a change in pull request #6302: docs: polishing zipkin and opentelemetery plugin's docs

2022-02-13 Thread GitBox


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



##
File path: docs/zh/latest/plugins/zipkin.md
##
@@ -125,6 +125,61 @@ http://127.0.0.1:9411/zipkin
 
 ![zipkin web-ui list view](../../../assets/images/plugin/zipkin-2.jpg)
 
+### Run the Jaeger instance
+
+除了对接 Zipkin,该插件也支持将 traces 上报到 Jaeger。下面运行在`docker`环境上的示例:

Review comment:
   ```suggestion
   除了对接 Zipkin,该插件也支持将 traces 上报到 Jaeger。下面运行在 docker 环境上的示例:
   ```

##
File path: docs/en/latest/plugins/zipkin.md
##
@@ -126,6 +127,61 @@ http://127.0.0.1:9411/zipkin
 
 ![zipkin web-ui list view](../../../assets/images/plugin/zipkin-2.jpg)
 
+### Run the Jaeger instance
+
+Besides Zipkin, this plugin supports reporting the traces to Jaeger as well. 
Here is a sample run on docker.
+Run Jaeger backend on docker first:
+
+```
+docker run -d --name jaeger \
+  -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
+  -p 16686:16686 \
+  -p 9411:9411 \
+  jaegertracing/all-in-one:1.31
+```
+
+Create a route with Zipkin plugin like Ziplin's example:

Review comment:
   ```suggestion
   Create a route with Zipkin plugin like Zipkin's example:
   ```




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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on a change in pull request #6306: build: rm luarocks tar file behind successful installation

2022-02-13 Thread GitBox


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



##
File path: utils/linux-install-luarocks.sh
##
@@ -42,7 +42,7 @@ fi
 make build > build.log 2>&1 || (cat build.log && exit 1)
 sudo make install > build.log 2>&1 || (cat build.log && exit 1)
 cd .. || exit
-rm -rf luarocks-"$LUAROCKS_VER"
+rm -rf luarocks-"$LUAROCKS_VER" luarocks-"$LUAROCKS_VER".tar.gz

Review comment:
   OK. So that we can also handle 
https://github.com/apache/apisix/issues/6307 in this PR.




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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] zhendongcmss opened a new pull request #6311: fix: http-logger ssl verify

2022-02-13 Thread GitBox


zhendongcmss opened a new pull request #6311:
URL: https://github.com/apache/apisix/pull/6311


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


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on pull request #5940: feat: mocking plugin

2022-02-13 Thread GitBox


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


   Err...
   It is already done 5 days ago. Please see  
https://github.com/apache/apisix/pull/5940#discussion_r802626941


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on issue #6301: bug: some mistakes in prometheus plugin

2022-02-13 Thread GitBox


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


   I will vote for `http_requests_total`.


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-docker] biubiue opened a new pull request #285: chore: update apisix image version in docker-compose.yml

2022-02-13 Thread GitBox


biubiue opened a new pull request #285:
URL: https://github.com/apache/apisix-docker/pull/285


   from 2.12.0-alpine to 2.12.1-alpine


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] biubiue edited a comment on issue #6283: bug: plugin kafka-logger configuration error

2022-02-13 Thread GitBox


biubiue edited a comment on issue #6283:
URL: https://github.com/apache/apisix/issues/6283#issuecomment-1035750711


   Not apisix-ingress-contoller,  I use by `"ip": port` ,it's ok. You can try 
like this.
   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] leslie-tsang commented on issue #6283: bug: plugin kafka-logger configuration error

2022-02-13 Thread GitBox


leslie-tsang commented on issue #6283:
URL: https://github.com/apache/apisix/issues/6283#issuecomment-1038652812


   > Not apisix-ingress-contoller, I user by `"ip": port` ,it's ok. You can try 
like this.
   
   @devops-utils-tools Can you try it ?


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] soham4abc commented on a change in pull request #6242: fix(redirect-plugin): redirection loop behind a proxy or lb

2022-02-13 Thread GitBox


soham4abc commented on a change in pull request #6242:
URL: https://github.com/apache/apisix/pull/6242#discussion_r805494162



##
File path: t/plugin/redirect.t
##
@@ -1000,3 +1000,58 @@ Location: /hello?type=string=json
 --- error_code: 302
 --- no_error_log
 [error]
+
+
+
+=== TEST 41: enable http_to_https (pass X-Forwarded-Proto)
+--- 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,
+[[{
+"uri": "/hello",
+"host": "foo.com",
+"vars": [
+[
+"scheme",
+"==",
+"http"
+]
+],
+"plugins": {
+"redirect": {
+"http_to_https": true
+}
+}
+}]]
+)
+
+if code >= 300 then
+ngx.status = code
+end
+ngx.say(body)
+}
+}
+

Review comment:
   Done as per request




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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] zaunist commented on pull request #6202: feat: use keepalive in server-info plugin

2022-02-13 Thread GitBox


zaunist commented on pull request #6202:
URL: https://github.com/apache/apisix/pull/6202#issuecomment-1038607352


   > > How do I change the hostname in the .t test file? I'm not quite sure how 
to do it.
   > 
   > It doesn't have to be hostname, it can be any other action that can be 
used to punish service info refresh.
   
   Only a change in `hostname`、`etcd_version`、`apisix_version`、`boot_time` will 
result in a put operation, and in the current case there doesn't seem to be a 
way to make any of them change.


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] zaunist removed a comment on pull request #6202: feat: use keepalive in server-info plugin

2022-02-13 Thread GitBox


zaunist removed a comment on pull request #6202:
URL: https://github.com/apache/apisix/pull/6202#issuecomment-1038607209


   > 
   
   Only a change in `hostname`、`etcd_version`、`apisix_version`、`boot_time` will 
result in a put operation, and in the current case there doesn't seem to be a 
way to make any of them change.


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] zaunist edited a comment on pull request #6202: feat: use keepalive in server-info plugin

2022-02-13 Thread GitBox


zaunist edited a comment on pull request #6202:
URL: https://github.com/apache/apisix/pull/6202#issuecomment-1038607352


   > > How do I change the hostname in the .t test file? I'm not quite sure how 
to do it.
   > 
   > It doesn't have to be hostname, it can be any other action that can be 
used to punish service info refresh.
   
   Only a change in `hostname`、`etcd_version`、`apisix_version`、`boot_time`、`id` 
will result in a put operation, and in the current case there doesn't seem to 
be a way to make any of them change.


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] zaunist commented on pull request #6202: feat: use keepalive in server-info plugin

2022-02-13 Thread GitBox


zaunist commented on pull request #6202:
URL: https://github.com/apache/apisix/pull/6202#issuecomment-1038607209


   > 
   
   Only a change in `hostname`、`etcd_version`、`apisix_version`、`boot_time` will 
result in a put operation, and in the current case there doesn't seem to be a 
way to make any of them change.


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] tzssangglass commented on issue #6309: request help: in apisix, how to use rbac with keycloak?

2022-02-13 Thread GitBox


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


   Please describe the specific problem, or you can see : 
https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/authz-keycloak.md
 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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] nic-6443 commented on issue #6293: request help: Miss metrics when call /apisix/prometheus/metrics

2022-02-13 Thread GitBox


nic-6443 commented on issue #6293:
URL: https://github.com/apache/apisix/issues/6293#issuecomment-1038603129


   @purekeeper  One thing to note, there must be at least one http request sent 
to
   APISIX, in order to generate `http_status/http_latency/bandwidth` metrics, I 
wonder if you have launched a request to the corresponding route after enabling 
the prometheus plugin? Of course, if it's a global rule, any request to any 
route can trigger the generation of metrics.


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] tzssangglass commented on issue #6307: request help: repeatedly download luarocks archive tar file

2022-02-13 Thread GitBox


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


   > advise to check archive file `v3.8.0.tar.gz` exist or not and validate it, 
if unvalidated, remove it and download again.
   
   SGTM


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] oil-oil opened a new pull request #2316: Fix limit-req plugin form style

2022-02-13 Thread GitBox


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


   Please answer these questions before submitting a pull request, **or your PR 
will get closed**.
   
   **Why submit this pull request?**
   
   - [ ] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   **What changes will this PR take into?**
   
   Please update this section with detailed description.
   
   **Related issues**
   
   fix/resolve #0001
   
   **Checklist:**
   
   - [ ] Did you explain what problem does this PR solve? Or what new features 
have been added?
   - [ ] Have you added corresponding test cases?
   - [ ] Have you modified the corresponding document?
   - [ ] Is this PR backward compatible? If it is not backward compatible, 
please discuss on the mailing list 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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] tzssangglass commented on pull request #6270: feat(oidc): add set_userinfo_detail_header

2022-02-13 Thread GitBox


tzssangglass commented on pull request #6270:
URL: https://github.com/apache/apisix/pull/6270#issuecomment-1038599088


   > Grafana requires the header is plaintext, but X-Userinfo is base64 encoded.
   
   Another question, is there an introduction to `X-Userinfo-Detail-*`? Is this 
header specifically for Grafana?


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] hellobiek opened a new issue #6309: request help: in apisix, how to use rbac with keycloak?

2022-02-13 Thread GitBox


hellobiek opened a new issue #6309:
URL: https://github.com/apache/apisix/issues/6309


   ### Issue description
   
   I had watch the 
url:https://apisix.apache.org/zh/blog/2021/12/10/integrate-keycloak-auth-in-apisix/
   
   Now, I know how to authoity using apisix,now I also want to use apisix 
authorization for me.
   
   Could you help me to how to using role config in keycloak for apisix.
   
   ### Environment
   
   - apisix version (cmd: `apisix version`): 2.7.12
   - OS (cmd: `uname -a`): 18.04.1-Ubuntu
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):  using helm 
install 
   - etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):  
using helm install 
   - apisix-dashboard version, if have: using helm install 
   - the plugin runner version, if the issue is about a plugin runner (cmd: 
depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks 
--version`): using helm install 
   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] tzssangglass commented on pull request #6202: feat: use keepalive in server-info plugin

2022-02-13 Thread GitBox


tzssangglass commented on pull request #6202:
URL: https://github.com/apache/apisix/pull/6202#issuecomment-1038593629


   > How do I change the hostname in the .t test file? I'm not quite sure how 
to do it.
   
   It doesn't have to be hostname, it can be any other action that can be used 
to punish service info refresh.


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-go-plugin-runner] Belyenochi edited a comment on pull request #63: feature: try to introduce context to plugin runner

2022-02-13 Thread GitBox


Belyenochi edited a comment on pull request #63:
URL: 
https://github.com/apache/apisix-go-plugin-runner/pull/63#issuecomment-1038592328


   > Don't forget to add a test to cover it.
   
   Yes, I added a simple Context unit test, please feel free to drop me a 
message if you have good optimization suggestions, 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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-go-plugin-runner] Belyenochi commented on pull request #63: feature: try to introduce context to plugin runner

2022-02-13 Thread GitBox


Belyenochi commented on pull request #63:
URL: 
https://github.com/apache/apisix-go-plugin-runner/pull/63#issuecomment-1038592328


   > Don't forget to add a test to cover it.
   
   Yes, I added a simple Context unit test, please feel free to drop me a 
message if you have good optimization suggestions, 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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] tzssangglass commented on a change in pull request #6202: feat: use keepalive in server-info plugin

2022-02-13 Thread GitBox


tzssangglass commented on a change in pull request #6202:
URL: https://github.com/apache/apisix/pull/6202#discussion_r805475302



##
File path: apisix/plugins/server-info.lua
##
@@ -132,51 +125,107 @@ local function get_server_info()
 end
 
 
+local function set(key,value,ttl, modified_index)

Review comment:
   ```suggestion
   local function set(key, value, ttl, modified_index)
   ```

##
File path: apisix/plugins/server-info.lua
##
@@ -132,51 +125,107 @@ local function get_server_info()
 end
 
 
+local function set(key,value,ttl, modified_index)
+local res_new, err = core.etcd.atomic_set(key, value, ttl, modified_index)
+if not res_new then
+core.log.error("failed to set server_info: ", err)
+return 503, {error_msg = err}
+end
+
+lease_id = res_new.body.lease_id
+
+-- set or update lease_id
+local ok, err = internal_status:set("lease_id", lease_id)
+if not ok then
+core.log.error("failed to set lease_id to shdict: ", err)
+return 503, {error_msg = err}
+end
+
+return 200, nil
+end

Review comment:
   It looks like the two steps should be in sync, and we can use lock in 
the next PR to keep them in sync.

##
File path: apisix/plugins/server-info.lua
##
@@ -132,51 +125,107 @@ local function get_server_info()
 end
 
 
+local function set(key,value,ttl, modified_index)
+local res_new, err = core.etcd.atomic_set(key, value, ttl, modified_index)
+if not res_new then
+core.log.error("failed to set server_info: ", err)
+return 503, {error_msg = err}
+end
+
+lease_id = res_new.body.lease_id

Review comment:
   should we check if `lease_id` is not nil?




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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-ingress-controller] codecov-commenter edited a comment on pull request #845: fix: aviod create pluginconfig in the tranlsation of route (#836)

2022-02-13 Thread GitBox


codecov-commenter edited a comment on pull request #845:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/845#issuecomment-1021838522


   # 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/845?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#845](https://codecov.io/gh/apache/apisix-ingress-controller/pull/845?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (fa0443e) into 
[master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/6b0c139ce2fbf56c683d86b8f93c7b4ef854fbc6?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b0c139) will **increase** coverage by `0.05%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/apisix-ingress-controller/pull/845/graphs/tree.svg?width=650=150=pr=WPLQXPY3V0_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/apisix-ingress-controller/pull/845?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master #845  +/-   ##
   ==
   + Coverage   32.07%   32.12%   +0.05% 
   ==
 Files  70   71   +1 
 Lines7736 7719  -17 
   ==
   - Hits 2481 2480   -1 
   + Misses   4980 4966  -14 
   + Partials  275  273   -2 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/845?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[pkg/kube/translation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/845/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYXBpc2l4X3JvdXRlLmdv)
 | `22.16% <100.00%> (+0.33%)` | :arrow_up: |
   | 
[test/e2e/e2e.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/845/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-dGVzdC9lMmUvZTJlLmdv)
 | `100.00% <0.00%> (ø)` | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/845?src=pr=continue_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/845?src=pr=footer_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
 Last update 
[6b0c139...fa0443e](https://codecov.io/gh/apache/apisix-ingress-controller/pull/845?src=pr=lastupdated_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
 Read the [comment 
docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] zaunist commented on pull request #6202: feat: use keepalive in server-info plugin

2022-02-13 Thread GitBox


zaunist commented on pull request #6202:
URL: https://github.com/apache/apisix/pull/6202#issuecomment-1038578411


   > origin issue has ` only when the apisix node system information changes 
will there be a put operation. (e.g., hostname changes)`
   > 
   > we need to add a test case to cover this?
   
   How do I change the `hostname` in the .t test file? I'm not quite sure how 
to do 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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] mangoGoForward commented on issue #6265: request help: the test case in `t/core/utils.t` need to be corrected

2022-02-13 Thread GitBox


mangoGoForward commented on issue #6265:
URL: https://github.com/apache/apisix/issues/6265#issuecomment-1038576876


   I'd like to work on 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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] zaunist commented on pull request #6202: feat: use keepalive in server-info plugin

2022-02-13 Thread GitBox


zaunist commented on pull request #6202:
URL: https://github.com/apache/apisix/pull/6202#issuecomment-1038576731


   Hi, Community. 
   
   I have encountered follow problems.
   
   - When the server-info plugin is turned on by default, other plugins report 
errors, and I'm not sure if the errors reported here are the expected 
behaviour. 
https://github.com/apache/apisix/runs/5174938000?check_suite_focus=true#step:10:354
   - When the server-info plugin is turned off by default, errors are also 
reported in other checks, here the errors are due to a test of the 
configuration file. 
https://github.com/apache/apisix/runs/5177477142?check_suite_focus=true#step:10:355
   
   Should I choose to turn on the server-info plugin by default or turn it off 
by default? If it is turned on by default, I don't know how to deal with the 
error here, can anyone give me some help?
   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] tzssangglass commented on pull request #6202: feat: use keepalive in server-info plugin

2022-02-13 Thread GitBox


tzssangglass commented on pull request #6202:
URL: https://github.com/apache/apisix/pull/6202#issuecomment-1038576672


   origin issue has ` only when the apisix node system information changes will 
there be a put operation. (e.g., hostname changes)`
   
   we need to add a test case to cover this?


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-ingress-controller] Phoebus888 commented on issue #865: bug: ApisixTls创建 Apisix后台不会自动创建证书

2022-02-13 Thread GitBox


Phoebus888 commented on issue #865:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/865#issuecomment-1038576620


   大佬  我重新找了一个k8s集群安装   新安装的APIGROUP都是apisix.apache.org  
不是apisix.apache.org/v2beta3


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] zhendongcmss commented on a change in pull request #6215: feat: clickhouse logger

2022-02-13 Thread GitBox


zhendongcmss commented on a change in pull request #6215:
URL: https://github.com/apache/apisix/pull/6215#discussion_r805471329



##
File path: apisix/plugins/clickhouse-logger.lua
##
@@ -0,0 +1,179 @@
+--
+-- 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 bp_manager_mod  = require("apisix.utils.batch-processor-manager")
+local log_util= require("apisix.utils.log-util")
+local core= require("apisix.core")
+local http= require("resty.http")
+local url = require("net.url")
+local plugin  = require("apisix.plugin")
+
+local ngx  = ngx
+local tostring = tostring
+
+local plugin_name = "clickhouse-logger"
+local batch_processor_manager = bp_manager_mod.new(plugin_name)
+
+local schema = {
+type = "object",
+properties = {
+endpoint_addr = core.schema.uri_def,
+user = {type = "string", default = ""},
+password = {type = "string", default = ""},
+database = {type = "string", default = ""},
+logtable = {type = "string", default = ""},
+timeout = {type = "integer", minimum = 1, default = 3},
+name = {type = "string", default = "clickhouse logger"},
+ssl_verify = {type = "boolean", default = true},
+},
+required = {"endpoint_addr", "user", "password", "database", "logtable"}
+}
+
+
+local metadata_schema = {
+type = "object",
+properties = {
+log_format = log_util.metadata_schema_log_format,
+},
+}
+
+
+local _M = {
+version = 0.1,
+priority = 398,
+name = plugin_name,
+schema = batch_processor_manager:wrap_schema(schema),
+metadata_schema = metadata_schema,
+}
+
+
+function _M.check_schema(conf, schema_type)
+if schema_type == core.schema.TYPE_METADATA then
+return core.schema.check(metadata_schema, conf)
+end
+return core.schema.check(schema, conf)
+end
+
+
+local function send_http_data(conf, log_message)
+local err_msg
+local res = true
+local url_decoded = url.parse(conf.endpoint_addr)
+local host = url_decoded.host
+local port = url_decoded.port
+
+core.log.info("sending a batch logs to ", conf.endpoint_addr)
+
+if not port then
+if url_decoded.scheme == "https" then
+port = 443
+else
+port = 80
+end
+end
+
+local httpc = http.new()
+httpc:set_timeout(conf.timeout * 1000)
+local ok, err = httpc:connect(host, port)
+
+if not ok then
+return false, "failed to connect to host[" .. host .. "] port["
+.. tostring(port) .. "] " .. err
+end
+
+if url_decoded.scheme == "https" and conf.ssl_verify then

Review comment:
   ok

##
File path: t/plugin/clickhouse-logger.t
##
@@ -0,0 +1,216 @@
+#
+# 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.
+#
+
+use t::APISIX 'no_plan';
+
+log_level("info");
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+
+my $http_config = $block->http_config // <<_EOC_;
+server {
+listen 10420;
+location /clickhouse-logger/test {
+content_by_lua_block {
+ngx.req.read_body()
+local data = 

[GitHub] [apisix-ingress-controller] apit commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-13 Thread GitBox


apit commented on issue #853:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/853#issuecomment-1037730626


   @MirtoBusico @tao12345666333  wouldn't apisix controller watch services so 
recreating cluster, in case of granularity is not service, new pod ip will be 
reflected in the apisixroute config?
   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] kwanhur commented on a change in pull request #6306: build: rm luarocks tar file behind successful installation

2022-02-13 Thread GitBox


kwanhur commented on a change in pull request #6306:
URL: https://github.com/apache/apisix/pull/6306#discussion_r805466059



##
File path: utils/linux-install-luarocks.sh
##
@@ -42,7 +42,7 @@ fi
 make build > build.log 2>&1 || (cat build.log && exit 1)
 sudo make install > build.log 2>&1 || (cat build.log && exit 1)
 cd .. || exit
-rm -rf luarocks-"$LUAROCKS_VER"
+rm -rf luarocks-"$LUAROCKS_VER" luarocks-"$LUAROCKS_VER".tar.gz

Review comment:
   > Could we remove it just after untar?
   
   on this way, if `configure` failed, it need to download archive file 
`v3.8.0.tar.gz` repeatedly.




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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-website] bzp2010 commented on a change in pull request #880: fix: update CVE-2022-24112 blog details

2022-02-13 Thread GitBox


bzp2010 commented on a change in pull request #880:
URL: https://github.com/apache/apisix-website/pull/880#discussion_r805465482



##
File path: website/blog/2022/02/11/cve-2022-24112.md
##
@@ -1,15 +1,15 @@
 ---
-title: "Apache APISIX Risk Notice for Rewriting X-REAL-IP Header 
(CVE-2022-24112)"
+title: "Apache APISIX Vulnerability for Rewriting X-REAL-IP Header 
(CVE-2022-24112)"
 keywords: 
-- Risk Notice
+- Vulnerability
 - Header
 - IP restrictions
 - CHAITIN
 description: In versions prior to Apache APISIX 2.12.1, there is a risk of 
rewriting X-REAL-IP header after enabling the Apache APISIX `batch- requests` 
plug-in. Now the processing information will be announced.
 tags: [Security]
 ---
 
-> In versions prior to Apache APISIX 2.12.1, there is a risk of rewriting 
X-REAL-IP header after enabling the Apache APISIX `batch- requests` plug-in. 
Now the processing information will be announced.
+> In versions prior to Apache APISIX 2.12.1, there is a risk of rewriting 
X-REAL-IP header after enabling the Apache APISIX `batch-requests` plug-in. Now 
the processing information will be announced.

Review comment:
   ```suggestion
   > In versions prior to Apache APISIX 2.12.1, there is a risk of rewriting 
X-REAL-IP header after enabling the Apache APISIX `batch-requests` plugin. Now 
the processing information will be announced.
   ```
   
   In many other documents, we use plugin, not plug-in.




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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] Drery commented on pull request #5940: feat: mocking plugin

2022-02-13 Thread GitBox


Drery commented on pull request #5940:
URL: https://github.com/apache/apisix/pull/5940#issuecomment-1038559716


   @spacewander is there any progress?
   https://user-images.githubusercontent.com/9653109/153789392-1ad529ab-6928-4ac9-ac75-369ab34db1dc.png;>
   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] kwanhur commented on issue #6307: request help: repeatedly download luarocks archive tar file

2022-02-13 Thread GitBox


kwanhur commented on issue #6307:
URL: https://github.com/apache/apisix/issues/6307#issuecomment-1038559675


   > > ```shell
   > > Could not find 'unzip'.
   > > ```
   > 
   > You don't have the `unzip` command on your system?
   
   yes, I installed it manually and redo `./utils/linux-install-luarocks.sh`
   
   advise to check archive file `v3.8.0.tar.gz` exist or not and validate it, 
if unvalidated, remove it and download again.


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] leslie-tsang commented on a change in pull request #6281: chore: compresses the redis lua script in limit-count

2022-02-13 Thread GitBox


leslie-tsang commented on a change in pull request #6281:
URL: https://github.com/apache/apisix/pull/6281#discussion_r805453757



##
File path: apisix/plugins/limit-count/limit-count-redis-cluster.lua
##
@@ -37,6 +38,10 @@ local script = [=[
 return redis.call('incrby', KEYS[1], -1)
 ]=]
 
+--- compact the redis lua script
+script = string.gsub(script, "", "")

Review comment:
   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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-website] juzhiyuan merged pull request #880: fix: update CVE-2022-24112 blog details

2022-02-13 Thread GitBox


juzhiyuan merged pull request #880:
URL: https://github.com/apache/apisix-website/pull/880


   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-helm-chart] MirtoBusico commented on issue #235: Request help: how to enable a private certification authority in gateway?

2022-02-13 Thread GitBox


MirtoBusico commented on issue #235:
URL: 
https://github.com/apache/apisix-helm-chart/issues/235#issuecomment-1038078621






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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] tokers commented on issue #6298: Plugin doesn't work

2022-02-13 Thread GitBox


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


   @Phoebus888  Please provide more environment information like APISIX 
version, APISIX Ingress Controller version, or it's hard to troubleshoot.


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] Chever-John commented on issue #6068: request help: building failed on Mac(2.11 ldap.h)

2022-02-13 Thread GitBox


Chever-John commented on issue #6068:
URL: https://github.com/apache/apisix/issues/6068#issuecomment-1038148506


   > > I'm curious, how did you install the openLDAP? @tzssangglass
   > 
   > yes.
   > 
   > > Is this a MAC specific problem?
   > 
   > Yes, this is only required on MAC.
   
   Thinks, this news is of great use 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.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on issue #6301: bug: some mistakes in prometheus plugin

2022-02-13 Thread GitBox


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


   Yes, it is good.
   
   > nginx_http_requests_total
   
   Do you mean `apisix_http_requests_total`?


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-website] netlify[bot] edited a comment on pull request #880: fix: update CVE-2022-24112 blog details

2022-02-13 Thread GitBox


netlify[bot] edited a comment on pull request #880:
URL: https://github.com/apache/apisix-website/pull/880#issuecomment-1038553135






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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] spacewander commented on a change in pull request #6306: build: rm luarocks tar file behind successful installation

2022-02-13 Thread GitBox


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



##
File path: utils/linux-install-luarocks.sh
##
@@ -42,7 +42,7 @@ fi
 make build > build.log 2>&1 || (cat build.log && exit 1)
 sudo make install > build.log 2>&1 || (cat build.log && exit 1)
 cd .. || exit
-rm -rf luarocks-"$LUAROCKS_VER"
+rm -rf luarocks-"$LUAROCKS_VER" luarocks-"$LUAROCKS_VER".tar.gz

Review comment:
   Could we remove it just after untar?




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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] liangliang4ward commented on pull request #6300: fix: when proxy-rewrite plugin's conf.headers are missing,conf.method can make effect

2022-02-13 Thread GitBox


liangliang4ward commented on pull request #6300:
URL: https://github.com/apache/apisix/pull/6300#issuecomment-1038515471


   > The fix LGTM.
   > 
   > You can learn how to write tests via 
https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md
 and the current test
   > 
   > 
https://github.com/apache/apisix/blob/ebe91aa64c4fd26a03ea1ebddc089c577f4e730b/t/plugin/proxy-rewrite3.t#L87-L129
   
   in proxy-rewrite3.t ,the `TEST 2` case according to the original code, it 
should not succeed。
   
   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] leslie-tsang commented on issue #3931: redirect plugins add curl test for `http_to_https`

2022-02-13 Thread GitBox


leslie-tsang commented on issue #3931:
URL: https://github.com/apache/apisix/issues/3931#issuecomment-1038134671


   @kartikeysaran Hi there, Are there any issues that are preventing you from 
moving forward?
   
   Do let me know if any help in needed.


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] zhixiongdu027 commented on pull request #4880: feat: add kubernetes discovery module

2022-02-13 Thread GitBox


zhixiongdu027 commented on pull request #4880:
URL: https://github.com/apache/apisix/pull/4880#issuecomment-1038518803


   @membphis @spacewander @tao12345666333 @crazyMonkey1995 
   Hi, I think the current code is more in line with the apisix style.
   Please help start ci and reviews.
   Many THK.


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix] liangliang4ward commented on issue #6296: request help: apisix enforces the translation of routed domain names to IP addresses

2022-02-13 Thread GitBox


liangliang4ward commented on issue #6296:
URL: https://github.com/apache/apisix/issues/6296#issuecomment-1038517173


   {
 "methods":["GET"],
 "uri": "/test/index.html",
 "plugins":{
 "proxy-rewrite": {
   "host": "iresty.com"  
   }
 }
   }


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-website] netlify[bot] edited a comment on pull request #870: chore: add the LTS download button of 'apisix'

2022-02-13 Thread GitBox


netlify[bot] edited a comment on pull request #870:
URL: https://github.com/apache/apisix-website/pull/870#issuecomment-1032163360






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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-go-plugin-runner] spacewander closed issue #64: request help: The upstream service cannot be invoked after the header is set in the Filter method

2022-02-13 Thread GitBox


spacewander closed issue #64:
URL: https://github.com/apache/apisix-go-plugin-runner/issues/64


   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-ingress-controller] tokers commented on issue #865: bug: ApisixTls创建 Apisix后台不会自动创建证书

2022-02-13 Thread GitBox


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


   @Phoebus888 After you created the Secret, is the certificate created also?


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] juzhiyuan commented on issue #2309: How to use BASIC AUTH header inside header override or a plugin for a particular service only

2022-02-13 Thread GitBox


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


   >  Is it possible to add basic auth header directly to the service or route 
without linking to the plugins
   
   Hi @stutipatelorigo, AFAIK, because of Apache APISIX's implementation, we 
will choose to use a Plugin to achieve this. Your request is more like a 
Project Improvement on my side 樂 also cc @membphis @bzp2010 to have a look.


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-python-plugin-runner] shuaijinchao closed issue #40: support plugin auto register to runner

2022-02-13 Thread GitBox


shuaijinchao closed issue #40:
URL: https://github.com/apache/apisix-python-plugin-runner/issues/40


   


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-dashboard] guoqqqi commented on pull request #2312: fix: add rejected_msg field to limit-req plugin form

2022-02-13 Thread GitBox


guoqqqi commented on pull request #2312:
URL: 
https://github.com/apache/apisix-dashboard/pull/2312#issuecomment-1037204713


   Hi, @oil-oil add some pictures of your changes in the description section to 
make it easier to review 


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

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

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




  1   2   3   >