[GitHub] [apisix-website] netlify[bot] edited a comment on pull request #970: feat: lang detection

2022-03-27 Thread GitBox


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


   ### ✅ Deploy Preview for *apache-apisix* 
ready!
   
   
   |  Name | Link |
   |-||
   | Latest commit | 
65fb7f1152afcd7eed16017647765dc01268 |
   | Latest deploy log | 
https://app.netlify.com/sites/apache-apisix/deploys/624147de68c5810008f04eef |
   | Deploy Preview | 
https://deploy-preview-970--apache-apisix.netlify.app |
   | Preview on mobile |  
Toggle QR Code... ![QR 
Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTk3MC0tYXBhY2hlLWFwaXNpeC5uZXRsaWZ5LmFwcCJ9.n1HnYWWLdA2imrgVUao6ZU2Pv4F3LEJtdPo4HbVTxWU)_Use your smartphone camera to open QR code link._ |
   ---
   
   _To edit notification comments on pull requests, go to your [Netlify site 
settings](https://app.netlify.com/sites/apache-apisix/settings/deploys#deploy-notifications)._


-- 
This is an automated message from the 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 #970: feat: lang detection

2022-03-27 Thread GitBox


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


   ###  Deploy Preview for *apache-apisix* 
processing.
   
   
   |  Name | Link |
   |-||
   | Latest commit | 
65fb7f1152afcd7eed16017647765dc01268 |
   | Latest deploy log | 
https://app.netlify.com/sites/apache-apisix/deploys/624147de68c5810008f04eef |


-- 
This is an automated message from the 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 #2377: feat: Remove request header data when health check is enabled

2022-03-27 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2377?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2377](https://codecov.io/gh/apache/apisix-dashboard/pull/2377?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (bda1cab) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/eb51353fd6130a4810af4128f57f401ba128d396?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (eb51353) will **increase** coverage by `6.64%`.
   > The diff coverage is `66.66%`.
   
   ```diff
   @@Coverage Diff @@
   ##   master#2377  +/-   ##
   ==
   + Coverage   62.04%   68.69%   +6.64% 
   ==
 Files  57  131  +74 
 Lines3905 3424 -481 
 Branches0  830 +830 
   ==
   - Hits 2423 2352  -71 
   + Misses   1197 1072 -125 
   + Partials  2850 -285 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `68.69% <66.66%> (?)` | |
   
   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/2377?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[web/src/pages/Upstream/Create.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2377/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9VcHN0cmVhbS9DcmVhdGUudHN4)
 | `90.47% <66.66%> (ø)` | |
   | 
[api/cmd/version.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2377/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2NtZC92ZXJzaW9uLmdv)
 | | |
   | 
[api/internal/filter/cors.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2377/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9jb3JzLmdv)
 | | |
   | 
[api/internal/handler/consumer/consumer.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2377/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvY29uc3VtZXIvY29uc3VtZXIuZ28=)
 | | |
   | 
[api/internal/core/store/storehub.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2377/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmVodWIuZ28=)
 | | |
   | 
[api/internal/handler/schema/schema.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2377/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2hhbmRsZXIvc2NoZW1hL3NjaGVtYS5nbw==)
 | | |
   | 
[api/main.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2377/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL21haW4uZ28=)
 | | |
   | 
[api/internal/filter/ip\_filter.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2377/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2ZpbHRlci9pcF9maWx0ZXIuZ28=)
 | | |
   | 
[api/internal/route.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2377/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL3JvdXRlLmdv)
 | | |
   | 
[api/internal/core/store/store.go](https://codecov.io/gh/apache/apisix-dashboard/pull/2377/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-YXBpL2ludGVybmFsL2NvcmUvc3RvcmUvc3RvcmUuZ28=)
 | | |
   | ... and [179 

[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #926: bug: we should create APISIX routes even if Service is created later

2022-03-27 Thread GitBox


tao12345666333 commented on issue #926:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/926#issuecomment-1080176721


   Creating an empty Upstream sounds good.
   In this way, when the Service is actually created, we can update it again.
   WDYT @lingsamuel @gxthrj 


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

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 #973: docs: add 2.13 Release Notes

2022-03-27 Thread GitBox


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


   ### ✅ Deploy Preview for *apache-apisix* 
ready!
   
   
   |  Name | Link |
   |-||
   | Latest commit | 
797c99bbe66dc1fad1e7cb4b8ad79ff84c1c19d0 |
   | Latest deploy log | 
https://app.netlify.com/sites/apache-apisix/deploys/62413179199888346e9b |
   | Deploy Preview | 
https://deploy-preview-973--apache-apisix.netlify.app |
   | Preview on mobile |  
Toggle QR Code... ![QR 
Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTk3My0tYXBhY2hlLWFwaXNpeC5uZXRsaWZ5LmFwcCJ9.ZMRAlBNUzWVH9OmipsT3tJK0mXhjg4i8qb_wjvy7S2Y)_Use your smartphone camera to open QR code link._ |
   ---
   
   _To edit notification comments on pull requests, go to your [Netlify site 
settings](https://app.netlify.com/sites/apache-apisix/settings/deploys#deploy-notifications)._


-- 
This is an automated message from the 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] commented on pull request #973: docs: add 2.13 Release Notes

2022-03-27 Thread GitBox


netlify[bot] commented on pull request #973:
URL: https://github.com/apache/apisix-website/pull/973#issuecomment-1080152671


   ###  Deploy Preview for *apache-apisix* 
processing.
   
   
   |  Name | Link |
   |-||
   | Latest commit | 
797c99bbe66dc1fad1e7cb4b8ad79ff84c1c19d0 |
   | Latest deploy log | 
https://app.netlify.com/sites/apache-apisix/deploys/62413179199888346e9b |


-- 
This is an automated message from the 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] yzeng25 opened a new pull request #973: docs: add 2.13 Release Notes

2022-03-27 Thread GitBox


yzeng25 opened a new pull request #973:
URL: https://github.com/apache/apisix-website/pull/973


   Changes:
   
   Add 2.13 Release Notes
   
   TODO: Translation + Picture
   


-- 
This is an automated message from the 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 #937: feat: support forward-auth plugin

2022-03-27 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#937](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (a3d43d2) into 
[master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/4da91b7971d3defd137f35de84f107612e6f96bd?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (4da91b7) will **increase** coverage by `0.16%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@Coverage Diff @@
   ##   master #937  +/-   ##
   ==
   + Coverage   32.89%   33.05%   +0.16% 
   ==
 Files  72   74   +2 
 Lines7661 7680  +19 
   ==
   + Hits 2520 2539  +19 
 Misses   4865 4865  
 Partials  276  276  
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[pkg/kube/translation/annotations.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMuZ28=)
 | `61.53% <ø> (ø)` | |
   | 
[pkg/kube/translation/annotations/forward\_auth.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvZm9yd2FyZF9hdXRoLmdv)
 | `100.00% <100.00%> (ø)` | |
   | 
[test/e2e/e2e.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937/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/937?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/937?src=pr=footer_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
 Last update 
[4da91b7...a3d43d2](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?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] zhantanfeng edited a comment on issue #6700: help request: apisix在解析域名时失败,出现循环

2022-03-27 Thread GitBox


zhantanfeng edited a comment on issue #6700:
URL: https://github.com/apache/apisix/issues/6700#issuecomment-1080124749


   > > > 
   > > 
   > > 
   > > I will try with APISIX 2.12, but I tried with 2.13, it can not run.
   > 
   > If 2.13 has the same problem, 2.12 also suffers from it. Let me see the 
packet capture file.
   
![image](https://user-images.githubusercontent.com/47771083/160318697-1d55453e-f2d4-41d7-9c84-8b43afbdb47b.png)
   
![image](https://user-images.githubusercontent.com/47771083/160320143-9cc57a68-8236-4171-aa19-67638fa5b577.png)
   
   here is the packet capture file screenshot.


-- 
This is an automated message from the 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] cmssczy commented on issue #926: bug: we should create APISIX routes even if Service is created later

2022-03-27 Thread GitBox


cmssczy commented on issue #926:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/926#issuecomment-1080131530


   we should create an apisix `upstream` with an empty `nodes` when user 
creates a `ApisixRoute` with a non-existent `service`.
   I write a demo for this solution. PTAL, 
https://github.com/cmssczy/apisix-ingress-controller/commit/3a729d9927d10481403ea0f5169c9a12b450fd8d


-- 
This is an automated message from the 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] zhantanfeng edited a comment on issue #6700: help request: apisix在解析域名时失败,出现循环

2022-03-27 Thread GitBox


zhantanfeng edited a comment on issue #6700:
URL: https://github.com/apache/apisix/issues/6700#issuecomment-1080124749


   > > > 
   > > 
   > > 
   > > I will try with APISIX 2.12, but I tried with 2.13, it can not run.
   > 
   > If 2.13 has the same problem, 2.12 also suffers from it. Let me see the 
packet capture file.
   
![image](https://user-images.githubusercontent.com/47771083/160318697-1d55453e-f2d4-41d7-9c84-8b43afbdb47b.png)
   
   here is the packet capture file screenshot.


-- 
This is an automated message from the 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] soulbird commented on issue #6729: feat: As a user, I hope apisix can make some restrictions on the custom functions in the serverless plugin, and the use of illegal code will not ca

2022-03-27 Thread GitBox


soulbird commented on issue #6729:
URL: https://github.com/apache/apisix/issues/6729#issuecomment-1080125716


   > We may introduce a simple sandbox mechanism firstly, such as make vital 
data read-only and only allow users to execute write operations in a specific 
space.
   
   LGTM!


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

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

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




[GitHub] [apisix] zhantanfeng commented on issue #6700: help request: apisix在解析域名时失败,出现循环

2022-03-27 Thread GitBox


zhantanfeng commented on issue #6700:
URL: https://github.com/apache/apisix/issues/6700#issuecomment-1080124749


   > > > 
   > > 
   > > 
   > > I will try with APISIX 2.12, but I tried with 2.13, it can not run.
   > 
   > If 2.13 has the same problem, 2.12 also suffers from it. Let me see the 
packet capture file.
   ![Uploading image.png…]()
   here is the packet capture file screenshot.


-- 
This is an automated message from the 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] tao12345666333 commented on pull request #937: feat: support forward-auth plugin

2022-03-27 Thread GitBox


tao12345666333 commented on pull request #937:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/937#issuecomment-1080122018


   re-run 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-go-plugin-runner] rampagecong commented on issue #74: bug: pkgHTTP.Request RespHeader() Add override previous value

2022-03-27 Thread GitBox


rampagecong commented on issue #74:
URL: 
https://github.com/apache/apisix-go-plugin-runner/issues/74#issuecomment-1080118845


   Very good idea. I'll give it a try.


-- 
This is an automated message from the 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] Hwting closed pull request #6690: docs: polishing openid-connect plugin docs(zh)

2022-03-27 Thread GitBox


Hwting closed pull request #6690:
URL: https://github.com/apache/apisix/pull/6690


   


-- 
This is an automated message from the 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 #6721: feat(file-logger): cache & reopen file handler

2022-03-27 Thread GitBox


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


   


-- 
This is an automated message from the 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: feat(file-logger): cache & reopen file handler (#6721)

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 55eb58a  feat(file-logger): cache & reopen file handler (#6721)
55eb58a is described below

commit 55eb58ab85ac7e108de36271fd9cf29fe2fa3324
Author: 罗泽轩 
AuthorDate: Mon Mar 28 10:16:35 2022 +0800

feat(file-logger): cache & reopen file handler (#6721)
---
 apisix/plugins/file-logger.lua   |  57 -
 t/plugin/{file-logger.t => file-logger-reopen.t} | 156 +--
 t/plugin/file-logger.t   |  20 ++-
 3 files changed, 134 insertions(+), 99 deletions(-)

diff --git a/apisix/plugins/file-logger.lua b/apisix/plugins/file-logger.lua
index d7c9b7d..e624b0b 100644
--- a/apisix/plugins/file-logger.lua
+++ b/apisix/plugins/file-logger.lua
@@ -19,6 +19,7 @@ local core =   require("apisix.core")
 local plugin   =   require("apisix.plugin")
 local ngx  =   ngx
 local io_open  =   io.open
+local is_apisix_or, process = pcall(require, "resty.apisix.process")
 
 
 local plugin_name = "file-logger"
@@ -60,9 +61,57 @@ function _M.check_schema(conf, schema_type)
 end
 
 
+local open_file_cache
+if is_apisix_or then
+-- TODO: switch to a cache which supports inactive time,
+-- so that unused files would not be cached
+local path_to_file = core.lrucache.new({
+type = "plugin",
+})
+
+local function open_file_handler(conf, handler)
+local file, err = io_open(conf.path, 'a+')
+if not file then
+return nil, err
+end
+
+handler.file = file
+handler.open_time = ngx.now() * 1000
+return handler
+end
+
+function open_file_cache(conf)
+local last_reopen_time = process.get_last_reopen_ms()
+
+local handler, err = path_to_file(conf.path, 0, open_file_handler, 
conf, {})
+if not handler then
+return nil, err
+end
+
+if handler.open_time < last_reopen_time then
+core.log.notice("reopen cached log file: ", conf.path)
+handler.file:close()
+
+local ok, err = open_file_handler(conf, handler)
+if not ok then
+return nil, err
+end
+end
+
+return handler.file
+end
+end
+
+
 local function write_file_data(conf, log_message)
 local msg = core.json.encode(log_message)
-local file, err = io_open(conf.path, 'a+')
+
+local file, err
+if open_file_cache then
+file, err = open_file_cache(conf)
+else
+file, err = io_open(conf.path, 'a+')
+end
 
 if not file then
 core.log.error("failed to open file: ", conf.path, ", error info: ", 
err)
@@ -73,7 +122,11 @@ local function write_file_data(conf, log_message)
 else
 file:flush()
 end
-file:close()
+
+-- file will be closed by gc, if open_file_cache exists
+if not open_file_cache then
+file:close()
+end
 end
 end
 
diff --git a/t/plugin/file-logger.t b/t/plugin/file-logger-reopen.t
similarity index 62%
copy from t/plugin/file-logger.t
copy to t/plugin/file-logger-reopen.t
index 464ff6b..c211935 100644
--- a/t/plugin/file-logger.t
+++ b/t/plugin/file-logger-reopen.t
@@ -14,7 +14,16 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-use t::APISIX 'no_plan';
+use t::APISIX;
+
+my $nginx_binary = $ENV{'TEST_NGINX_BINARY'} || 'nginx';
+my $version = eval { `$nginx_binary -V 2>&1` };
+
+if ($version !~ m/\/apisix-nginx-module/) {
+plan(skip_all => "apisix-nginx-module not installed");
+} else {
+plan('no_plan');
+}
 
 no_long_string();
 no_root_location();
@@ -36,40 +45,7 @@ run_tests;
 
 __DATA__
 
-=== TEST 1: sanity
 config
-location /t {
-content_by_lua_block {
-local configs = {
--- full configuration
-{
-path = "file.log"
-},
--- property "path" is required
-{
-path = nil
-}
-}
-
-local plugin = require("apisix.plugins.file-logger")
-
-for i = 1, #configs do
-ok, err = plugin.check_schema(configs[i])
-if err then
-ngx.say(err)
-else
-ngx.say("done")
-end
-end
-}
-}
 response_body_like
-done
-property "path" is required
-
-
-
-=== TEST 2: add plugin metadata
+=== TEST 1: prepare
 --- config
 location /t {
 content_by_lua_block {
@@ -86,20 +62,10 @@ property "path" is required
 
 if code >= 300 then
 ngx.status = code
+ngx.say(body)
+return
   

[GitHub] [apisix-ingress-controller] tao12345666333 merged pull request #939: feat: introduce v2 apiversion

2022-03-27 Thread GitBox


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


   


-- 
This is an automated message from the 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 edited a comment on issue #5837: request: Expect monitoring metrics to add monitoring of nginx shared memory usage

2022-03-27 Thread GitBox


tzssangglass edited a comment on issue #5837:
URL: https://github.com/apache/apisix/issues/5837#issuecomment-1080100342


   > @tzssangglass Could you share your proposal?
   
   we can use `ngx.shared.DICT.capacity` and `ngx.shared.DICT.free_space` to 
monitor a `ngx.shared.DICT`?
   


-- 
This is an automated message from the 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 #5837: request: Expect monitoring metrics to add monitoring of nginx shared memory usage

2022-03-27 Thread GitBox


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


   we can use `ngx.shared.DICT.capacity` and `ngx.shared.DICT.free_space` to 
monitor a `ngx.shared.DICT`?


-- 
This is an automated message from the 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] SkyeYoung edited a comment on pull request #970: feat: lang detection

2022-03-27 Thread GitBox


SkyeYoung edited a comment on pull request #970:
URL: https://github.com/apache/apisix-website/pull/970#issuecomment-1078853672


   > I found a strange problem. My broswer is in Chinese mode. Page will be 
redirect to the `//` and show 404 not found.
   
   I have tried to solve this problem. Pls 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] tokers commented on a change in pull request #6670: feat: Add the function of hiding header for key-auth plugin

2022-03-27 Thread GitBox


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



##
File path: docs/en/latest/plugins/key-auth.md
##
@@ -41,6 +41,7 @@ For route side:
 |  | -- | --- | --- | - | 
 |
 | header  | string | optional| apikey|   | the header we get 
the key from |
 | query   | string | optional| apikey|   | the query string we 
get the key from, which priority is lower than `header` |
+| hide_credentials   | bool | optional| false|   | Whether to 
pass the apikey request headers to the upstream. |

Review comment:
   You should only handle the query that used to carry the credential.




-- 
This is an automated message from the 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 #6729: feat: As a user, I hope apisix can make some restrictions on the custom functions in the serverless plugin, and the use of illegal code will not caus

2022-03-27 Thread GitBox


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


   We may introduce a simple sandbox mechanism firstly, such as make vital data 
read-only and only allow users to execute write operations in a specific space.


-- 
This is an automated message from the 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 #6717: ci: should check the `>>> master` too

2022-03-27 Thread GitBox


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


   


-- 
This is an automated message from the 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: ci: should check the `>>> master` too (#6717)

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

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


The following commit(s) were added to refs/heads/master by this push:
 new c0e7954  ci: should check the `>>> master` too (#6717)
c0e7954 is described below

commit c0e795441514844cb372b2d7208c4f8eb4e4ab54
Author: 罗泽轩 
AuthorDate: Mon Mar 28 09:27:24 2022 +0800

ci: should check the `>>> master` too (#6717)
---
 .github/workflows/lint.yml|  4 ++--
 utils/check-merge-conflict.sh | 24 
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 688ff7d..acc352e 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -15,10 +15,10 @@ jobs:
   git grep --cached -l '' | xargs codespell 
--ignore-words=.ignore_words
   - name: Merge conflict
 run: |
-  grep "^<<< HEAD" $(git grep --cached -l '' | xargs) && exit 1 || 
true
+  bash ./utils/check-merge-conflict.sh
   - name: Plugin Code
 run: |
-  sudo bash ./utils/check-plugins-code.sh
+  bash ./utils/check-plugins-code.sh
 
   ci-eclint:
 runs-on: ubuntu-latest
diff --git a/utils/check-merge-conflict.sh b/utils/check-merge-conflict.sh
new file mode 100755
index 000..4516368
--- /dev/null
+++ b/utils/check-merge-conflict.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+#
+# 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.
+#
+
+set -euo pipefail
+
+grep "^<<< HEAD" $(git grep --cached -l '' | xargs) && exit 1
+grep "^>>> master" $(git grep --cached -l '' | xargs) && exit 1
+exit 0


[GitHub] [apisix] tokers commented on issue #5837: request: Expect monitoring metrics to add monitoring of nginx shared memory usage

2022-03-27 Thread GitBox


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


   > I changed my mind and I think it's a meaningful enhancemen.
   > 
   > Perhaps we can first monitor the nginx.shared.DICT that is used by APISIX, 
and next we allow users to monitor a custom nginx.shared.DICT (or read the used 
nginx.shared.DICT directly from the configuration file).
   > 
   > cc @spacewander
   
   @tzssangglass Could you share your proposal?


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

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 #6721: feat(file-logger): cache & reopen file handler

2022-03-27 Thread GitBox


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


   > Is this an enhancement to #6709?
   
   Not yet


-- 
This is an automated message from the 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 #2290: feat: added form function to authz-casbin plugin

2022-03-27 Thread GitBox


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


   need to fix 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-dashboard] guoqqqi commented on a change in pull request #2290: feat: added form function to authz-casbin plugin

2022-03-27 Thread GitBox


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



##
File path: web/src/components/Plugin/UI/authz-casbin.tsx
##
@@ -37,54 +38,122 @@ const FORM_ITEM_LAYOUT = {
 const AuthzCasbin: React.FC = ({ form, schema }) => {
   const { formatMessage } = useIntl();
   const properties = schema?.properties
+  const [value, setValue] = useState(1);
+  const onChange = (e:any) => {
+setValue(e.target.value);
+  };
+
+  const [dian, setDian] = useState('houmian')
+  const aa = () => {
+setDian('houmian')
+  }
+
+  const bb = () => {
+setDian('qianmian')
+  }
 
   return (
 
-  
-
-  
-  
-
-  
+  
+A
+B
+  
+  {dian === 'houmian' ?

Review comment:
   ```suggestion
 {dian === 'houmian' ?
   ```
   Bad variable names, and we can use `value` instead of `dian` to make a 
judgement

##
File path: web/src/components/Plugin/UI/authz-casbin.tsx
##
@@ -37,54 +38,122 @@ const FORM_ITEM_LAYOUT = {
 const AuthzCasbin: React.FC = ({ form, schema }) => {
   const { formatMessage } = useIntl();
   const properties = schema?.properties
+  const [value, setValue] = useState(1);
+  const onChange = (e:any) => {
+setValue(e.target.value);
+  };
+
+  const [dian, setDian] = useState('houmian')
+  const aa = () => {
+setDian('houmian')
+  }
+
+  const bb = () => {
+setDian('qianmian')
+  }

Review comment:
   Hi, these variable names, are not particularly friendly, we can change 
the variable names




-- 
This is an automated message from the 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] jagerzhang edited a comment on issue #6725: help request: 内存持续增涨OOM

2022-03-27 Thread GitBox


jagerzhang edited a comment on issue #6725:
URL: https://github.com/apache/apisix/issues/6725#issuecomment-1080081313


   @pguokun 
我在腾讯云TKE(K8S)也发现有这个问题,内存增长趋于线性,内存缓缓增长到预设HPA之后会触发HPA弹性扩容,然后会一直扩再也不会缩回来了,得销毁重建才会回到最开始状态。
   
   我们这边用的插件如下:
   
   全局插件:
   - request-id
   - resonset-rewrite
   - kafka-logger
   
   路由插件:
   - proxy-rewrite (5%)
   - consumer-restriction (70%)
   - hmac(70%)
   - limit-count (70%)
   
   以下是2C2G的Pod配置,之前用的1C1G跑半个月就会触发HPA扩容了。
   
![image](https://user-images.githubusercontent.com/9711651/160310159-bb340827-cbf4-47b6-9097-d7f8530d2aa4.png)
   
![image](https://user-images.githubusercontent.com/9711651/160310128-72dd4e65-a495-4e5a-825a-9b0d584b1971.png)
   
   
不太清楚这里面有没有GC机制,如果有GC,GC的触发条件是不是内存占用到一定程度时才触发?而运行在容器里面,程序看到的内存其实是宿主机的内存,而非容器limit内存,会导致永远不可能触发GC呢?目前Python3.7及以下版本就有这个问题,看到的是宿主机的资源,导致GC不会被主动执行。
   
   以上,仅供参考哈~


-- 
This is an automated message from the 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] jagerzhang edited a comment on issue #6725: help request: 内存持续增涨OOM

2022-03-27 Thread GitBox


jagerzhang edited a comment on issue #6725:
URL: https://github.com/apache/apisix/issues/6725#issuecomment-1080081313


   @pguokun 
我在腾讯云TKE(K8S)也发现有这个问题,内存增长趋于线性,内存缓缓增长到预设HPA之后会触发HPA弹性扩容,然后会一直扩再也不会缩回来了,得销毁重建才会回到最开始状态。
   
   我们这边用的插件如下:
   
   全局插件:
   - request-id
   - resonset-rewrite
   - kafka-logger
   
   路由插件:
   - proxy-rewrite (5%)
   - consumer-restriction (70%)
   - hmac(70%)
   - limit-count (70%)
   
   
![image](https://user-images.githubusercontent.com/9711651/160310159-bb340827-cbf4-47b6-9097-d7f8530d2aa4.png)
   
![image](https://user-images.githubusercontent.com/9711651/160310128-72dd4e65-a495-4e5a-825a-9b0d584b1971.png)
   
   
不太清楚这里面有没有GC机制,如果有GC,GC的触发条件是不是内存占用到一定程度时才触发?而运行在容器里面,程序看到的内存其实是宿主机的内存,而非容器limit内存,会导致永远不可能触发GC呢?目前Python3.7及以下版本就有这个问题,看到的是宿主机的资源,导致GC不会被主动执行。
   
   以上,仅供参考哈~


-- 
This is an automated message from the 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] jagerzhang commented on issue #6725: help request: 内存持续增涨OOM

2022-03-27 Thread GitBox


jagerzhang commented on issue #6725:
URL: https://github.com/apache/apisix/issues/6725#issuecomment-1080081313


   @pguokun 我在腾讯云TKE(K8S)也发现有这个问题,内存增长趋于线性,我们这边用的插件如下:
   
   全局插件:
   - request-id
   - resonset-rewrite
   - kafka-logger
   
   路由插件:
   - proxy-rewrite (5%)
   - consumer-restriction (70%)
   - hmac(70%)
   - limit-count (70%)
   
   
![image](https://user-images.githubusercontent.com/9711651/160310159-bb340827-cbf4-47b6-9097-d7f8530d2aa4.png)
   
![image](https://user-images.githubusercontent.com/9711651/160310128-72dd4e65-a495-4e5a-825a-9b0d584b1971.png)
   
   
不太清楚这里面有没有GC机制,如果有GC,GC的触发条件是不是内存占用到一定程度时才触发?而运行在容器里面,程序看到的内存其实是宿主机的内存,而非容器limit内存,会导致永远不可能触发GC呢?目前Python3.7及以下版本就有这个问题,看到的是宿主机的资源,导致GC不会被主动执行。
   
   以上,仅供参考哈~


-- 
This is an automated message from the 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] tao12345666333 commented on issue #926: bug: we should create APISIX routes even if Service is created later

2022-03-27 Thread GitBox


tao12345666333 commented on issue #926:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/926#issuecomment-1080077110


   Maybe we can discuss it at the community meeting on Wednesday


-- 
This is an automated message from the 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] zhantanfeng commented on issue #6700: help request: apisix在解析域名时失败,出现循环

2022-03-27 Thread GitBox


zhantanfeng commented on issue #6700:
URL: https://github.com/apache/apisix/issues/6700#issuecomment-1080075694


   > > > 
   > > 
   > > 
   > > I will try with APISIX 2.12, but I tried with 2.13, it can not run.
   > 
   > If 2.13 has the same problem, 2.12 also suffers from it. Let me see the 
packet capture file.
   
   I got the packet capture file, what info do you want to see? it has lots of 
info.


-- 
This is an automated message from the 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 #6638: help request: Why has apisix added some strange routes?

2022-03-27 Thread GitBox


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


   Considered resolved due to lack of feedback. Feel free to reopen it if 
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] leslie-tsang closed issue #6638: help request: Why has apisix added some strange routes?

2022-03-27 Thread GitBox


leslie-tsang closed issue #6638:
URL: https://github.com/apache/apisix/issues/6638


   


-- 
This is an automated message from the 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] tao12345666333 commented on issue #926: bug: we should create APISIX routes even if Service is created later

2022-03-27 Thread GitBox


tao12345666333 commented on issue #926:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/926#issuecomment-1080075001


   > Or could we stop supporting `resolveGranularity`?
   
   This feature is useful and we will not stop supporting 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] tokers commented on issue #6725: help request: 内存持续增涨OOM

2022-03-27 Thread GitBox


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


   @pguokun What about other metrics like QPS, CPU?


-- 
This is an automated message from the 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 #5650: request help: etcd tls connect handshake failed

2022-03-27 Thread GitBox


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


   > @tokers It means I didn't provide the client certificate, when i use 
`-cert` and `-key` in openssl, it's ok. `Certificate host Mismatch` is an error 
reported by the client when trying to verify the server certificate. I will do 
more verification in my spare time to confirm the problem.
   
   Just like @hctech , If your ETCD certificate was signed by private CA, you 
can either:
   
   1. disable ETCD TLS Verify option in APISIX config.yaml, or
   2. add the ETCD CA certificate to the CA bundle and specified it in 
`ssl_trusted_certificate` option.


-- 
This is an automated message from the 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 #6721: feat(file-logger): cache & reopen file handler

2022-03-27 Thread GitBox


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


   Is this an enhancement to #6709?


-- 
This is an automated message from the 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] tokers commented on a change in pull request #257: Daemonset

2022-03-27 Thread GitBox


tokers commented on a change in pull request #257:
URL: https://github.com/apache/apisix-helm-chart/pull/257#discussion_r835993042



##
File path: charts/apisix/templates/daemonset.yaml
##
@@ -0,0 +1,201 @@
+#
+# 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.
+{{- if eq .Values.apisix.kind "DaemonSet" }}
+{{- if .Values.apisix.enabled }}
+apiVersion: apps/v1
+kind: DaemonSet
+metadata:
+  name: {{ include "apisix.fullname" . }}
+  namespace: {{ .Release.Namespace }}
+  labels:
+{{- include "apisix.labels" . | nindent 4 }}
+spec:
+  selector:
+matchLabels:
+  {{- include "apisix.selectorLabels" . | nindent 6 }}
+  template:
+metadata:
+  annotations:
+checksum/config: {{ include (print $.Template.BasePath 
"/configmap.yaml") . | sha256sum }}
+{{- with .Values.apisix.podAnnotations }}
+{{- toYaml . | nindent 8 }}
+{{- end }}
+  labels:
+{{- include "apisix.selectorLabels" . | nindent 8 }}
+spec:
+  {{- with .Values.global.imagePullSecrets }}
+  imagePullSecrets:
+{{- toYaml . | nindent 8 }}
+  {{- end }}
+  securityContext:
+{{- toYaml .Values.podSecurityContext | nindent 8 }}
+  containers:
+- name: {{ .Chart.Name }}
+  securityContext:
+{{- toYaml .Values.securityContext | nindent 12 }}
+  image: "{{ .Values.apisix.image.repository }}:{{ 
.Values.apisix.image.tag | default .Chart.AppVersion }}"
+  imagePullPolicy: {{ .Values.apisix.image.pullPolicy }}
+  ports:
+- name: http
+  containerPort: {{ .Values.gateway.http.containerPort }}
+  protocol: TCP
+- name: tls
+  containerPort: {{ .Values.gateway.tls.containerPort }}
+  protocol: TCP
+{{- if .Values.admin.enabled }}
+- name: admin
+  containerPort: {{ .Values.admin.port }}
+  protocol: TCP
+{{- end }}
+{{- if .Values.serviceMonitor.enabled }}
+- name: prometheus
+  containerPort: {{ .Values.serviceMonitor.containerPort }}
+  protocol: TCP
+{{- end }}
+{{- if and .Values.gateway.stream.enabled (or (gt (len 
.Values.gateway.stream.tcp) 0) (gt (len .Values.gateway.stream.udp) 0)) }}
+{{- with .Values.gateway.stream }}
+{{- if (gt (len .tcp) 0) }}
+{{- range $index, $port := .tcp }}
+- name: proxy-tcp-{{ $index | toString }}
+  containerPort: {{ $port }}
+  protocol: TCP
+{{- end }}
+{{- end }}
+{{- if (gt (len .udp) 0) }}
+{{- range $index, $port := .udp }}
+- name: proxy-udp-{{ $index | toString }}
+  containerPort: {{ $port }}
+  protocol: UDP
+{{- end }}
+{{- end }}
+{{- end }}
+{{- end }}
+  readinessProbe:
+failureThreshold: 6
+initialDelaySeconds: 10
+periodSeconds: 10
+successThreshold: 1
+tcpSocket:
+  port: {{ .Values.gateway.http.containerPort }}
+timeoutSeconds: 1
+  lifecycle:
+preStop:
+  exec:
+command:
+- /bin/sh
+- -c
+- "sleep 30"
+  env:
+- name: INTRANET_IP
+  valueFrom:
+fieldRef:
+  fieldPath: status.podIP
+  volumeMounts:
+{{- if .Values.apisix.setIDFromPodUID }}
+- mountPath: /usr/local/apisix/conf/apisix.uid
+  name: id
+  subPath: apisix.uid
+{{- end }}
+- mountPath: /usr/local/apisix/conf/config.yaml
+  name: apisix-config
+  subPath: config.yaml
+{{- if and .Values.gateway.tls.enabled 
.Values.gateway.tls.existingCASecret }}
+- mountPath: /usr/local/apisix/conf/ssl/{{ 
.Values.gateway.tls.certCAFilename }}
+  name: ssl
+  subPath: {{ .Values.gateway.tls.certCAFilename }}
+{{- end }}
+{{- if 

[GitHub] [apisix-helm-chart] tokers commented on a change in pull request #257: Daemonset

2022-03-27 Thread GitBox


tokers commented on a change in pull request #257:
URL: https://github.com/apache/apisix-helm-chart/pull/257#discussion_r835991858



##
File path: .idea/workspace.xml
##
@@ -0,0 +1,69 @@
+

Review comment:
   It' still there, tracked by git.




-- 
This is an automated message from the 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] tokers merged pull request #232: feat(apisix): add timezone and extraEnvVars

2022-03-27 Thread GitBox


tokers merged pull request #232:
URL: https://github.com/apache/apisix-helm-chart/pull/232


   


-- 
This is an automated message from the 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-helm-chart] branch master updated: feat(apisix): add timezone and extraEnvVars (#232)

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 6330350  feat(apisix): add timezone and extraEnvVars (#232)
6330350 is described below

commit 6330350e71d2642ac932bde1be06fe46180454bb
Author: Gallardot 
AuthorDate: Mon Mar 28 08:55:54 2022 +0800

feat(apisix): add timezone and extraEnvVars (#232)
---
 charts/apisix/README.md |  2 ++
 charts/apisix/templates/deployment.yaml |  8 
 charts/apisix/values.yaml   | 19 +++
 3 files changed, 29 insertions(+)

diff --git a/charts/apisix/README.md b/charts/apisix/README.md
index 9e773de..dfe28ea 100644
--- a/charts/apisix/README.md
+++ b/charts/apisix/README.md
@@ -76,6 +76,8 @@ The following tables lists the configurable parameters of the 
apisix chart and t
 | `apisix.luaModuleHook.configMapRef.name` | Name of the ConfigMap where the 
lua module codes store | "" |
 | `apisix.luaModuleHook.configMapRef.mounts[].key` | Name of the ConfigMap 
key, for setting the mapping relationship between ConfigMap key and the lua 
module code path. | `""` |
 | `apisix.luaModuleHook.configMapRef.mounts[].path` | Filepath of the plugin 
code, for setting the mapping relationship between ConfigMap key and the lua 
module code path. | `""` |
+| `apisix.timezone` | The timezone where APISIX container uses. For example: 
UTC, Asia/Shanghai. This value will be set on apisix container's environment 
variable TZ. Sometimes may need to set the timezone to be consistent with local 
time zone, otherwise the apisix's logs may used to retrieve event maybe in 
wrong timezone.| `""` |
+| `apisix.extraEnvVars` | APISIX container extra environment variables , See 
[define-environment-variable-container](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/)
 for the detail. | `[]`
 | `extraVolumes` | Additional `volume`, See [Kubernetes 
Volumes](https://kubernetes.io/docs/concepts/storage/volumes/) for the detail. 
| `[]` |
 | `extraVolumeMounts` | Additional `volumeMounts`, See [Kubernetes 
Volumes](https://kubernetes.io/docs/concepts/storage/volumes/) for the detail. 
| `[]` |
 
diff --git a/charts/apisix/templates/deployment.yaml 
b/charts/apisix/templates/deployment.yaml
index d1a6517..cc967c3 100644
--- a/charts/apisix/templates/deployment.yaml
+++ b/charts/apisix/templates/deployment.yaml
@@ -51,6 +51,14 @@ spec:
 {{- toYaml .Values.securityContext | nindent 12 }}
   image: "{{ .Values.apisix.image.repository }}:{{ 
.Values.apisix.image.tag | default .Chart.AppVersion }}"
   imagePullPolicy: {{ .Values.apisix.image.pullPolicy }}
+  env:
+{{- if .Values.apisix.timezone }}
+- name: TZ
+  value: {{ .Values.apisix.timezone }}
+{{- end }}
+{{- if .Values.apisix.extraEnvVars }}
+{{- include "apisix.tplvalues.render" (dict "value" 
.Values.apisix.extraEnvVars "context" $) | nindent 12 }}
+{{- end }}
   ports:
 - name: http
   containerPort: {{ .Values.gateway.http.containerPort }}
diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml
index 12f70b5..a98c1f9 100644
--- a/charts/apisix/values.yaml
+++ b/charts/apisix/values.yaml
@@ -96,6 +96,25 @@ apisix:
   podAntiAffinity:
 enabled: false
 
+  # timezone is the timezone where apisix uses.
+  # For example: "UTC" or "Asia/Shanghai"
+  # This value will be set on apisix container's environment variable TZ.
+  # You may need to set the timezone to be consistent with your local time 
zone,
+  # otherwise the apisix's logs may used to retrieve event maybe in wrong 
timezone.
+  timezone: ""
+
+  # extraEnvVars An array to add extra env vars
+  # e.g:
+  # extraEnvVars:
+  #   - name: FOO
+  # value: "bar"
+  #   - name: FOO2
+  # valueFrom:
+  #   secretKeyRef:
+  # name: SECRET_NAME
+  # key: KEY
+  extraEnvVars: []
+
 nameOverride: ""
 fullnameOverride: ""
 


[GitHub] [apisix] Chever-John commented on a change in pull request #6616: docs: add datadog document(zh)

2022-03-27 Thread GitBox


Chever-John commented on a change in pull request #6616:
URL: https://github.com/apache/apisix/pull/6616#discussion_r835990861



##
File path: docs/zh/latest/plugins/datadog.md
##
@@ -0,0 +1,147 @@
+---
+title: datadog
+---
+
+
+
+## 简介
+
+`datadog` 是 Apache APISIX 内置的监控插件,可与 
[Datadog](https://www.datadoghq.com/)(云应用最常用的监控和可观测性平台之一)无缝集成。`datadog` 
插件支持对每个请求和响应周期进行多种指标参数的获取,这些指标参数基本反映了系统的行为和健康状况。
+
+该插件通过 UDP 协议将其自定义指标推送给 DogStatsD 服务器,该服务器与 Datadog Agent 捆绑在一起(关于如何安装 Datadog 
Agent,请参考[Agent](https://docs.datadoghq.com/agent/) )。DogStatsD 基本上是 StatsD 
协议的实现,它将收集到的 Apache APISIX 代理的自定义指标聚合成单个数据点,并发送到设置的 Datadog 服务器上。更多关于 DogStatsD 
的信息,请参考 
[DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/?tab=hostagent) 。
+
+`datadog` 插件具有将多个指标参数组成一个批处理统一推送给外部 Datadog Agent 的能力,并且可以重复使用同一个数据包套接字。
+
+这样的功能可以有效解决日志数据不及时发送的问题,因为当生成一个批处理,并对其做了恰当的配置 (比如对 `inactive_timeout` 参数进行配置) 
之后。批处理器便会在配置时间(默认是 5s)内发送日志数据。
+
+关于 Apache APISIX 的批处理程序的更多信息,请参考 [Batch-Processor](../batch-processor.md#配置)
+
+## 属性
+
+| 名称 | 类型   | 必选项  | 默认值  | 有效值   | 描述 
   |
+| ---  | -- | ---  | ---  | -   | 

   |
+| prefer_name  | boolean | optional| true | true/false  | 
如果设置为 `false`,将使用路由/服务的 id 值作为插件的 `route_name`,而不是带有参数的标签名称(默认)。   |
+
+该插件支持使用批处理程序来聚集和处理条目(日志/数据)的批次。这就避免了插件频繁地提交数据,默认情况下,批处理程序每 `5` 秒或当队列中的数据达到 
`1000` 时提交数据。有关信息或自定义批处理程序的参数设置,请参阅[批处理程序](../batch-processor.md#configuration) 
配置部分。
+
+## 元数据
+
+| 名称| 类型| 必选项 | 默认值| 有效值 | 描述  
  |
+| --- | --  | --- |  ---   | - | 
-- |
+| host| string  | optional|  "127.0.0.1"   |   | 
DogStatsD 服务器的主机地址  |
+| port| integer | optional|8125|   | 
DogStatsD 服务器的主机端口 |
+| namespace   | string  | optional|"apisix"|   | 由 
APISIX 代理发送的所有自定义参数的前缀。对寻找指标图的实体很有帮助,例如:(apisix.request.counter)。   
 |
+| constant_tags | array | optional| [ "source:apisix" ] |  | 
静态标签嵌入到生成的指标中。这对某些信号的度量进行分组很有用。 |
+
+要了解更多关于如何有效地编写标签,请访问[这里](https://docs.datadoghq.com/getting_started/tagging/#defining-tags)
+
+## 输出指标
+
+Apache APISIX 代理,对于每个请求响应周期,如果启用了 datadog 插件,就会向 DogStatsD 服务器输出以下指标。
+
+| Metric Name   | StatsD Type   | Description   |
+| ---   | ---   | ---   |
+| Request Counter   | Counter   | 收到的请求数量。   |
+| Request Latency   | Histogram | 处理该请求所需的时间(以毫秒为单位)。 |
+| Upstream latency  | Histogram | 代理请求到上游服务器直到收到响应所需的时间(以毫秒为单位)。 |
+| APISIX Latency| Histogram | APISIX 代理处理该请求的时间(以毫秒为单位)。|
+| Ingress Size  | Timer | 以字节为单位的请求体大小。 |
+| Egress Size   | Timer | 以字节为单位的响应体大小。 |
+
+这些指标将被发送到带有以下标签的 DogStatsD Agent。
+
+> 如果一个标签没有合适的值,该标签将被直接省略。
+
+- **route_name**:在路由模式定义中指定的名称,如果不存在或插件属性 `prefer_name` 被设置为 
`false`,它将默认使用路由/服务的 id 值。
+- **service_name**:如果一个路由是用服务的抽象概念创建的,特定的服务 name/id(基于插件的 `prefer_name` 
属性)将被使用。
+- **consumer**:如果路由有一个链接的消费者,消费者的用户名将被添加为一个标签。
+- **balancer_ip**:处理了当前请求的上游复制均衡器的的 IP。

Review comment:
   Solved




-- 
This is an automated message from the 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 #6709: feat: file-log-plugin should combine with log-rotate

2022-03-27 Thread GitBox


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


   > This is not easy to combine these two plugins. But we can make a try.
   
   Maybe we can make file-logger support log file rotation (without modifying 
the log-rotate plugin, or extracting some common functions)?


-- 
This is an automated message from the 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 #939: feat: introduce v2 apiversion

2022-03-27 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#939](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (ea20e25) into 
[master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/75098d1e4b26136de3164a3aabd6ed018ffdcd6b?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (75098d1) will **increase** coverage by `0.99%`.
   > The diff coverage is `12.50%`.
   
   ```diff
   @@Coverage Diff @@
   ##   master #939  +/-   ##
   ==
   + Coverage   31.90%   32.90%   +0.99% 
   ==
 Files  72   73   +1 
 Lines7899 7662 -237 
   ==
   + Hits 2520 2521   +1 
   + Misses   5103 4865 -238 
 Partials  276  276  
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[pkg/api/validation/apisix\_consumer.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2FwaS92YWxpZGF0aW9uL2FwaXNpeF9jb25zdW1lci5nbw==)
 | `0.00% <ø> (ø)` | |
   | 
[pkg/api/validation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2FwaS92YWxpZGF0aW9uL2FwaXNpeF9yb3V0ZS5nbw==)
 | `24.59% <ø> (+2.85%)` | :arrow_up: |
   | 
[pkg/api/validation/apisix\_tls.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2FwaS92YWxpZGF0aW9uL2FwaXNpeF90bHMuZ28=)
 | `0.00% <ø> (ø)` | |
   | 
[pkg/api/validation/apisix\_upstream.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2FwaS92YWxpZGF0aW9uL2FwaXNpeF91cHN0cmVhbS5nbw==)
 | `0.00% <ø> (ø)` | |
   | 
[pkg/config/config.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2NvbmZpZy9jb25maWcuZ28=)
 | `64.64% <ø> (ø)` | |
   | 
[pkg/ingress/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvYXBpc2l4X3JvdXRlLmdv)
 | `0.00% <0.00%> (ø)` | |
   | 
[pkg/ingress/compare.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvY29tcGFyZS5nbw==)
 | `0.00% <0.00%> (ø)` | |
   | 
[pkg/ingress/controller.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvY29udHJvbGxlci5nbw==)
 | `0.95% <ø> (+<0.01%)` | :arrow_up: |
   | 
[pkg/ingress/namespace.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvbmFtZXNwYWNlLmdv)
 | `0.00% <0.00%> (ø)` | |
   | 
[pkg/ingress/status.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3Mvc3RhdHVzLmdv)
 | `0.00% <ø> (ø)` | |
   | ... and [5 
more](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree-more_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | |
   
   --
   
   [Continue to review full report at 

[GitHub] [apisix-ingress-controller] codecov-commenter commented on pull request #939: feat: introduce v2 apiversion

2022-03-27 Thread GitBox


codecov-commenter commented on pull request #939:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/939#issuecomment-1079986762


   # 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#939](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (ea20e25) into 
[master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/75098d1e4b26136de3164a3aabd6ed018ffdcd6b?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (75098d1) will **increase** coverage by `0.99%`.
   > The diff coverage is `12.50%`.
   
   ```diff
   @@Coverage Diff @@
   ##   master #939  +/-   ##
   ==
   + Coverage   31.90%   32.89%   +0.99% 
   ==
 Files  72   72  
 Lines7899 7661 -238 
   ==
 Hits 2520 2520  
   + Misses   5103 4865 -238 
 Partials  276  276  
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[pkg/api/validation/apisix\_consumer.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2FwaS92YWxpZGF0aW9uL2FwaXNpeF9jb25zdW1lci5nbw==)
 | `0.00% <ø> (ø)` | |
   | 
[pkg/api/validation/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2FwaS92YWxpZGF0aW9uL2FwaXNpeF9yb3V0ZS5nbw==)
 | `24.59% <ø> (+2.85%)` | :arrow_up: |
   | 
[pkg/api/validation/apisix\_tls.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2FwaS92YWxpZGF0aW9uL2FwaXNpeF90bHMuZ28=)
 | `0.00% <ø> (ø)` | |
   | 
[pkg/api/validation/apisix\_upstream.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2FwaS92YWxpZGF0aW9uL2FwaXNpeF91cHN0cmVhbS5nbw==)
 | `0.00% <ø> (ø)` | |
   | 
[pkg/config/config.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2NvbmZpZy9jb25maWcuZ28=)
 | `64.64% <ø> (ø)` | |
   | 
[pkg/ingress/apisix\_route.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvYXBpc2l4X3JvdXRlLmdv)
 | `0.00% <0.00%> (ø)` | |
   | 
[pkg/ingress/compare.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvY29tcGFyZS5nbw==)
 | `0.00% <0.00%> (ø)` | |
   | 
[pkg/ingress/controller.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvY29udHJvbGxlci5nbw==)
 | `0.95% <ø> (+<0.01%)` | :arrow_up: |
   | 
[pkg/ingress/namespace.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3MvbmFtZXNwYWNlLmdv)
 | `0.00% <0.00%> (ø)` | |
   | 
[pkg/ingress/status.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2luZ3Jlc3Mvc3RhdHVzLmdv)
 | `0.00% <ø> (ø)` | |
   | ... and [4 
more](https://codecov.io/gh/apache/apisix-ingress-controller/pull/939/diff?src=pr=tree-more_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | |
   
   --
   
   [Continue to review full report at 

[GitHub] [apisix-ingress-controller] tao12345666333 opened a new pull request #939: feat: introduce v2 apiversion

2022-03-27 Thread GitBox


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


   Signed-off-by: Jintao Zhang 
   
   
   
   ### Type of change:
   
   
   
   - [ ] Bugfix
   - [x] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   ### What this PR does / why we need it:
   
   
   
   follow #707 
   ### 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-ingress-controller#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-go-plugin-runner] Goxiaoy commented on issue #74: bug: pkgHTTP.Request RespHeader() Add override previous value

2022-03-27 Thread GitBox


Goxiaoy commented on issue #74:
URL: 
https://github.com/apache/apisix-go-plugin-runner/issues/74#issuecomment-1079964248


   
https://github.com/apache/apisix/blob/f624fb0a4d33e5aa674ec659e9d778da2ef9860f/apisix/plugins/ext-plugin/init.lua#L626-L635
   
   ```
   local len = rewrite:RespHeadersLength()
   if len > 0 then
   for i = 1, len do
   local entry = rewrite:RespHeaders(i)
   local name = entry:Name()
   if exclude_resp_header[str_lower(name)] == nil then
   core.response.set_header(name, entry:Value())
   end
   end
   end
   ```
   Codes here should take multiple header with same name into account
   
   @rampagecong @shuaijinchao 


-- 
This is an automated message from the 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] ComradeProgrammer commented on pull request #6382: feat: add auth plugin for casdoor

2022-03-27 Thread GitBox


ComradeProgrammer commented on pull request #6382:
URL: https://github.com/apache/apisix/pull/6382#issuecomment-1079957130


   revisions have been made


-- 
This is an automated message from the 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] ComradeProgrammer commented on a change in pull request #6382: feat: add auth plugin for casdoor

2022-03-27 Thread GitBox


ComradeProgrammer commented on a change in pull request #6382:
URL: https://github.com/apache/apisix/pull/6382#discussion_r835926106



##
File path: apisix/plugins/authz-casdoor.lua
##
@@ -0,0 +1,175 @@
+--
+-- 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 core = require("apisix.core")
+local http = require("resty.http")
+local session = require("resty.session")
+local ngx = ngx
+local rand = math.random
+local tostring = tostring
+
+
+local plugin_name = "authz-casdoor"
+local schema = {
+type = "object",
+properties = {
+-- Note: endpoint_addr and callback_url should not end with '/'
+endpoint_addr = {type = "string", pattern = "^[^%?]+[^/]$"},
+client_id = {type = "string"},
+client_secret = {type = "string"},
+callback_url = {type = "string", pattern = "^[^%?]+[^/]$"}
+},
+required = {
+"callback_url", "endpoint_addr", "client_id", "client_secret"
+}
+}
+
+local _M = {
+version = 0.1,
+priority = 2559,
+name = plugin_name,
+schema = schema
+}
+
+local function fetch_access_token(code, conf)
+local client = http.new()
+local url = conf.endpoint_addr .. "/api/login/oauth/access_token"
+local res, err = client:request_uri(url, {
+method = "POST",
+body =  ngx.encode_args({
+code = code,
+grant_type = "authorization_code",
+client_id = conf.client_id,
+client_secret = conf.client_secret
+}),
+headers = {
+["Content-Type"] = "application/x-www-form-urlencoded"
+}
+})
+
+if not res then
+return nil, nil, err
+end
+local data, err = core.json.decode(res.body)
+
+if err or not data then
+err = "failed to parse casdoor response data: " .. err .. ", body: " 
.. res.body
+return nil, nil, err
+end
+
+if not data.access_token then
+return nil, nil,
+   "failed when accessing token: no access_token contained"
+end
+-- In the reply of casdoor, setting expires_in to 0 indicates that the 
access_token is invalid.
+if not data.expires_in or data.expires_in == 0 then
+return nil, nil, "failed when accessing token: invalid access_token"
+end
+
+return data.access_token, data.expires_in, nil
+end
+
+
+function _M.check_schema(conf)
+return core.schema.check(schema, conf)
+end
+
+
+function _M.access(conf, ctx)
+local current_uri = ctx.var.uri
+local session_obj_read, session_present = session.open()
+-- step 1: check whether hits the callback
+local m, err = ngx.re.match(conf.callback_url, ".+//[^/]+(/.*)", "jo")
+if err or not m then
+core.log.error(err)
+return 503
+end
+local real_callback_url = m[1]
+if current_uri == real_callback_url then
+if not session_present then
+err = "no session found"
+core.log.error(err)
+return 503
+end
+local state_in_session = session_obj_read.data.state
+if not state_in_session then
+err = "no state found in session"
+core.log.error(err)
+return 503
+end
+local args = core.request.get_uri_args(ctx)
+if not args or not args.code or not args.state then
+err = "failed when accessing token. Invalid code or state"
+core.log.error(err)
+return 400, err
+end
+if args.state ~= tostring(state_in_session) then
+err = "invalid state"
+core.log.error(err)
+return 400, err
+end
+if not args.code then
+err = "invalid code"
+core.log.error(err)
+return 400, err
+end
+local access_token, lifetime, err =
+fetch_access_token(args.code, conf)
+if err then
+core.log.error(err)
+return 503
+end
+if access_token then
+local original_url = session_obj_read.data.original_uri
+if not original_url then
+err = "no original_url found in session"
+core.log.error(err)
+return 503
+

[GitHub] [apisix-ingress-controller] tao12345666333 merged pull request #933: doc: add doc about installing apisix ingress with kind

2022-03-27 Thread GitBox


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


   


-- 
This is an automated message from the 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-ingress-controller] branch master updated: doc: add doc about installing apisix ingress with kind (#933)

2022-03-27 Thread zhangjintao
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new cb45119  doc: add doc about installing apisix ingress with kind (#933)
cb45119 is described below

commit cb45119b4c4ec7e9814487b4f29789b4778075e5
Author: John Chever 
AuthorDate: Sun Mar 27 22:58:06 2022 +0800

doc: add doc about installing apisix ingress with kind (#933)
---
 docs/en/latest/deployments/kind.md | 70 ++
 1 file changed, 70 insertions(+)

diff --git a/docs/en/latest/deployments/kind.md 
b/docs/en/latest/deployments/kind.md
new file mode 100644
index 000..0c44c34
--- /dev/null
+++ b/docs/en/latest/deployments/kind.md
@@ -0,0 +1,70 @@
+---
+title: Install Ingress APISIX on Kind
+---
+
+
+
+This document explains how to install Ingress APISIX on 
[kind](https://kind.sigs.k8s.io/).
+
+## Prerequisites
+
+* Install [kind](https://kind.sigs.k8s.io/docs/user/quick-start/).
+* Install [Helm](https://helm.sh/).
+* Install [kubectl](https://kubernetes.io/docs/tasks/tools/).
+
+If you encounter some strange problems, please consider whether it is a 
version compatibility issue.
+
+The versions of kind(==v0.12.0), kubectl(==v1.23.5) and helm(==v3.8.1) used in 
this document are confirmed feasible.
+
+## Create Cluster
+
+The quickest way to get a taste is to run command as follows and then go to 
the next section.
+
+```shell
+kind create cluster
+```
+
+You can click this 
[link](https://kind.sigs.k8s.io/docs/user/ingress/#create-cluster) for more 
information.
+
+## Install APISIX and apisix-ingress-controller
+
+As the data plane of apisix-ingress-controller, [Apache 
APISIX](http://apisix.apache.org/) can be deployed at the same time using Helm 
chart.
+
+```shell
+helm repo add apisix https://charts.apiseven.com
+helm repo add bitnami https://charts.bitnami.com/bitnami
+helm repo update
+kubectl create ns ingress-apisix
+helm install apisix apisix/apisix \
+  --set gateway.type=NodePort \
+  --set ingress-controller.enabled=true \
+  --namespace ingress-apisix \
+  --set ingress-controller.config.apisix.serviceNamespace=ingress-apisix
+kubectl get service --namespace ingress-apisix
+```
+
+Five Service resources were created.
+
+* `apisix-gateway`, which processes the real traffic;
+* `apisix-admin`, which acts as the control plane to process all the 
configuration changes.
+* `apisix-ingress-controller`, which exposes apisix-ingress-controller's 
metrics.
+* `apisix-etcd` and `apisix-etcd-headless` for etcd service and internal 
communication.
+
+Now try to create some 
[resources](https://github.com/apache/apisix-ingress-controller/tree/master/docs/en/latest/concepts)
 to verify the running of Ingress APISIX. As a minimalist example, see 
[proxy-the-httpbin-service](../practices/proxy-the-httpbin-service.md) to learn 
how to apply resources to drive the apisix-ingress-controller.


[GitHub] [apisix-ingress-controller] gxthrj closed issue #120: feat: Combine ApisixRoute, ApisixService, ApisixUpstream into one resource object

2022-03-27 Thread GitBox


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


   


-- 
This is an automated message from the 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] gxthrj commented on issue #120: feat: Combine ApisixRoute, ApisixService, ApisixUpstream into one resource object

2022-03-27 Thread GitBox


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


   OK, let's close this stale discussion.


-- 
This is an automated message from the 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 #937: feat: support forward-auth plugin

2022-03-27 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#937](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (a3d43d2) into 
[master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/4da91b7971d3defd137f35de84f107612e6f96bd?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (4da91b7) will **increase** coverage by `0.15%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@Coverage Diff @@
   ##   master #937  +/-   ##
   ==
   + Coverage   32.89%   33.05%   +0.15% 
   ==
 Files  72   73   +1 
 Lines7661 7679  +18 
   ==
   + Hits 2520 2538  +18 
 Misses   4865 4865  
 Partials  276  276  
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[pkg/kube/translation/annotations.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMuZ28=)
 | `61.53% <ø> (ø)` | |
   | 
[pkg/kube/translation/annotations/forward\_auth.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvZm9yd2FyZF9hdXRoLmdv)
 | `100.00% <100.00%> (ø)` | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?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/937?src=pr=footer_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
 Last update 
[4da91b7...a3d43d2](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?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-go-plugin-runner] Goxiaoy opened a new issue #74: bug: pkgHTTP.Request RespHeader() Add override previous value

2022-03-27 Thread GitBox


Goxiaoy opened a new issue #74:
URL: https://github.com/apache/apisix-go-plugin-runner/issues/74


   ### Issue description
   ```
   w http.ResponseWriter, r pkgHTTP.Request
   r.RespHeader().Add("Set-Cookie","a=a; Expires=Wed, 21 Oct 2023 07:28:00 GMT; 
Secure; HttpOnly")
   r.RespHeader().Add("Set-Cookie","b=b; Expires=Wed, 21 Oct 2023 07:28:00 GMT; 
Secure; HttpOnly")
   ```
   
   Cookie `a` is missing in the response header
   
   Workaround
   
   Concat resp header before return
   ```
w http.ResponseWriter, r pkgHTTP.Request
r.RespHeader().Add("Set-Cookie","a=a; Expires=Wed, 21 Oct 2023 07:28:00 
GMT; Secure; HttpOnly")
r.RespHeader().Add("Set-Cookie","b=b; Expires=Wed, 21 Oct 2023 07:28:00 
GMT; Secure; HttpOnly")
   
if len(r.RespHeader().Values("Set-Cookie")) > 0 {
r.RespHeader().Set("Set-Cookie", 
strings.Join(r.RespHeader().Values("Set-Cookie"), "; "))
}
   ```
   
   ### Environment
   
   * APISIX Go Plugin Runner's version: dee7fa0167af0ed8cdcd87d4321a43b194f2a7ed
   * APISIX version: 2.13.0
   * Go version: 1.18
   * OS (cmd: `uname -a`): centos
   
   ### Minimal test code / Steps to reproduce the issue
   
   1. Start APISIX on docker 
   2. Set Plugin filter codes
   ```
   Filter(conf interface{}, w http.ResponseWriter, r pkgHTTP.Request)
   {
 r.RespHeader().Add("Set-Cookie","a=a; Expires=Wed, 21 Oct 2023 07:28:00 
GMT; Secure; HttpOnly")
 r.RespHeader().Add("Set-Cookie","b=b; Expires=Wed, 21 Oct 2023 07:28:00 
GMT; Secure; HttpOnly")
 return
   }
   
   ```
   4. Cookie `a` is missing in the response header
   
   ### What's the actual result? (including assertion message & call stack if 
applicable)
   
   Cookie `b` can be found, Cookie `a` is missing
   
   ### What's the expected result?
   Both cookie `a` and `b` could be found


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

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] Goxiaoy commented on issue #69: request help: How to pass headers from plugin runner to upstream

2022-03-27 Thread GitBox


Goxiaoy commented on issue #69:
URL: 
https://github.com/apache/apisix-go-plugin-runner/issues/69#issuecomment-1079931978


   Works for me
   ```
   w http.ResponseWriter, r pkgHTTP.Request
   r.Header().Set("x-team-info","abc")
   ```


-- 
This is an automated message from the 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 #2290: feat: added form function to authz-casbin plugin

2022-03-27 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-dashboard/pull/2290?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#2290](https://codecov.io/gh/apache/apisix-dashboard/pull/2290?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (0672346) into 
[master](https://codecov.io/gh/apache/apisix-dashboard/commit/0db2d464049b0d8ae4dcde1c71a68c7ea10a2a18?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (0db2d46) will **decrease** coverage by `1.64%`.
   > The diff coverage is `11.76%`.
   
   ```diff
   @@Coverage Diff @@
   ##   master#2290  +/-   ##
   ==
   - Coverage   69.87%   68.23%   -1.65% 
   ==
 Files 184  132  -52 
 Lines7274 3438-3836 
 Branches  829  831   +2 
   ==
   - Hits 5083 2346-2737 
   + Misses   1897 1092 -805 
   + Partials  2940 -294 
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | backend-e2e-test | `?` | |
   | backend-e2e-test-ginkgo | `?` | |
   | backend-unit-test | `?` | |
   | frontend-e2e-test | `68.23% <11.76%> (+0.11%)` | :arrow_up: |
   
   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/2290?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[web/src/components/Plugin/UI/plugin.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2290/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9wbHVnaW4udHN4)
 | `84.61% <0.00%> (-7.06%)` | :arrow_down: |
   | 
[web/src/components/Plugin/UI/authz-casbin.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2290/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1BsdWdpbi9VSS9hdXRoei1jYXNiaW4udHN4)
 | `13.33% <13.33%> (ø)` | |
   | 
[...omponents/Upstream/components/UpstreamSelector.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2290/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL2NvbXBvbmVudHMvVXBzdHJlYW1TZWxlY3Rvci50c3g=)
 | `85.71% <0.00%> (-14.29%)` | :arrow_down: |
   | 
[web/src/helpers.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2290/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9oZWxwZXJzLnRzeA==)
 | `70.49% <0.00%> (-3.28%)` | :arrow_down: |
   | 
[web/src/components/Upstream/UpstreamForm.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2290/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9jb21wb25lbnRzL1Vwc3RyZWFtL1Vwc3RyZWFtRm9ybS50c3g=)
 | `90.12% <0.00%> (-2.29%)` | :arrow_down: |
   | 
[web/src/pages/PluginTemplate/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2290/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9QbHVnaW5UZW1wbGF0ZS9MaXN0LnRzeA==)
 | `71.42% <0.00%> (-1.08%)` | :arrow_down: |
   | 
[web/src/pages/Service/List.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2290/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9TZXJ2aWNlL0xpc3QudHN4)
 | `94.11% <0.00%> (-0.76%)` | :arrow_down: |
   | 
[web/src/pages/Consumer/Create.tsx](https://codecov.io/gh/apache/apisix-dashboard/pull/2290/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-d2ViL3NyYy9wYWdlcy9Db25zdW1lci9DcmVhdGUudHN4)
 | `82.69% <0.00%> (ø)` | |
   | 

[GitHub] [apisix] spacewander commented on issue #6709: feat: file-log-plugin should combine with log-rotate

2022-03-27 Thread GitBox


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


   This is not easy to combine these two plugins. But we can make a try.


-- 
This is an automated message from the 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 #6727: ci: remove unnecessary step

2022-03-27 Thread GitBox


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


   


-- 
This is an automated message from the 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 (c46fe49 -> f624fb0)

2022-03-27 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 c46fe49  docs: added an Introductory section to the "Getting started" 
(#6554)
 add f624fb0  ci: remove unnecessary step (#6727)

No new revisions were added by this update.

Summary of changes:
 .github/workflows/kubernetes-ci.yml | 7 ---
 .github/workflows/tars-ci.yml   | 7 ---
 2 files changed, 14 deletions(-)


[GitHub] [apisix] spacewander closed issue #6706: help request: the "Extract branch name" step is unnecessary in some workflow

2022-03-27 Thread GitBox


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


   


-- 
This is an automated message from the 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 #6713: fix(batch-requests): read trailers

2022-03-27 Thread GitBox


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


   You can refer to 
https://github.com/apache/apisix/blob/master/docs/en/latest/internal/testing-framework.md.


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

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 #6728: bug: Can not access opentelemetry header in ext-plugin-pre-req plugin

2022-03-27 Thread GitBox


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


   Interesting. It is expected has been fixed in 
https://github.com/apache/apisix/commit/210575cc08e8296083332caa17e259f83ef3beca.
 I will try to reproduce it tomorrow.


-- 
This is an automated message from the 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] juzhiyuan commented on pull request #6554: docs: added an Introductory section to the "Getting started"

2022-03-27 Thread GitBox


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


   Hi, @1502shivam-singh, thanks for your review and merge! Before merging, 
please remove unnecessary commit messages  or it will make this happen.
   
   
![image](https://user-images.githubusercontent.com/2106987/160280541-6ee49799-0d3b-455c-9ac1-921cd433d7af.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] spacewander commented on a change in pull request #6382: feat: add auth plugin for casdoor

2022-03-27 Thread GitBox


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



##
File path: apisix/plugins/authz-casdoor.lua
##
@@ -0,0 +1,175 @@
+--
+-- 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 core = require("apisix.core")
+local http = require("resty.http")
+local session = require("resty.session")
+local ngx = ngx
+local rand = math.random
+local tostring = tostring
+
+
+local plugin_name = "authz-casdoor"
+local schema = {
+type = "object",
+properties = {
+-- Note: endpoint_addr and callback_url should not end with '/'
+endpoint_addr = {type = "string", pattern = "^[^%?]+[^/]$"},
+client_id = {type = "string"},
+client_secret = {type = "string"},
+callback_url = {type = "string", pattern = "^[^%?]+[^/]$"}
+},
+required = {
+"callback_url", "endpoint_addr", "client_id", "client_secret"
+}
+}
+
+local _M = {
+version = 0.1,
+priority = 2559,
+name = plugin_name,
+schema = schema
+}
+
+local function fetch_access_token(code, conf)
+local client = http.new()
+local url = conf.endpoint_addr .. "/api/login/oauth/access_token"
+local res, err = client:request_uri(url, {
+method = "POST",
+body =  ngx.encode_args({
+code = code,
+grant_type = "authorization_code",
+client_id = conf.client_id,
+client_secret = conf.client_secret
+}),
+headers = {
+["Content-Type"] = "application/x-www-form-urlencoded"
+}
+})
+
+if not res then
+return nil, nil, err
+end
+local data, err = core.json.decode(res.body)
+
+if err or not data then
+err = "failed to parse casdoor response data: " .. err .. ", body: " 
.. res.body
+return nil, nil, err
+end
+
+if not data.access_token then
+return nil, nil,
+   "failed when accessing token: no access_token contained"
+end
+-- In the reply of casdoor, setting expires_in to 0 indicates that the 
access_token is invalid.
+if not data.expires_in or data.expires_in == 0 then
+return nil, nil, "failed when accessing token: invalid access_token"
+end
+
+return data.access_token, data.expires_in, nil
+end
+
+
+function _M.check_schema(conf)
+return core.schema.check(schema, conf)
+end
+
+
+function _M.access(conf, ctx)
+local current_uri = ctx.var.uri
+local session_obj_read, session_present = session.open()
+-- step 1: check whether hits the callback
+local m, err = ngx.re.match(conf.callback_url, ".+//[^/]+(/.*)", "jo")
+if err or not m then
+core.log.error(err)
+return 503
+end
+local real_callback_url = m[1]
+if current_uri == real_callback_url then
+if not session_present then
+err = "no session found"
+core.log.error(err)
+return 503
+end
+local state_in_session = session_obj_read.data.state
+if not state_in_session then
+err = "no state found in session"
+core.log.error(err)
+return 503
+end
+local args = core.request.get_uri_args(ctx)
+if not args or not args.code or not args.state then
+err = "failed when accessing token. Invalid code or state"
+core.log.error(err)
+return 400, err
+end
+if args.state ~= tostring(state_in_session) then
+err = "invalid state"
+core.log.error(err)
+return 400, err
+end
+if not args.code then
+err = "invalid code"
+core.log.error(err)
+return 400, err
+end
+local access_token, lifetime, err =
+fetch_access_token(args.code, conf)
+if err then
+core.log.error(err)
+return 503
+end
+if access_token then

Review comment:
   This branch can be saved

##
File path: apisix/plugins/authz-casdoor.lua
##
@@ -0,0 +1,175 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  

[GitHub] [apisix] kwanhur opened a new pull request #6730: ci(lint): filter files by git-ls-files and remove subcommand grep

2022-03-27 Thread GitBox


kwanhur opened a new pull request #6730:
URL: https://github.com/apache/apisix/pull/6730


   ### Description
   
   
   
   Target: Improving script `git ls-files` functionality and redundancy.
   Changes: filter files with `git ls-files`, remove `grep`.
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, 
please discuss on the [APISIX 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-ingress-controller] codecov-commenter edited a comment on pull request #937: feat: support forward-auth plugin

2022-03-27 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#937](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (6b21a53) into 
[master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/4da91b7971d3defd137f35de84f107612e6f96bd?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (4da91b7) will **increase** coverage by `0.15%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@Coverage Diff @@
   ##   master #937  +/-   ##
   ==
   + Coverage   32.89%   33.05%   +0.15% 
   ==
 Files  72   73   +1 
 Lines7661 7679  +18 
   ==
   + Hits 2520 2538  +18 
 Misses   4865 4865  
 Partials  276  276  
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[pkg/kube/translation/annotations.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMuZ28=)
 | `61.53% <ø> (ø)` | |
   | 
[pkg/kube/translation/annotations/forward\_auth.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvZm9yd2FyZF9hdXRoLmdv)
 | `100.00% <100.00%> (ø)` | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?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/937?src=pr=footer_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
 Last update 
[4da91b7...6b21a53](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?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-ingress-controller] codecov-commenter edited a comment on pull request #937: feat: support forward-auth plugin

2022-03-27 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#937](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (412026a) into 
[master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/4da91b7971d3defd137f35de84f107612e6f96bd?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (4da91b7) will **increase** coverage by `0.15%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@Coverage Diff @@
   ##   master #937  +/-   ##
   ==
   + Coverage   32.89%   33.05%   +0.15% 
   ==
 Files  72   73   +1 
 Lines7661 7679  +18 
   ==
   + Hits 2520 2538  +18 
 Misses   4865 4865  
 Partials  276  276  
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[pkg/kube/translation/annotations.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMuZ28=)
 | `61.53% <ø> (ø)` | |
   | 
[pkg/kube/translation/annotations/forward\_auth.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvZm9yd2FyZF9hdXRoLmdv)
 | `100.00% <100.00%> (ø)` | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?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/937?src=pr=footer_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
 Last update 
[4da91b7...412026a](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?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-ingress-controller] codecov-commenter edited a comment on pull request #937: feat: support forward-auth plugin

2022-03-27 Thread GitBox


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


   # 
[Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#937](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (f90d9ff) into 
[master](https://codecov.io/gh/apache/apisix-ingress-controller/commit/4da91b7971d3defd137f35de84f107612e6f96bd?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (4da91b7) will **increase** coverage by `0.15%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head f90d9ff differs from pull request most recent 
head 412026a. Consider uploading reports for the commit 412026a to get more 
accurate results
   
   ```diff
   @@Coverage Diff @@
   ##   master #937  +/-   ##
   ==
   + Coverage   32.89%   33.05%   +0.15% 
   ==
 Files  72   73   +1 
 Lines7661 7679  +18 
   ==
   + Hits 2520 2538  +18 
 Misses   4865 4865  
 Partials  276  276  
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[pkg/kube/translation/annotations.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMuZ28=)
 | `61.53% <ø> (ø)` | |
   | 
[pkg/kube/translation/annotations/forward\_auth.go](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-cGtnL2t1YmUvdHJhbnNsYXRpb24vYW5ub3RhdGlvbnMvZm9yd2FyZF9hdXRoLmdv)
 | `100.00% <100.00%> (ø)` | |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?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/937?src=pr=footer_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation).
 Last update 
[4da91b7...412026a](https://codecov.io/gh/apache/apisix-ingress-controller/pull/937?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] domyway commented on issue #6719: bug: load opentelemetry so, curl /apisix/prometheus/metrics coredump

2022-03-27 Thread GitBox


domyway commented on issue #6719:
URL: https://github.com/apache/apisix/issues/6719#issuecomment-1079908032


   thanks ,  I check the code.


-- 
This is an automated message from the 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] 1502shivam-singh merged pull request #6554: docs: added an Introductory section to the "Getting started"

2022-03-27 Thread GitBox


1502shivam-singh merged pull request #6554:
URL: https://github.com/apache/apisix/pull/6554


   


-- 
This is an automated message from the 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: docs: added an Introductory section to the "Getting started" (#6554)

2022-03-27 Thread singhsh
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new c46fe49  docs: added an Introductory section to the "Getting started" 
(#6554)
c46fe49 is described below

commit c46fe4997e2bcb048446e11ba26390e1912744e6
Author: Anita-ihuman <62384659+anita-ihu...@users.noreply.github.com>
AuthorDate: Sun Mar 27 11:03:49 2022 +0100

docs: added an Introductory section to the "Getting started" (#6554)

* Added an introductory secction to Apache APISIX

Signed-off-by: Anita-ihuman 

* Updated the intoductionmwith the feature of APISIX

Signed-off-by: Anita-ihuman 

* updates PR

Signed-off-by: Anita-ihuman 

* Update docs/en/latest/getting-started.md

Co-authored-by: Shivam Singh 

* Update docs/en/latest/getting-started.md

Co-authored-by: Shivam Singh 

* Update docs/en/latest/getting-started.md

Co-authored-by: Shivam Singh 

* Update docs/en/latest/getting-started.md

Co-authored-by: Shivam Singh 

* Update docs/en/latest/getting-started.md

Co-authored-by: Shivam Singh 

* Update docs/en/latest/getting-started.md

Co-authored-by: yilinzeng <36651058+yzen...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: yilinzeng <36651058+yzen...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Sure I will effect that now.

Co-authored-by: yilinzeng <36651058+yzen...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: yilinzeng <36651058+yzen...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: yilinzeng <36651058+yzen...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: yilinzeng <36651058+yzen...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: yilinzeng <36651058+yzen...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: Bisakh 

* Update docs/en/latest/getting-started.md

Co-authored-by: Avinal Kumar 

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: leslie <59061168+leslie-ts...@users.noreply.github.com>

* Update docs/en/latest/getting-started.md

Co-authored-by: Bisakh 

* updates PR

Signed-off-by: Anita-ihuman 

* updates PR
 

[GitHub] [apisix] soulbird commented on issue #6719: bug: load opentelemetry so, curl /apisix/prometheus/metrics coredump

2022-03-27 Thread GitBox


soulbird commented on issue #6719:
URL: https://github.com/apache/apisix/issues/6719#issuecomment-1079876137


   hi, according to your error log, I found two problems, one is coredumps, 
related errorlog:
   ```bash
   [alert] 1#1: worker process 46 exited on signal 11
   ```
   I reproduced the problem with your steps, using gdb to view the stack 
information:
   ```bash
   Core was generated by `nginx: worker process 
'.
   Program terminated with signal SIGSEGV, Segmentation fault.
   #0  0x7f714cd9859c in CreateTraceContext(ngx_http_request_s*, 
ngx_variable_value_t*) () from 
/usr/local/openresty/nginx/modules/otel_ngx_module.so
   [Current thread is 1 (LWP 107)]
   (gdb) bt
   #0  0x7f714cd9859c in CreateTraceContext(ngx_http_request_s*, 
ngx_variable_value_t*) () from 
/usr/local/openresty/nginx/modules/otel_ngx_module.so
   #1  0x7f714cd98856 in StartNgxSpan(ngx_http_request_s*) () from 
/usr/local/openresty/nginx/modules/otel_ngx_module.so
   #2  0x55b01c46902d in ngx_http_core_rewrite_phase (r=0x7f713a3d1840, 
ph=) at src/http/ngx_http_core_module.c:935
   #3  0x55b01c4648f5 in ngx_http_core_run_phases (r=0x7f713a3d1840) at 
src/http/ngx_http_core_module.c:881
   #4  0x55b01c46d5d0 in ngx_http_run_posted_requests (c=0x7f713aa4ecb0) at 
src/http/ngx_http_request.c:2435
   #5  0x55b01c470184 in ngx_http_process_request_line (rev=0x7f713a954810) 
at src/http/ngx_http_request.c:1175
   #6  0x55b01c4558c8 in ngx_epoll_process_events (cycle=, 
timer=, flags=) at 
src/event/modules/ngx_epoll_module.c:901
   #7  0x55b01c44b7e4 in ngx_process_events_and_timers 
(cycle=cycle@entry=0x7f714ce291e0) at src/event/ngx_event.c:257
   #8  0x55b01c453778 in ngx_worker_process_cycle 
(cycle=cycle@entry=0x7f714ce291e0, data=data@entry=0x1) at 
src/os/unix/ngx_process_cycle.c:782
   #9  0x55b01c451df9 in ngx_spawn_process 
(cycle=cycle@entry=0x7f714ce291e0, proc=0x55b01c453700 
, data=0x1, 
   name=0x55b01c584cf3 "worker process", respawn=respawn@entry=1) at 
src/os/unix/ngx_process.c:199
   #10 0x55b01c45467f in ngx_reap_children (cycle=0x7f714ce291e0) at 
src/os/unix/ngx_process_cycle.c:654
   #11 ngx_master_process_cycle (cycle=) at 
src/os/unix/ngx_process_cycle.c:180
   #12 0x55b01c42991e in main (argc=, argv=) 
at src/core/nginx.c:386
   ```
   It seems that coredumps occur in external dynamic libraries, you may need to 
check this yourself first
   
   Another question is about ldap, the related errorlog is:
   ```bash
   [error] 93#93: *768 [lua] plugin.lua:109: load_plugin(): failed to load 
plugin [ldap-auth] err: error loading module 'lualdap' from file 
'/usr/local/apisix//deps/lib/lua/5.1/lua
   Error loading shared library libldap-2.4.so.2: No such file or 
directory (needed by /usr/local/apisix//deps/lib/lua/5.1/lualdap.so), context: 
init_worker_by_lua*
   ```
   It looks like it's because libldap-2.4.so.2 is missing from the system. The 
alpine image does not have this library installed by default. You can manually 
install this library first. We will update 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] soulbird removed a comment on issue #6719: bug: load opentelemetry so, curl /apisix/prometheus/metrics coredump

2022-03-27 Thread GitBox


soulbird removed a comment on issue #6719:
URL: https://github.com/apache/apisix/issues/6719#issuecomment-1079874368


   hi, according to your error log, I found two problems, one is coredumps, 
related errorlog:
   ```bash
   [alert] 1#1: worker process 46 exited on signal 11
   ```
   I reproduced the problem with your steps, using gdb to view the stack 
information:
   ```bash
   Core was generated by `nginx: worker process 
'.
   Program terminated with signal SIGSEGV, Segmentation fault.
   #0  0x7f714cd9859c in CreateTraceContext(ngx_http_request_s*, 
ngx_variable_value_t*) () from 
/usr/local/openresty/nginx/modules/otel_ngx_module.so
   [Current thread is 1 (LWP 107)]
   (gdb) bt
   #0  0x7f714cd9859c in CreateTraceContext(ngx_http_request_s*, 
ngx_variable_value_t*) () from 
/usr/local/openresty/nginx/modules/otel_ngx_module.so
   #1  0x7f714cd98856 in StartNgxSpan(ngx_http_request_s*) () from 
/usr/local/openresty/nginx/modules/otel_ngx_module.so
   #2  0x55b01c46902d in ngx_http_core_rewrite_phase (r=0x7f713a3d1840, 
ph=) at src/http/ngx_http_core_module.c:935
   #3  0x55b01c4648f5 in ngx_http_core_run_phases (r=0x7f713a3d1840) at 
src/http/ngx_http_core_module.c:881
   #4  0x55b01c46d5d0 in ngx_http_run_posted_requests (c=0x7f713aa4ecb0) at 
src/http/ngx_http_request.c:2435
   #5  0x55b01c470184 in ngx_http_process_request_line (rev=0x7f713a954810) 
at src/http/ngx_http_request.c:1175
   #6  0x55b01c4558c8 in ngx_epoll_process_events (cycle=, 
timer=, flags=) at 
src/event/modules/ngx_epoll_module.c:901
   #7  0x55b01c44b7e4 in ngx_process_events_and_timers 
(cycle=cycle@entry=0x7f714ce291e0) at src/event/ngx_event.c:257
   #8  0x55b01c453778 in ngx_worker_process_cycle 
(cycle=cycle@entry=0x7f714ce291e0, data=data@entry=0x1) at 
src/os/unix/ngx_process_cycle.c:782
   #9  0x55b01c451df9 in ngx_spawn_process 
(cycle=cycle@entry=0x7f714ce291e0, proc=0x55b01c453700 
, data=0x1, 
   name=0x55b01c584cf3 "worker process", respawn=respawn@entry=1) at 
src/os/unix/ngx_process.c:199
   #10 0x55b01c45467f in ngx_reap_children (cycle=0x7f714ce291e0) at 
src/os/unix/ngx_process_cycle.c:654
   #11 ngx_master_process_cycle (cycle=) at 
src/os/unix/ngx_process_cycle.c:180
   #12 0x55b01c42991e in main (argc=, argv=) 
at src/core/nginx.c:386
   ```
   It seems that coredumps occur in external dynamic libraries, you may need to 
check this yourself first
   
   Another question is about ldap, the related errorlog is:
   ```bash
   [error] 93#93: *768 [lua] plugin.lua:109: load_plugin(): failed to load 
plugin [ldap-auth] err: error loading module 'lualdap' from file 
'/usr/local/apisix//deps/lib/lua/5.1/lua
   Error loading shared library libldap-2.4.so.2: No such file or 
directory (needed by /usr/local/apisix//deps/lib/lua/5.1/lualdap.so), context: 
init_worker_by_lua*
   ```
   It looks like it's because libldap-2.4.so.2 is missing from the system. I 
noticed that you replaced the system's depot version in the Dockfile:
   ```bash
   RUN echo 'https://mirrors.ustc.edu.cn/alpine/v3.15/main' > 
/etc/apk/repositories \
   && echo 'https://mirrors.ustc.edu.cn/alpine/v3.15/community' >> 
/etc/apk/repositories\
   ..
   ```
   This seems to be the cause of the problem. The base image of apisix-2.12.0 
is based on alpine 3.12. apisix works fine after I use the command below:
   ```bash
   $ echo 'https://mirrors.ustc.edu.cn/alpine/v3.15/main' > 
/etc/apk/repositories
   $ echo 'https://mirrors.ustc.edu.cn/alpine/v3.15/community' >> 
/etc/apk/repositories
   
   $ apk update
   $ apk add apache2-ldap
   ```
   I will continue to investigate why ldap is missing after you adjust the 
version of 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] soulbird commented on issue #6719: bug: load opentelemetry so, curl /apisix/prometheus/metrics coredump

2022-03-27 Thread GitBox


soulbird commented on issue #6719:
URL: https://github.com/apache/apisix/issues/6719#issuecomment-1079874368


   hi, according to your error log, I found two problems, one is coredumps, 
related errorlog:
   ```bash
   [alert] 1#1: worker process 46 exited on signal 11
   ```
   I reproduced the problem with your steps, using gdb to view the stack 
information:
   ```bash
   Core was generated by `nginx: worker process 
'.
   Program terminated with signal SIGSEGV, Segmentation fault.
   #0  0x7f714cd9859c in CreateTraceContext(ngx_http_request_s*, 
ngx_variable_value_t*) () from 
/usr/local/openresty/nginx/modules/otel_ngx_module.so
   [Current thread is 1 (LWP 107)]
   (gdb) bt
   #0  0x7f714cd9859c in CreateTraceContext(ngx_http_request_s*, 
ngx_variable_value_t*) () from 
/usr/local/openresty/nginx/modules/otel_ngx_module.so
   #1  0x7f714cd98856 in StartNgxSpan(ngx_http_request_s*) () from 
/usr/local/openresty/nginx/modules/otel_ngx_module.so
   #2  0x55b01c46902d in ngx_http_core_rewrite_phase (r=0x7f713a3d1840, 
ph=) at src/http/ngx_http_core_module.c:935
   #3  0x55b01c4648f5 in ngx_http_core_run_phases (r=0x7f713a3d1840) at 
src/http/ngx_http_core_module.c:881
   #4  0x55b01c46d5d0 in ngx_http_run_posted_requests (c=0x7f713aa4ecb0) at 
src/http/ngx_http_request.c:2435
   #5  0x55b01c470184 in ngx_http_process_request_line (rev=0x7f713a954810) 
at src/http/ngx_http_request.c:1175
   #6  0x55b01c4558c8 in ngx_epoll_process_events (cycle=, 
timer=, flags=) at 
src/event/modules/ngx_epoll_module.c:901
   #7  0x55b01c44b7e4 in ngx_process_events_and_timers 
(cycle=cycle@entry=0x7f714ce291e0) at src/event/ngx_event.c:257
   #8  0x55b01c453778 in ngx_worker_process_cycle 
(cycle=cycle@entry=0x7f714ce291e0, data=data@entry=0x1) at 
src/os/unix/ngx_process_cycle.c:782
   #9  0x55b01c451df9 in ngx_spawn_process 
(cycle=cycle@entry=0x7f714ce291e0, proc=0x55b01c453700 
, data=0x1, 
   name=0x55b01c584cf3 "worker process", respawn=respawn@entry=1) at 
src/os/unix/ngx_process.c:199
   #10 0x55b01c45467f in ngx_reap_children (cycle=0x7f714ce291e0) at 
src/os/unix/ngx_process_cycle.c:654
   #11 ngx_master_process_cycle (cycle=) at 
src/os/unix/ngx_process_cycle.c:180
   #12 0x55b01c42991e in main (argc=, argv=) 
at src/core/nginx.c:386
   ```
   It seems that coredumps occur in external dynamic libraries, you may need to 
check this yourself first
   
   Another question is about ldap, the related errorlog is:
   ```bash
   [error] 93#93: *768 [lua] plugin.lua:109: load_plugin(): failed to load 
plugin [ldap-auth] err: error loading module 'lualdap' from file 
'/usr/local/apisix//deps/lib/lua/5.1/lua
   Error loading shared library libldap-2.4.so.2: No such file or 
directory (needed by /usr/local/apisix//deps/lib/lua/5.1/lualdap.so), context: 
init_worker_by_lua*
   ```
   It looks like it's because libldap-2.4.so.2 is missing from the system. I 
noticed that you replaced the system's depot version in the Dockfile:
   ```bash
   RUN echo 'https://mirrors.ustc.edu.cn/alpine/v3.15/main' > 
/etc/apk/repositories \
   && echo 'https://mirrors.ustc.edu.cn/alpine/v3.15/community' >> 
/etc/apk/repositories\
   ..
   ```
   This seems to be the cause of the problem. The base image of apisix-2.12.0 
is based on alpine 3.12. apisix works fine after I use the command below:
   ```bash
   $ echo 'https://mirrors.ustc.edu.cn/alpine/v3.15/main' > 
/etc/apk/repositories
   $ echo 'https://mirrors.ustc.edu.cn/alpine/v3.15/community' >> 
/etc/apk/repositories
   
   $ apk update
   $ apk add apache2-ldap
   ```
   I will continue to investigate why ldap is missing after you adjust the 
version of 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