[GitHub] [apisix] hf400159 opened a new pull request #6284: docs: added cpanm installation commands and remove $ sign

2022-02-09 Thread GitBox


hf400159 opened a new pull request #6284:
URL: https://github.com/apache/apisix/pull/6284


   Modify the en and en docs. The last PR only modified the EN docs.
   
   Add the cpanm installation command.
   Modified etcd startup command to add log output parameters.
   Remove the "$" sign before each command.
   
   * [ ] Did you explain what problem does this PR solve? Or what new features 
have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix/tree/master#community) first**
   


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

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

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




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

2022-02-09 Thread GitBox


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


   we have `set_userinfo_header` attributes in openid-connect plugin, see: 
https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/openid-connect.md#attributes
   
   It looks like this feature is already available.


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

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

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




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

2022-02-09 Thread GitBox


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


   @bisakhmondal @bzp2010 


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

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

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




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

2022-02-09 Thread GitBox


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


   Hello there, Please try the changes below to pass the schema check.
   ```patch
 - name: kafka-logger
   enable: true
   config:
   - broker_list: "{192.168.25.111:9092}"
   + broker_list:
   +   - "192.168.25.111:9092"  
   ```


-- 
This is an automated message from the 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] devops-utils-tools removed a comment on issue #6283: bug: plugin kafka-logger configuration error

2022-02-09 Thread GitBox


devops-utils-tools removed a comment on issue #6283:
URL: https://github.com/apache/apisix/issues/6283#issuecomment-1034573312


   ```
   
   apiVersion: apisix.apache.org/v2beta2
   kind: ApisixRoute
   metadata:
 name: method-route
   spec:
 http:
 - name: method
   backends:
   - serviceName: kubernetes
 servicePort: 443
   match:
 methods:
 - GET
 paths:
 - /111
   plugins:
 - name: request-id
   enable: true
   config:
 include_in_response: true
 header_name: "X-Request-Id"
   
 # - name: skywalking-logger
 #   enable: true
 #   config:
 # sample_ratio: 1
 # service_name: "skywalking-apisix-method"
 # service_instance_name: "skywalking-apisix-method"
 # endpoint_addr: "http://127.0.0.1:12800;
 # report_interval: 30
 # timeout: 15
 # batch_max_size: 3000
 # name: skywalking-logger-method
   
 - name: cors
   enable: true
   
 - name: proxy-rewrite
   enable: true
   config:
 regex_uri:
 - ^/case/(.*)
 - /newcase/$1
   
 - name: kafka-logger
   enable: true
   config:
 broker_list: "{192.168.25.111:9092}"
 
 # broker_list: 
 # - 192.168.25.111:9092
   
 kafka_topic: apisix_method
 name: kafka-logger-method
 key: kafka-logger-method
 producer_type: async
 batch_max_size: 3000
 inactive_timeout: 30
 buffer_duration: 300
 retry_delay: 5
 max_retry_count: 3
   
   
   ```


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

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

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




[GitHub] [apisix] devops-utils-tools commented on issue #6283: bug: plugin kafka-logger configuration error

2022-02-09 Thread GitBox


devops-utils-tools commented on issue #6283:
URL: https://github.com/apache/apisix/issues/6283#issuecomment-1034573312


   ```
   
   apiVersion: apisix.apache.org/v2beta2
   kind: ApisixRoute
   metadata:
 name: method-route
   spec:
 http:
 - name: method
   backends:
   - serviceName: kubernetes
 servicePort: 443
   match:
 methods:
 - GET
 paths:
 - /111
   plugins:
 - name: request-id
   enable: true
   config:
 include_in_response: true
 header_name: "X-Request-Id"
   
 # - name: skywalking-logger
 #   enable: true
 #   config:
 # sample_ratio: 1
 # service_name: "skywalking-apisix-method"
 # service_instance_name: "skywalking-apisix-method"
 # endpoint_addr: "http://127.0.0.1:12800;
 # report_interval: 30
 # timeout: 15
 # batch_max_size: 3000
 # name: skywalking-logger-method
   
 - name: cors
   enable: true
   
 - name: proxy-rewrite
   enable: true
   config:
 regex_uri:
 - ^/case/(.*)
 - /newcase/$1
   
 - name: kafka-logger
   enable: true
   config:
 broker_list: "{192.168.25.111:9092}"
 
 # broker_list: 
 # - 192.168.25.111:9092
   
 kafka_topic: apisix_method
 name: kafka-logger-method
 key: kafka-logger-method
 producer_type: async
 batch_max_size: 3000
 inactive_timeout: 30
 buffer_duration: 300
 retry_delay: 5
 max_retry_count: 3
   
   
   ```


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

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

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




[GitHub] [apisix] devops-utils-tools removed a comment on issue #6283: bug: plugin kafka-logger configuration error

2022-02-09 Thread GitBox


devops-utils-tools removed a comment on issue #6283:
URL: https://github.com/apache/apisix/issues/6283#issuecomment-1034573008


   `
   apiVersion: apisix.apache.org/v2beta2
   kind: ApisixRoute
   metadata:
 name: method-route
   spec:
 http:
 - name: method
   backends:
   - serviceName: kubernetes
 servicePort: 443
   match:
 methods:
 - GET
 paths:
 - /111
   plugins:
 - name: request-id
   enable: true
   config:
 include_in_response: true
 header_name: "X-Request-Id"
   
 # - name: skywalking-logger
 #   enable: true
 #   config:
 # sample_ratio: 1
 # service_name: "skywalking-apisix-method"
 # service_instance_name: "skywalking-apisix-method"
 # endpoint_addr: "http://127.0.0.1:12800;
 # report_interval: 30
 # timeout: 15
 # batch_max_size: 3000
 # name: skywalking-logger-method
   
 - name: cors
   enable: true
   
 - name: proxy-rewrite
   enable: true
   config:
 regex_uri:
 - ^/case/(.*)
 - /newcase/$1
   
 - name: kafka-logger
   enable: true
   config:
 broker_list: "{192.168.25.111:9092}"
 
 # broker_list: 
 # - 192.168.25.111:9092
   
 kafka_topic: apisix_method
 name: kafka-logger-method
 key: kafka-logger-method
 producer_type: async
 batch_max_size: 3000
 inactive_timeout: 30
 buffer_duration: 300
 retry_delay: 5
 max_retry_count: 3
   
   `


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

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

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




[GitHub] [apisix] devops-utils-tools commented on issue #6283: bug: plugin kafka-logger configuration error

2022-02-09 Thread GitBox


devops-utils-tools commented on issue #6283:
URL: https://github.com/apache/apisix/issues/6283#issuecomment-1034573008


   `
   apiVersion: apisix.apache.org/v2beta2
   kind: ApisixRoute
   metadata:
 name: method-route
   spec:
 http:
 - name: method
   backends:
   - serviceName: kubernetes
 servicePort: 443
   match:
 methods:
 - GET
 paths:
 - /111
   plugins:
 - name: request-id
   enable: true
   config:
 include_in_response: true
 header_name: "X-Request-Id"
   
 # - name: skywalking-logger
 #   enable: true
 #   config:
 # sample_ratio: 1
 # service_name: "skywalking-apisix-method"
 # service_instance_name: "skywalking-apisix-method"
 # endpoint_addr: "http://127.0.0.1:12800;
 # report_interval: 30
 # timeout: 15
 # batch_max_size: 3000
 # name: skywalking-logger-method
   
 - name: cors
   enable: true
   
 - name: proxy-rewrite
   enable: true
   config:
 regex_uri:
 - ^/case/(.*)
 - /newcase/$1
   
 - name: kafka-logger
   enable: true
   config:
 broker_list: "{192.168.25.111:9092}"
 
 # broker_list: 
 # - 192.168.25.111:9092
   
 kafka_topic: apisix_method
 name: kafka-logger-method
 key: kafka-logger-method
 producer_type: async
 batch_max_size: 3000
 inactive_timeout: 30
 buffer_duration: 300
 retry_delay: 5
 max_retry_count: 3
   
   `


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

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

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




[GitHub] [apisix] devops-utils-tools removed a comment on issue #6283: bug: plugin kafka-logger configuration error

2022-02-09 Thread GitBox


devops-utils-tools removed a comment on issue #6283:
URL: https://github.com/apache/apisix/issues/6283#issuecomment-1034572823


   `
   
   apiVersion: apisix.apache.org/v2beta2
   kind: ApisixRoute
   metadata:
 name: method-route
   spec:
 http:
 - name: method
   backends:
   - serviceName: kubernetes
 servicePort: 443
   match:
 methods:
 - GET
 paths:
 - /111
   plugins:
 - name: request-id
   enable: true
   config:
 include_in_response: true
 header_name: "X-Request-Id"
   
 # - name: skywalking-logger
 #   enable: true
 #   config:
 # sample_ratio: 1
 # service_name: "skywalking-apisix-method"
 # service_instance_name: "skywalking-apisix-method"
 # endpoint_addr: "http://127.0.0.1:12800;
 # report_interval: 30
 # timeout: 15
 # batch_max_size: 3000
 # name: skywalking-logger-method
   
 - name: cors
   enable: true
   
 - name: proxy-rewrite
   enable: true
   config:
 regex_uri:
 - ^/case/(.*)
 - /newcase/$1
   
 - name: kafka-logger
   enable: true
   config:
 broker_list: "{192.168.25.111:9092}"
 
 # broker_list: 
 # - 192.168.25.111:9092
   
 kafka_topic: apisix_method
 name: kafka-logger-method
 key: kafka-logger-method
 producer_type: async
 batch_max_size: 3000
 inactive_timeout: 30
 buffer_duration: 300
 retry_delay: 5
 max_retry_count: 3
   
   
   
   `


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

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

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




[GitHub] [apisix] devops-utils-tools commented on issue #6283: bug: plugin kafka-logger configuration error

2022-02-09 Thread GitBox


devops-utils-tools commented on issue #6283:
URL: https://github.com/apache/apisix/issues/6283#issuecomment-1034572823


   `
   
   apiVersion: apisix.apache.org/v2beta2
   kind: ApisixRoute
   metadata:
 name: method-route
   spec:
 http:
 - name: method
   backends:
   - serviceName: kubernetes
 servicePort: 443
   match:
 methods:
 - GET
 paths:
 - /111
   plugins:
 - name: request-id
   enable: true
   config:
 include_in_response: true
 header_name: "X-Request-Id"
   
 # - name: skywalking-logger
 #   enable: true
 #   config:
 # sample_ratio: 1
 # service_name: "skywalking-apisix-method"
 # service_instance_name: "skywalking-apisix-method"
 # endpoint_addr: "http://127.0.0.1:12800;
 # report_interval: 30
 # timeout: 15
 # batch_max_size: 3000
 # name: skywalking-logger-method
   
 - name: cors
   enable: true
   
 - name: proxy-rewrite
   enable: true
   config:
 regex_uri:
 - ^/case/(.*)
 - /newcase/$1
   
 - name: kafka-logger
   enable: true
   config:
 broker_list: "{192.168.25.111:9092}"
 
 # broker_list: 
 # - 192.168.25.111:9092
   
 kafka_topic: apisix_method
 name: kafka-logger-method
 key: kafka-logger-method
 producer_type: async
 batch_max_size: 3000
 inactive_timeout: 30
 buffer_duration: 300
 retry_delay: 5
 max_retry_count: 3
   
   
   
   `


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

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

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




[GitHub] [apisix] devops-utils-tools opened a new issue #6283: bug: plugin kafka-logger configuration error

2022-02-09 Thread GitBox


devops-utils-tools opened a new issue #6283:
URL: https://github.com/apache/apisix/issues/6283


   ### Issue description
   
   2022-02-10T15:14:39+08:00error   apisix/route.go:161 failed to 
create route: unexpected status code 400; error message: {"error_msg":"failed 
to check the configuration of plugin kafka-logger err: property \"broker_list\" 
validation failed: wrong type: expected object, got string"}
   
   2022-02-10T15:14:39+08:00warningress/apisix_route.go:292 sync 
ApisixRoute failed, will retry {"object": 
{"Type":1,"Object":{"Key":"default/method-route","OldObject":null,"GroupVersion":"apisix.apache.org/v2beta1"},"Tombstone":null},
 "error": "1 error occurred:\n\t* unexpected status code 400; error message: 
{\"error_msg\":\"failed to check the configuration of plugin kafka-logger err: 
property \\\"broker_list\\\" validation failed: wrong type: expected object, 
got string\"}\n\n\n"}
   W0210 15:14:39.263811   1 warnings.go:70] apisix.apache.org/v2beta1 
ApisixRoute is deprecated; use apisix.apache.org/v2beta2 ApisixRoute
   
   
   
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: 
depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks 
--version`):
   
   
   ### Steps to reproduce
   
   source yaml
   
   
   apiVersion: apisix.apache.org/v2beta2
   kind: ApisixRoute
   metadata:
 name: method-route
   spec:
 http:
 - name: method
   backends:
   - serviceName: kubernetes
 servicePort: 443
   match:
 methods:
 - GET
 paths:
 - /111
   plugins:
 - name: request-id
   enable: true
   config:
 include_in_response: true
 header_name: "X-Request-Id"
   
 # - name: skywalking-logger
 #   enable: true
 #   config:
 # sample_ratio: 1
 # service_name: "skywalking-apisix-method"
 # service_instance_name: "skywalking-apisix-method"
 # endpoint_addr: "http://127.0.0.1:12800;
 # report_interval: 30
 # timeout: 15
 # batch_max_size: 3000
 # name: skywalking-logger-method
   
 - name: cors
   enable: true
   
 - name: proxy-rewrite
   enable: true
   config:
 regex_uri:
 - ^/case/(.*)
 - /newcase/
   
 - name: kafka-logger
   enable: true
   config:
 broker_list: "{192.168.25.111:9092}"
   
#  broker_list:
#  -  192.168.25.111:9092
   
 kafka_topic: apisix_method
 name: kafka-logger-method
 key: kafka-logger-method
 producer_type: async
 batch_max_size: 3000
 inactive_timeout: 30
 buffer_duration: 300
 retry_delay: 5
   
   
   
   ### Actual result
   
   {"object": 
{"Type":1,"Object":{"Key":"default/method-route","OldObject":null,"GroupVersion":"apisix.apache.org/v2beta1"},"Tombstone":null},
 "error": "1 error occurred:\n\t* unexpected status code 400; error message: 
{\"error_msg\":\"failed to check the configuration of plugin kafka-logger err: 
property \\\"broker_list\\\" validation failed: wrong type: expected object, 
got string\"}\n\n\n"}
   
   ### Error log
   
   2022-02-10T15:16:05+08:00warningress/apisix_route.go:292 sync 
ApisixRoute failed, will retry {"object": 
{"Type":1,"Object":{"Key":"default/method-route","OldObject":null,"GroupVersion":"apisix.apache.org/v2beta1"},"Tombstone":null},
 "error": "1 error occurred:\n\t* unexpected status code 400; error message: 
{\"error_msg\":\"failed to check the configuration of plugin kafka-logger err: 
property \\\"broker_list\\\" validation failed: wrong type: expected object, 
got string\"}\n\n\n"}
   W0210 15:16:05.277090   1 warnings.go:70] apisix.apache.org/v2beta1 
ApisixRoute is deprecated; use apisix.apache.org/v2beta2 ApisixRoute
   [GIN] 2022/02/10 - 15:16:07 | 200 |  56.022µs |   192.168.25.63 | GET
  "/healthz"
   [GIN] 2022/02/10 - 15:16:08 | 200 |  78.626µs |   192.168.25.63 | GET
  "/healthz"
   2022-02-10T15:16:08+08:00error   apisix/route.go:161 failed to 
create route: unexpected status code 400; error message: {"error_msg":"failed 
to check the configuration of plugin kafka-logger err: property \"broker_list\" 
validation failed: wrong type: expected object, got string"}
   
   2022-02-10T15:16:08+08:00warningress/apisix_route.go:292 sync 
ApisixRoute failed, will retry 

[GitHub] [apisix] tzssangglass opened a new pull request #6282: test: add test case for nacos service de-duplicate

2022-02-09 Thread GitBox


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


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


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

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 #813: request help: 采用CRD方式,如何通过ApisixRoute配置转发到三方ip:端口服务

2022-02-09 Thread GitBox


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


   @purekeeper sorry for delay. 
   I've been fixing other high priority bugs recently and haven't had time to 
check it yet.
   
   
   
   > @tao12345666333 I read your code and found ingress-controller does not 
support extenel name
   
   Can you post the code link directly?


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

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

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




[GitHub] [apisix-dashboard] zaunist commented on pull request #2308: chore : update to github.com/golang-jwt/jwt/v4

2022-02-09 Thread GitBox


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


   cc @bzp2010. PTAL


-- 
This is an automated message from the 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] purekeeper commented on issue #813: request help: 采用CRD方式,如何通过ApisixRoute配置转发到三方ip:端口服务

2022-02-09 Thread GitBox


purekeeper commented on issue #813:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/813#issuecomment-1034557015


   @tao12345666333I read your code and found ingress-controller does not 
support extenel name


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

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

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




[GitHub] [apisix-go-plugin-runner] Belyenochi commented on issue #34: request help: Introduce context to run plugin

2022-02-09 Thread GitBox


Belyenochi commented on issue #34:
URL: 
https://github.com/apache/apisix-go-plugin-runner/issues/34#issuecomment-1034548435


   > Thanks for your design. My original thought is simpler: we can add a 
method in the Request to return a Context. It works like the one from the 
standard library: https://pkg.go.dev/net/http#Request.Context.
   > 
   > People can fetch it only when they need the Context. And the timeout of 
Context is slightly smaller than 60s so people can still break the execution 
with a custom response before the actual timeout.
   > 
   > There is a tricky place: the timeout of Nginx is per-operation, so when we 
communicate with Nginx again in
   > 
   > 
https://github.com/apache/apisix-go-plugin-runner/blob/6bb1c4bd98ec374638af7ed02931e0efb2604044/internal/http/request.go#L326
   > 
   > 
   > the timer will be reset. Maybe we can handle this in a separate PR.
   
   I will submit a PR asap


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

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

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




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

2022-02-09 Thread GitBox


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


   cc @tzssangglass @shuaijinchao. Please take a look, thanks.


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

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

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




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

2022-02-09 Thread GitBox


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



##
File path: apisix/plugins/clickhouse-logger.lua
##
@@ -0,0 +1,179 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local bp_manager_mod  = require("apisix.utils.batch-processor-manager")
+local log_util= require("apisix.utils.log-util")
+local core= require("apisix.core")
+local http= require("resty.http")
+local url = require("net.url")
+local plugin  = require("apisix.plugin")
+
+local ngx  = ngx
+local tostring = tostring
+
+local plugin_name = "clickhouse-logger"
+local batch_processor_manager = bp_manager_mod.new(plugin_name)
+
+local schema = {
+type = "object",
+properties = {
+endpoint_addr = core.schema.uri_def,
+user = {type = "string", default = ""},
+password = {type = "string", default = ""},
+database = {type = "string", default = ""},
+logtable = {type = "string", default = ""},

Review comment:
   Clickhouse providers HTTP restful style to access DB, prevent SQL 
injection need DBA reasonably assigns permissions for apisix. Other than that, 
I don't know what protection means there are.




-- 
This is an automated message from the 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] dependabot[bot] opened a new pull request #2311: chore(deps): bump actions/setup-go from 2.1.5 to 2.2.0

2022-02-09 Thread GitBox


dependabot[bot] opened a new pull request #2311:
URL: https://github.com/apache/apisix-dashboard/pull/2311


   Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2.1.5 to 
2.2.0.
   
   Release notes
   Sourced from https://github.com/actions/setup-go/releases;>actions/setup-go's 
releases.
   
   Add check-latest input
   In scope of this release we add the https://github-redirect.dependabot.com/actions/setup-go/pull/186;>check-latest
 input. If check-latest is set to true, the action 
first checks if the cached version is the latest one. If the locally cached 
version is not the most up-to-date, a Go version will then be downloaded from 
https://github.com/actions/go-versions;>go-versions repository. By 
default check-latest is set to false.
   Example of usage:
   steps:
 - uses: actions/checkout@v2
 - uses: actions/setup-go@v2
   with:
 go-version: '1.16'
 check-latest: true
 - run: go version
   
   Moreover, we updated @actions/core from 1.2.6 
to 1.6.0
   
   
   
   Commits
   
   https://github.com/actions/setup-go/commit/bfdd3570ce990073878bf10f6b2d79082de49492;>bfdd357
 Implement check-latest flag to check if pre-cached version is 
latest one (#...
   https://github.com/actions/setup-go/commit/44e221478fc6847752e5c574fc7a7b3247b00fbf;>44e2214
 Replace 'ubuntu-16.04' - 'ubuntu-latest' (https://github-redirect.dependabot.com/actions/setup-go/issues/180;>#180)
   See full diff in https://github.com/actions/setup-go/compare/v2.1.5...v2.2.0;>compare 
view
   
   
   
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-go=github_actions=2.1.5=2.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
   
   Dependabot will resolve any conflicts with this PR as long as you don't 
alter it yourself. You can also trigger a rebase manually by commenting 
`@dependabot rebase`.
   
   [//]: # (dependabot-automerge-start)
   [//]: # (dependabot-automerge-end)
   
   ---
   
   
   Dependabot commands and options
   
   
   You can trigger Dependabot actions by commenting on this PR:
   - `@dependabot rebase` will rebase this PR
   - `@dependabot recreate` will recreate this PR, overwriting any edits that 
have been made to it
   - `@dependabot merge` will merge this PR after your CI passes on it
   - `@dependabot squash and merge` will squash and merge this PR after your CI 
passes on it
   - `@dependabot cancel merge` will cancel a previously requested merge and 
block automerging
   - `@dependabot reopen` will reopen this PR if it is closed
   - `@dependabot close` will close this PR and stop Dependabot recreating it. 
You can achieve the same result by closing it manually
   - `@dependabot ignore this major version` will close this PR and stop 
Dependabot creating any more for this major version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this minor version` will close this PR and stop 
Dependabot creating any more for this minor version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this dependency` will close this PR and stop 
Dependabot creating any more for this dependency (unless you reopen the PR or 
upgrade to it yourself)
   
   
   


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

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

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




[apisix-dashboard] branch dependabot/github_actions/actions/setup-go-2.2.0 created (now acdbf45)

2022-02-09 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/github_actions/actions/setup-go-2.2.0
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git.


  at acdbf45  chore(deps): bump actions/setup-go from 2.1.5 to 2.2.0

No new revisions were added by this update.


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

2022-02-09 Thread GitBox


leslie-tsang opened a new pull request #6281:
URL: https://github.com/apache/apisix/pull/6281


   ### What this PR does / why we need it:
   
   
   This PR compresses the `limit-count` plugin's redis lua script.
   This will cut the cost of network traffic by about 15%.
   
   ### Pre-submission checklist:
   
   
   
   * [x] Did you explain what problem does this PR solve? Or what new features 
have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [x] Is this PR backward compatible? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix/tree/master#community) first**
   


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

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

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




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

2022-02-09 Thread GitBox


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



##
File path: t/plugin/clickhouse-logger.t
##
@@ -0,0 +1,227 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+use t::APISIX 'no_plan';
+
+log_level("info");
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+
+my $http_config = $block->http_config // <<_EOC_;
+server {
+listen 10420;
+location /loggly/bulk/tok/tag/bulk {
+content_by_lua_block {
+ngx.req.read_body()
+local data = ngx.req.get_body_data()
+local headers = ngx.req.get_headers()
+ngx.log(ngx.ERR, "loggly body: ", data)
+ngx.log(ngx.ERR, "loggly tags: " .. 
require("toolkit.json").encode(headers["X-LOGGLY-TAG"]))
+ngx.say("ok")
+}
+}
+}
+_EOC_
+
+$block->set_value("http_config", $http_config);
+});
+
+run_tests();
+
+__DATA__
+
+=== TEST 1: Full configuration verification
+--- yaml_config
+plugins:
+  - clickhouse-logger

Review comment:
   ok




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

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

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




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

2022-02-09 Thread GitBox


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



##
File path: t/plugin/clickhouse-logger.t
##
@@ -0,0 +1,227 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+use t::APISIX 'no_plan';
+
+log_level("info");
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+
+my $http_config = $block->http_config // <<_EOC_;
+server {
+listen 10420;
+location /loggly/bulk/tok/tag/bulk {
+content_by_lua_block {
+ngx.req.read_body()
+local data = ngx.req.get_body_data()
+local headers = ngx.req.get_headers()
+ngx.log(ngx.ERR, "loggly body: ", data)

Review comment:
   ok




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

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

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




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

2022-02-09 Thread GitBox


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



##
File path: t/plugin/clickhouse-logger.t
##
@@ -0,0 +1,227 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+use t::APISIX 'no_plan';
+
+log_level("info");
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+
+my $http_config = $block->http_config // <<_EOC_;
+server {
+listen 10420;
+location /loggly/bulk/tok/tag/bulk {

Review comment:
   ok
   




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

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

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




[GitHub] [apisix] tao12345666333 commented on issue #6276: bug: prometheus plugin `enable_export_server=false` not working as expected

2022-02-09 Thread GitBox


tao12345666333 commented on issue #6276:
URL: https://github.com/apache/apisix/issues/6276#issuecomment-1034518899


   Submitted a PR to fix this description #6280 


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

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

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




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

2022-02-09 Thread GitBox


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



##
File path: docs/en/latest/plugins/clickhouse-logger.md
##
@@ -0,0 +1,148 @@
+---
+title: clickhouse-logger
+---
+
+
+
+## Summary
+
+- [**Name**](#name)
+- [**Attributes**](#attributes)
+- [**How To Enable**](#how-to-enable)
+- [**Test Plugin**](#test-plugin)
+- [**Metadata**](#metadata)
+- [**Disable Plugin**](#disable-plugin)
+
+## Name
+
+`clickhouse-logger` is a plugin which push Log data requests to clickhouse.
+
+## Attributes
+
+| 名称 | 类型| 必选项  | 默认值 | 有效值  | 描述  
   |
+|  | --- | -- | - | --- | 
 |
+| endpoint_addr| string  | required   |   | | The 
`clickhouse` endpoint.  |
+| database | string  | required   |   | | The DB 
name to store log.   |
+| logtable | string  | required   |   | | The 
table name. |
+| user | string  | required   |   | | 
clickhouse user. |
+| password | string  | required   |   | | 
clickhouse password. |
+| timeout  | integer | optional   | 3 | [1,...] | Time to 
keep the connection alive after sending a request.   |
+| name | string  | optional   | "clickhouse logger" | | A 
unique identifier to identity the logger. |
+| batch_max_size   | integer | optional   | 100   | [1,...] | Set the 
maximum number of logs sent in each batch. When the number of logs reaches the 
set maximum, all logs will be automatically pushed to the clickhouse.  |
+| max_retry_count  | integer | optional   | 0 | [0,...] | Maximum 
number of retries before removing from the processing pipe line.|
+| retry_delay  | integer | optional   | 1 | [0,...] | Number 
of seconds the process execution should be delayed if the execution fails.  
   |
+| ssl_verify   | boolean | optional   | true  | [true,false] | 
verify ssl. |
+
+## How To Enable
+
+The following is an example of how to enable the `clickhouse-logger` for a 
specific route.
+
+```shell
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+{
+  "plugins": {
+"clickhouse-logger": {
+"user": "default",
+"password": "a",
+"database": "default",
+"logtable": "test",
+"endpoint_addr": "http://127.0.0.1:8123;
+}
+   },
+  "upstream": {
+   "type": "roundrobin",
+   "nodes": {
+   "127.0.0.1:1980": 1
+   }
+  },
+  "uri": "/hello"
+}'
+```
+
+## Test Plugin
+
+> success:
+
+```shell
+$ curl -i http://127.0.0.1:9080/hello
+HTTP/1.1 200 OK
+...
+hello, world
+```
+
+## Metadata
+
+| Name | Type| Requirement | Default   | Valid   | 
Description 
 |
+|  | --- | --- | - | --- | 

 |
+| log_format   | object  | optional| {"host": "$host", "@timestamp": 
"$time_iso8601", "client_ip": "$remote_addr"} | | Log format declared 
as key value pair in JSON format. Only string is supported in the `value` part. 
If the value starts with `$`, it means to get `APISIX` variables or [Nginx 
variable](http://nginx.org/en/docs/varindex.html). |

Review comment:
   ok




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

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

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




[GitHub] [apisix] tao12345666333 opened a new pull request #6280: docs: clearer description for Prometheus plugin

2022-02-09 Thread GitBox


tao12345666333 opened a new pull request #6280:
URL: https://github.com/apache/apisix/pull/6280


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


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

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

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




[GitHub] [apisix] Chever-John edited a comment on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)

2022-02-09 Thread GitBox


Chever-John edited a comment on issue #6266:
URL: https://github.com/apache/apisix/issues/6266#issuecomment-103144


   After discussion and review, it was found that the cause of this issue was 
that we did not support the application/json content type. I will mainly solve 
this issue in the next 3 days.  @pcyan 


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

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

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




[GitHub] [apisix] Chever-John edited a comment on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)

2022-02-09 Thread GitBox


Chever-John edited a comment on issue #6266:
URL: https://github.com/apache/apisix/issues/6266#issuecomment-103144


   After discussion and review, it was found that the cause of this issue was 
that we did not support the application/json content type. I will mainly solve 
this issue in the next 3 days. 
   sry @pcyan 


-- 
This is an automated message from the 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] bisakhmondal commented on a change in pull request #6228: feat(loggly): support HTTP response code to SYSLOG severity mapping

2022-02-09 Thread GitBox


bisakhmondal commented on a change in pull request #6228:
URL: https://github.com/apache/apisix/pull/6228#discussion_r803310088



##
File path: apisix/plugins/loggly.lua
##
@@ -85,6 +86,17 @@ local schema = {
 type = "boolean",
 default = true
 },
+severity_map = {
+type = "object",
+description = "upstream response code vs syslog severity mapping",
+patternProperties = {
+[".*"] = {

Review comment:
   @spacewander It works as well as doesn't work.
   Example 1: Want :heavy_check_mark:  Got: :heavy_check_mark: 
   ```json
   ...
  "severity_map": {
   "200": "INFO"
   }
   ...
   ```
   
   Example 2: Want :x:  Got: :x: 
   ```json
   ...
  "severity_map": {
   "200": "abc"
   }
   ...
   ```
   
   Example 3: Want :x:  Got: :heavy_check_mark: : 
   ```json
   ...
  "severity_map": {
   "abc": "def"
   }
   ...
   ```
   The problem is, if the key fails to match regex, the pattern properties 
don't get applied. Also, the program doesn't throw an error for the key 
mismatch.




-- 
This is an automated message from the 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] dependabot[bot] opened a new pull request #6279: build(deps): bump actions/setup-go from 2.1.5 to 2.2.0

2022-02-09 Thread GitBox


dependabot[bot] opened a new pull request #6279:
URL: https://github.com/apache/apisix/pull/6279


   Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2.1.5 to 
2.2.0.
   
   Release notes
   Sourced from https://github.com/actions/setup-go/releases;>actions/setup-go's 
releases.
   
   Add check-latest input
   In scope of this release we add the https://github-redirect.dependabot.com/actions/setup-go/pull/186;>check-latest
 input. If check-latest is set to true, the action 
first checks if the cached version is the latest one. If the locally cached 
version is not the most up-to-date, a Go version will then be downloaded from 
https://github.com/actions/go-versions;>go-versions repository. By 
default check-latest is set to false.
   Example of usage:
   steps:
 - uses: actions/checkout@v2
 - uses: actions/setup-go@v2
   with:
 go-version: '1.16'
 check-latest: true
 - run: go version
   
   Moreover, we updated @actions/core from 1.2.6 
to 1.6.0
   
   
   
   Commits
   
   https://github.com/actions/setup-go/commit/bfdd3570ce990073878bf10f6b2d79082de49492;>bfdd357
 Implement check-latest flag to check if pre-cached version is 
latest one (#...
   https://github.com/actions/setup-go/commit/44e221478fc6847752e5c574fc7a7b3247b00fbf;>44e2214
 Replace 'ubuntu-16.04' - 'ubuntu-latest' (https://github-redirect.dependabot.com/actions/setup-go/issues/180;>#180)
   See full diff in https://github.com/actions/setup-go/compare/v2.1.5...v2.2.0;>compare 
view
   
   
   
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-go=github_actions=2.1.5=2.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
   
   Dependabot will resolve any conflicts with this PR as long as you don't 
alter it yourself. You can also trigger a rebase manually by commenting 
`@dependabot rebase`.
   
   [//]: # (dependabot-automerge-start)
   [//]: # (dependabot-automerge-end)
   
   ---
   
   
   Dependabot commands and options
   
   
   You can trigger Dependabot actions by commenting on this PR:
   - `@dependabot rebase` will rebase this PR
   - `@dependabot recreate` will recreate this PR, overwriting any edits that 
have been made to it
   - `@dependabot merge` will merge this PR after your CI passes on it
   - `@dependabot squash and merge` will squash and merge this PR after your CI 
passes on it
   - `@dependabot cancel merge` will cancel a previously requested merge and 
block automerging
   - `@dependabot reopen` will reopen this PR if it is closed
   - `@dependabot close` will close this PR and stop Dependabot recreating it. 
You can achieve the same result by closing it manually
   - `@dependabot ignore this major version` will close this PR and stop 
Dependabot creating any more for this major version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this minor version` will close this PR and stop 
Dependabot creating any more for this minor version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this dependency` will close this PR and stop 
Dependabot creating any more for this dependency (unless you reopen the PR or 
upgrade to it yourself)
   
   
   


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

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

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




[apisix] branch dependabot/github_actions/actions/setup-go-2.2.0 created (now dc5c61d)

2022-02-09 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch 
dependabot/github_actions/actions/setup-go-2.2.0
in repository https://gitbox.apache.org/repos/asf/apisix.git.


  at dc5c61d  build(deps): bump actions/setup-go from 2.1.5 to 2.2.0

No new revisions were added by this update.


[GitHub] [apisix] spacewander commented on issue #6276: bug: prometheus plugin `enable_export_server=false` not working as expected

2022-02-09 Thread GitBox


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


   > They are a logical AND relationship.
   > 
   > Need to configure both `enable_export_server: false` and `public_api` 
plugin.
   
   Yes
   
   
   
   > @spacewander thanks for your reply. Does that mean these descriptions in 
the documentation are wrong? `enable_export_server=false` no longer have any 
real value?
   > 
   > ```
   > If you still want to expose the metrics via the data plane port (default: 
9080), you can configure it like this:
   > 
   > plugin_attr:
   >   prometheus:
   > enable_export_server: false
   > You may need to use 
[public-api](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/public-api.md)
 plugin to expose it.
   > ```
   > 
   > 
[https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/prometheus.md#api](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/prometheus.md?rgh-link-date=2022-02-10T02%3A01%3A57Z#api)
   
   Look like we should fix the description of `You may need to use`.


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

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

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




[GitHub] [apisix] Chever-John edited a comment on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)

2022-02-09 Thread GitBox


Chever-John edited a comment on issue #6266:
URL: https://github.com/apache/apisix/issues/6266#issuecomment-1034477830


   In fact, these are the two new features (support 'json' & 'GET') that we're 
going to release next.
   As for the launch time, I personally expect it to be completed within a week.
@pcyan 
   
   
   > @Chever-John May I also suggest that the `parse_graphql` function should 
handle the case of GET requests? 
https://graphql.org/learn/serving-over-http/#get-request Currently an error 
message is returned regardless of HTTP method used.
   > 
   > ```
   > local body, err = request.get_body(max_size, ctx)
   > if not body then
   > return nil, "failed to read graphql body: " .. (err or "request body 
has zero size")
   > end
   > ```
   
   


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

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

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




[GitHub] [apisix] Chever-John edited a comment on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)

2022-02-09 Thread GitBox


Chever-John edited a comment on issue #6266:
URL: https://github.com/apache/apisix/issues/6266#issuecomment-1034477830


   In fact, these are the two new features (support 'json' & 'GET') that we're 
going to release next.
   As for the launch time, I personally expect it to be completed within a week.
   
   
   > @Chever-John May I also suggest that the `parse_graphql` function should 
handle the case of GET requests? 
https://graphql.org/learn/serving-over-http/#get-request Currently an error 
message is returned regardless of HTTP method used.
   > 
   > ```
   > local body, err = request.get_body(max_size, ctx)
   > if not body then
   > return nil, "failed to read graphql body: " .. (err or "request body 
has zero size")
   > end
   > ```
   
   


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

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

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




[GitHub] [apisix] Chever-John edited a comment on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)

2022-02-09 Thread GitBox


Chever-John edited a comment on issue #6266:
URL: https://github.com/apache/apisix/issues/6266#issuecomment-1034477830


   In fact, these are the two new features (support 'json' & 'GET') that we're 
going to introduce next.
   As for the launch time, I personally expect it to be completed within a week.
   
   
   > @Chever-John May I also suggest that the `parse_graphql` function should 
handle the case of GET requests? 
https://graphql.org/learn/serving-over-http/#get-request Currently an error 
message is returned regardless of HTTP method used.
   > 
   > ```
   > local body, err = request.get_body(max_size, ctx)
   > if not body then
   > return nil, "failed to read graphql body: " .. (err or "request body 
has zero size")
   > end
   > ```
   
   


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

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

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




[GitHub] [apisix] Chever-John commented on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)

2022-02-09 Thread GitBox


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


   In fact, these are the two new features (support 'json' & 'GET') that we're 
going to introduce next.
   As for the launch time, I personally expect it to be completed within a week.


-- 
This is an automated message from the 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] Gary-Airwallex commented on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)

2022-02-09 Thread GitBox


Gary-Airwallex commented on issue #6266:
URL: https://github.com/apache/apisix/issues/6266#issuecomment-1034473794


   @Chever-John May I also suggest that the `parse_graphql` function should 
handle the case of GET requests? 
https://graphql.org/learn/serving-over-http/#get-request
   Currently an error message is returned regardless of HTTP method used.
   ```
   local body, err = request.get_body(max_size, ctx)
   if not body then
   return nil, "failed to read graphql body: " .. (err or "request body has 
zero size")
   end
   ``` 


-- 
This is an automated message from the 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] tao12345666333 merged pull request #227: feat(apisix): expose stream proxy tcp/udp ports

2022-02-09 Thread GitBox


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


   


-- 
This is an automated message from the 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): expose stream proxy tcp/udp ports (#227)

2022-02-09 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-helm-chart.git


The following commit(s) were added to refs/heads/master by this push:
 new 3d9afdd  feat(apisix): expose stream proxy tcp/udp ports (#227)
3d9afdd is described below

commit 3d9afddb1b6ae022fefcbe19bf1f7ed8671f5b2f
Author: Gallardot 
AuthorDate: Thu Feb 10 12:10:00 2022 +0800

feat(apisix): expose stream proxy tcp/udp ports (#227)
---
 charts/apisix/templates/deployment.yaml  | 18 ++
 charts/apisix/templates/service-gateway.yaml | 20 
 2 files changed, 38 insertions(+)

diff --git a/charts/apisix/templates/deployment.yaml 
b/charts/apisix/templates/deployment.yaml
index 97df7ab..523110e 100644
--- a/charts/apisix/templates/deployment.yaml
+++ b/charts/apisix/templates/deployment.yaml
@@ -68,6 +68,24 @@ spec:
   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
diff --git a/charts/apisix/templates/service-gateway.yaml 
b/charts/apisix/templates/service-gateway.yaml
index 1361872..db88c4a 100644
--- a/charts/apisix/templates/service-gateway.yaml
+++ b/charts/apisix/templates/service-gateway.yaml
@@ -66,6 +66,26 @@ spec:
   {{- end }}
 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 }}
+port: {{ $port }}
+targetPort: {{ $port }}
+protocol: TCP
+  {{- end }}
+  {{- end }}
+  {{- if (gt (len .udp) 0) }}
+  {{- range $index, $port := .udp }}
+  - name: proxy-udp-{{ $index | toString }}
+port: {{ $port }}
+targetPort: {{ $port }}
+protocol: UDP
+  {{- end }}
+  {{- end }}
+  {{- end }}
+  {{- end }}
   selector:
 {{- include "apisix.selectorLabels" . | nindent 4 }}
 {{- end }}


[GitHub] [apisix] tzssangglass commented on pull request #6247: Add the de duplication function of Nacos service discovery

2022-02-09 Thread GitBox


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


   hi @xianshun163 , I have another fix idea to discuss with you.
   
   Before adding a new service to services, we can do a de-duplication, we can 
add de_duplication function in 
https://github.com/apache/apisix/blob/06c51935aa207eef8ef75df24172e8656085c3ff/apisix/discovery/nacos/init.lua#L200-L203
   
   L202
   
   the code may like 
   
   ```lua
   local dup = de_duplication(services, namespace_id, group_name,
   up.service_name, up.scheme)
   if dup then
   goto CONTINUE
   end
   if up.discovery_type == 'nacos' then
   ```
   
   we can compare new service and services in de_duplication function, such as:
   
   ```lua
   local function de_duplication(services, namespace_id, group_name, 
service_name, scheme)
   for _, service in ipairs(services) do
   if service.namespace_id == namespace_id and service.group_name == 
group_name
   and service.service_name == service_name and service.scheme 
== scheme then
   return true
   end
   end
   return false
   end
   ```
   


-- 
This is an automated message from the 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] SkyeYoung opened a new pull request #6278: docs: improve consul_kv.md

2022-02-09 Thread GitBox


SkyeYoung opened a new pull request #6278:
URL: https://github.com/apache/apisix/pull/6278


   ### What this PR does / why we need it:
   - Use the word "Consul KV" in the official document of Consul to replace 
"consul key value"
   - Adjust the expression of some text
   
   ### Pre-submission checklist:
   
   
   
   * [x] Did you explain what problem does this PR solve? Or what new features 
have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix/tree/master#community) first**
   


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

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

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




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

2022-02-09 Thread GitBox


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



##
File path: t/plugin/clickhouse-logger.t
##
@@ -0,0 +1,227 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+use t::APISIX 'no_plan';
+
+log_level("info");
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+
+my $http_config = $block->http_config // <<_EOC_;
+server {
+listen 10420;
+location /loggly/bulk/tok/tag/bulk {
+content_by_lua_block {
+ngx.req.read_body()
+local data = ngx.req.get_body_data()
+local headers = ngx.req.get_headers()
+ngx.log(ngx.ERR, "loggly body: ", data)

Review comment:
   Ditto

##
File path: t/plugin/clickhouse-logger.t
##
@@ -0,0 +1,227 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+use t::APISIX 'no_plan';
+
+log_level("info");
+repeat_each(1);
+no_long_string();
+no_root_location();
+
+add_block_preprocessor(sub {
+my ($block) = @_;
+
+if ((!defined $block->error_log) && (!defined $block->no_error_log)) {
+$block->set_value("no_error_log", "[error]");
+}
+
+if (!defined $block->request) {
+$block->set_value("request", "GET /t");
+}
+
+my $http_config = $block->http_config // <<_EOC_;
+server {
+listen 10420;
+location /loggly/bulk/tok/tag/bulk {
+content_by_lua_block {
+ngx.req.read_body()
+local data = ngx.req.get_body_data()
+local headers = ngx.req.get_headers()
+ngx.log(ngx.ERR, "loggly body: ", data)
+ngx.log(ngx.ERR, "loggly tags: " .. 
require("toolkit.json").encode(headers["X-LOGGLY-TAG"]))
+ngx.say("ok")
+}
+}
+}
+_EOC_
+
+$block->set_value("http_config", $http_config);
+});
+
+run_tests();
+
+__DATA__
+
+=== TEST 1: Full configuration verification
+--- yaml_config
+plugins:
+  - clickhouse-logger
+--- config
+location /t {
+content_by_lua_block {
+local plugin = require("apisix.plugins.clickhouse-logger")
+local ok, err = plugin.check_schema({timeout = 3,
+ retry_delay = 1,
+ batch_max_size = 500,
+ user = "default",
+ password = "a",
+ database = "default",
+ logtable = "t",
+ endpoint_addr = 
"http://127.0.0.1:8123;,
+ max_retry_count = 1,
+ name = "clickhouse logger",
+ ssl_verify = false
+ })
+
+if not ok then
+ngx.say(err)
+else
+ngx.say("passed")
+end
+}
+}
+--- response_body
+passed
+
+
+

[GitHub] [apisix] spacewander merged pull request #6277: ci: enforce request review on the final state

2022-02-09 Thread GitBox


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


   


-- 
This is an automated message from the 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: enforce request review on the final state (#6277)

2022-02-09 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 06c5193  ci: enforce request review on the final state (#6277)
06c5193 is described below

commit 06c51935aa207eef8ef75df24172e8656085c3ff
Author: 罗泽轩 
AuthorDate: Thu Feb 10 11:24:41 2022 +0800

ci: enforce request review on the final state (#6277)
---
 .asf.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.asf.yaml b/.asf.yaml
index cc4b6b8..51a6b73 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -45,6 +45,7 @@ github:
 protected_branches:
   master:
 required_pull_request_reviews:
+  dismiss_stale_reviews: true
   require_code_owner_reviews: true
   required_approving_review_count: 2
   release/2.12:


[GitHub] [apisix] spacewander opened a new pull request #6277: ci: enforce request review on the final state

2022-02-09 Thread GitBox


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


   In https://github.com/apache/apisix/pull/5940#discussion_r802593858,
   during solving the merge conflict,
   a bug which is fixed in https://github.com/apache/apisix/pull/6204 is
   reintroduced.
   The test is also changed so it can't catch up the regression.
   
   That PR is approved before merging the master. Luckily, I am cautious
   enough to start another turn of review.
   
   We should not rely on the lucky or someone else's caution.
   To prevent that from happening again, here we enforce the approval
   should be applied with the final state.
   
   Signed-off-by: spacewander 
   
   ### What this PR does / why we need it:
   
   
   
   ### Pre-submission checklist:
   
   
   
   * [x] Did you explain what problem does this PR solve? Or what new features 
have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix/tree/master#community) first**
   


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

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

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




[GitHub] [apisix] Chever-John commented on issue #6266: bug: ctx.lua#59 parse_graphql(ctx)

2022-02-09 Thread GitBox


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


   After discussion and review, it was found that the cause of this issue was 
that we did not use the application/json content type. I will mainly solve this 
issue in the next 3 days. 
   sry @pcyan 


-- 
This is an automated message from the 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] tao12345666333 commented on issue #6276: bug: prometheus plugin `enable_export_server=false` not working as expected

2022-02-09 Thread GitBox


tao12345666333 commented on issue #6276:
URL: https://github.com/apache/apisix/issues/6276#issuecomment-1034431045


   I have tried three ways of configuration and they all work fine
   
   ```
   {
 "count": 3,
 "node": {
   "dir": true,
   "nodes": [
 {
   "modifiedIndex": 36,
   "value": {
 "status": 1,
 "update_time": 1644403772,
 "id": "1",
 "priority": 0,
 "plugins": {
   "public-api": {}
 },
 "uri": "/apisix/prometheus/metrics",
 "create_time": 1644403772
   },
   "createdIndex": 36,
   "key": "/apisix/routes/1"
 },
 {
   "modifiedIndex": 38,
   "value": {
 "upstream": {
   "pass_host": "pass",
   "nodes": {
 "127.0.0.1:9091": 1
   },
   "scheme": "http",
   "type": "roundrobin",
   "hash_on": "vars"
 },
 "status": 1,
 "update_time": 1644404420,
 "id": "3",
 "priority": 0,
 "plugins": {
   "public-api": {
 "uri": "/apisix/prometheus/metrics"
   }
 },
 "uri": "/pmetrics",
 "create_time": 1644404420
   },
   "createdIndex": 38,
   "key": "/apisix/routes/3"
 },
 {
   "modifiedIndex": 37,
   "value": {
 "status": 1,
 "update_time": 1644404184,
 "id": "2",
 "priority": 0,
 "plugins": {
   "public-api": {
 "uri": "/apisix/prometheus/metrics"
   }
 },
 "uri": "/metrics",
 "create_time": 1644404184
   },
   "createdIndex": 37,
   "key": "/apisix/routes/2"
 }
   ],
   "key": "/apisix/routes"
 },
 "action": "get"
   }
   ```


-- 
This is an automated message from the 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] oil-oil opened a new issue #873: The 2.12.1 version source package is missing

2022-02-09 Thread GitBox


oil-oil opened a new issue #873:
URL: https://github.com/apache/apisix-website/issues/873


   Follow the operations in the documentation and find that the source package 
of version 2.12.1 is missing
   
   https://user-images.githubusercontent.com/57465570/153325924-ed5a68ee-b185-40ba-b5e9-4d2256a20ef3.png;>
   
   The screenshot of the page in the apache website is as follows:
   https://user-images.githubusercontent.com/57465570/153325897-659c14cc-c9cc-454f-bc4d-8222dff1b79c.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] tao12345666333 commented on issue #6276: bug: prometheus plugin `enable_export_server=false` not working as expected

2022-02-09 Thread GitBox


tao12345666333 commented on issue #6276:
URL: https://github.com/apache/apisix/issues/6276#issuecomment-1034426253


   They are a logical AND relationship.
   
   Need to configure both `enable_export_server: false` and `public_api` plugin.


-- 
This is an automated message from the 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] zaunist commented on pull request #870: chore: add the LTS download button of 'apisix'

2022-02-09 Thread GitBox


zaunist commented on pull request #870:
URL: https://github.com/apache/apisix-website/pull/870#issuecomment-1034425318


   It look like need to sync master branch.


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

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] Baoyuantop commented on a change in pull request #870: chore: add the LTS download button of 'apisix'

2022-02-09 Thread GitBox


Baoyuantop commented on a change in pull request #870:
URL: https://github.com/apache/apisix-website/pull/870#discussion_r803246891



##
File path: website/config/downloads.js
##
@@ -9,6 +9,7 @@ module.exports = [
 githubBranch: "master",
 downloadPath: "apisix/2.11.0/apache-apisix-2.11.0-src",
 version: "2.11.0",
+LTSDownloadPath:"2.10.3",

Review comment:
   It looks more like `LTSVersion`




-- 
This is an automated message from the 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] yaule commented on pull request #6270: feat(oidc): add set_userinfo_detail_header

2022-02-09 Thread GitBox


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


   > 
   
   https://grafana.com/docs/grafana/latest/auth/auth-proxy/


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

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

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




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

2022-02-09 Thread GitBox


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


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


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

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

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




[GitHub] [apisix] tao12345666333 commented on issue #6276: bug: prometheus plugin `enable_export_server=false` not working as expected

2022-02-09 Thread GitBox


tao12345666333 commented on issue #6276:
URL: https://github.com/apache/apisix/issues/6276#issuecomment-1034412793


   let me try to use `public_api` plugin.


-- 
This is an automated message from the 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] tao12345666333 edited a comment on issue #6276: bug: prometheus plugin `enable_export_server=false` not working as expected

2022-02-09 Thread GitBox


tao12345666333 edited a comment on issue #6276:
URL: https://github.com/apache/apisix/issues/6276#issuecomment-1034411255


   @spacewander thanks for your reply.
   Does that mean these descriptions in the documentation are wrong? 
`enable_export_server=false` no longer have any real value?
   
   ```
   If you still want to expose the metrics via the data plane port (default: 
9080), you can configure it like this:
   
   plugin_attr:
 prometheus:
   enable_export_server: false
   You may need to use 
[public-api](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/public-api.md)
 plugin to expose it.
   ```
   
   
https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/prometheus.md#api


-- 
This is an automated message from the 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 #6242: fix(redirect-plugin): redirection loop behind a proxy or lb

2022-02-09 Thread GitBox


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



##
File path: t/plugin/redirect.t
##
@@ -1000,3 +1000,58 @@ Location: /hello?type=string=json
 --- error_code: 302
 --- no_error_log
 [error]
+
+
+
+=== TEST 41: enable http_to_https (pass X-Forwarded-Proto)
+--- config
+location /t {
+content_by_lua_block {
+local t = require("lib.test_admin").test
+local code, body = t('/apisix/admin/routes/1',
+ngx.HTTP_PUT,
+[[{
+"uri": "/hello",
+"host": "foo.com",
+"vars": [
+[
+"scheme",
+"==",
+"http"
+]
+],
+"plugins": {
+"redirect": {
+"http_to_https": true
+}
+}
+}]]
+)
+
+if code >= 300 then
+ngx.status = code
+end
+ngx.say(body)
+}
+}
+

Review comment:
   Let's remove the extra blank lines




-- 
This is an automated message from the 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] tao12345666333 commented on issue #6276: bug: prometheus plugin `enable_export_server=false` not working as expected

2022-02-09 Thread GitBox


tao12345666333 commented on issue #6276:
URL: https://github.com/apache/apisix/issues/6276#issuecomment-1034411255


   @spacewander thanks for your reply.
   Does that mean these descriptions in the documentation are wrong?
   
   ```
   If you still want to expose the metrics via the data plane port (default: 
9080), you can configure it like this:
   
   plugin_attr:
 prometheus:
   enable_export_server: false
   You may need to use 
[public-api](https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/public-api.md)
 plugin to expose it.
   ```
   
   
https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/prometheus.md#api


-- 
This is an automated message from the 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 #6275: docs: correct the 'article' to 'documentation' in Getting started.

2022-02-09 Thread GitBox


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


   


-- 
This is an automated message from the 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] spacewander closed issue #866: Correct choice of words in Getting started.

2022-02-09 Thread GitBox


spacewander closed issue #866:
URL: https://github.com/apache/apisix-website/issues/866


   


-- 
This is an automated message from the 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 (862c604 -> 92bbde9)

2022-02-09 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 862c604  docs: add forward-auth zh document (#6267)
 add 92bbde9  docs: correct the 'article' to 'documentation' in Getting 
started. (#6275)

No new revisions were added by this update.

Summary of changes:
 docs/en/latest/getting-started.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


[apisix] branch master updated: docs: add forward-auth zh document (#6267)

2022-02-09 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 862c604  docs: add forward-auth zh document (#6267)
862c604 is described below

commit 862c604a4a85244de2f143aeca71db9046ef5433
Author: biubiue 
AuthorDate: Thu Feb 10 09:57:31 2022 +0800

docs: add forward-auth zh document (#6267)

Co-authored-by: 罗泽轩 
---
 docs/zh/latest/config.json |   3 +-
 docs/zh/latest/plugins/forward-auth.md | 140 +
 2 files changed, 142 insertions(+), 1 deletion(-)

diff --git a/docs/zh/latest/config.json b/docs/zh/latest/config.json
index a56d177..c6f2ac9 100644
--- a/docs/zh/latest/config.json
+++ b/docs/zh/latest/config.json
@@ -66,7 +66,8 @@
 "plugins/basic-auth",
 "plugins/openid-connect",
 "plugins/hmac-auth",
-"plugins/authz-casbin"
+"plugins/authz-casbin",
+"plugins/forward-auth"
   ]
 },
 {
diff --git a/docs/zh/latest/plugins/forward-auth.md 
b/docs/zh/latest/plugins/forward-auth.md
new file mode 100644
index 000..8cd7bb6
--- /dev/null
+++ b/docs/zh/latest/plugins/forward-auth.md
@@ -0,0 +1,140 @@
+---
+title: forward-auth
+---
+
+
+
+## 目录
+
+- [**名字**](#名字)
+- [**属性**](#属性)
+- [**数据定义**](#数据定义)
+- [**示例**](#示例)
+- [**测试插件**](#测试插件)
+- [**禁用插件**](#禁用插件)
+
+## 名字
+
+`forward-auth` 插件使用的是经典外部认证。在认证失败的时候,我们可以实现自定义错误或者重定向到认证页面。
+
+Forward Auth 巧妙地将认证和授权逻辑移到了一个专门的外部服务中,网关将用户的请求转发给认证服务并阻塞原始请求,并在认证服务以非 2xx 
状态响应时替换结果。
+
+## 属性
+
+| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述 |
+| -- | -- | -- | -- | -- | -- |
+| host | string | 必须 |  |  | 设置 `authorization` 服务的地址 (eg. 
https://localhost:9188) |
+| ssl_verify | boolean | 可选 | true |   | 是否验证证书 |
+| request_headers | array[string] | 可选 |  |  | 设置需要由 `client` 转发到 
`authorization` 服务的请求头。未设置时,只有 Apache APISIX 的(X-Forwarded-XXX)会被转发到 
`authorization` 服务。 |
+| upstream_headers | array[string] | 可选 |  |  | 认证通过时,设置 `authorization` 服务转发至 
`upstream` 的请求头。如果不设置则不转发任何请求头。
+| client_headers | array[string] | 可选 |  |  | 认证失败时,由 `authorization` 服务向 
`client` 发送的响应头。如果不设置则不转发任何响应头。 |
+| timeout | integer | 可选 | 3000ms | [1, 6]ms | `authorization` 服务请求超时时间 |
+| keepalive | boolean | 可选 | true |  | HTTP 长连接 |
+| keepalive_timeout | integer | 可选 | 6ms | [1000, ...]ms | 长连接空闲时间 |
+| keepalive_pool | integer | 可选 | 5 | [1, ...]ms | 连接池大小 |
+
+## 数据定义
+
+request_headers 属性中转发到 `authorization` 服务中的 Apache APISIX 内容清单
+| Scheme | HTTP Method | Host | URI | Source IP |
+| -- | -- | -- | -- | -- |
+| X-Forwarded-Proto | X-Forwarded-Method | X-Forwarded-Host | X-Forwarded-Uri 
| X-Forwarded-For |
+
+## 示例
+
+首先, 你需要设置一个认证服务。这里使用的是 Apache APISIX 无服务器插件模拟的示例。
+
+```shell
+curl -X PUT 'http://127.0.0.1:9080/apisix/admin/routes/auth' \
+-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' \
+-H 'Content-Type: application/json' \
+-d '{
+"uri": "/auth",
+"plugins": {
+"serverless-pre-function": {
+"phase": "rewrite",
+"functions": [
+"return function (conf, ctx) local core = 
require(\"apisix.core\"); local authorization = core.request.header(ctx, 
\"Authorization\"); if authorization == \"123\" then core.response.exit(200); 
elseif authorization == \"321\" then core.response.set_header(\"X-User-ID\", 
\"i-am-user\"); core.response.exit(200); else 
core.response.set_header(\"Location\", \"http://example.com/auth\;); 
core.response.exit(403); end end"
+]
+}
+}
+}'
+```
+
+下一步, 我们创建一个测试路由。
+
+```shell
+curl -X PUT http://127.0.0.1:9080/apisix/admin/routes/1
+-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'
+-d '{
+"uri": "/headers",
+"plugins": {
+"forward-auth": {
+"host": "http://127.0.0.1:9080/auth;,
+"request_headers": ["Authorization"],
+"upstream_headers": ["X-User-ID"],
+"client_headers": ["Location"]
+}
+},
+"upstream": {
+"nodes": {
+"httpbin.org:80": 1
+},
+"type": "roundrobin"
+}
+}'
+```
+
+我们可以进行下面三个测试:
+
+1. **request_headers** 从 `client` 转发请求头到 `authorization` 服务
+
+```shell
+curl http://127.0.0.1:9080/headers -H 'Authorization: 123'
+{
+"headers": {
+"Authorization": "123",
+"Next": "More-headers"
+}
+}
+```
+
+2. **upstream_headers** 转发 `authorization` 服务响应头到 `upstream`
+
+```shell
+curl http://127.0.0.1:9080/headers -H 'Authorization: 321'
+{
+"headers": {
+"Authorization": "321",
+"X-User-ID": "i-am-user",
+"Next": "More-headers"
+}
+}
+```
+
+3. **client_headers** 当授权失败时转发 `authorization` 服务响应头到 `client`
+
+```shell
+curl -i http://127.0.0.1:9080/headers
+HTTP/1.1 403 Forbidden
+Location: http://example.com/auth
+```
+
+最后,你可以通过在路由中移除的方式禁用 `forward-auth` 插件。


[GitHub] [apisix] spacewander merged pull request #6267: docs: add forward-auth zh document

2022-02-09 Thread GitBox


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


   


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

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

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




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

2022-02-09 Thread GitBox


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


    Deploy Preview for *apache-apisix* processing.
   
   
    Explore the source changes: 138685d28d83d0e3887efecbaf33f9df23378bc9
   
    Inspect the deploy log: 
[https://app.netlify.com/sites/apache-apisix/deploys/620470e751d9180008f87069](https://app.netlify.com/sites/apache-apisix/deploys/620470e751d9180008f87069)
   


-- 
This is an automated message from the 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 #6228: feat(loggly): support HTTP response code to SYSLOG severity mapping

2022-02-09 Thread GitBox


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



##
File path: apisix/plugins/loggly.lua
##
@@ -85,6 +86,17 @@ local schema = {
 type = "boolean",
 default = true
 },
+severity_map = {
+type = "object",
+description = "upstream response code vs syslog severity mapping",
+patternProperties = {
+[".*"] = {

Review comment:
   Does `["^[1-5][0-9]{2}$"] = {...}` work for 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] spacewander commented on a change in pull request #6228: feat(loggly): support HTTP response code to SYSLOG severity mapping

2022-02-09 Thread GitBox


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



##
File path: apisix/plugins/loggly.lua
##
@@ -145,6 +157,18 @@ function _M.check_schema(conf, schema_type)
 if not ok then
 return nil, err
 end
+
+if conf.severity_map then
+local cache = {}
+for k, v in pairs(conf.severity_map) do
+local rcode = tonumber(k)
+if not rcode or rcode < 100 or rcode >= 600 then
+return nil, "expecting severity_map with http response 
code([100,599]) as keys"
+end
+cache[k] = severity[v:upper()]

Review comment:
   OK




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

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

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




[GitHub] [apisix] spacewander commented on a change in pull request #6267: docs: add forward-auth zh document

2022-02-09 Thread GitBox


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



##
File path: docs/zh/latest/plugins/forward-auth.md
##
@@ -0,0 +1,140 @@
+---
+title: forward-auth
+---
+
+
+
+## 目录
+
+- [**名字**](#名字)
+- [**属性**](#属性)
+- [**数据定义**](#数据定义)
+- [**示例**](#示例)
+- [**测试插件**](#测试插件)
+- [**禁用插件**](#禁用插件)
+
+## 名字
+
+`forward-auth` 插件使用的是经典外部认证。在认证失败的时候,我们可以实现自定义错误或者重定向到认证页面。
+
+Forward Auth 巧妙地将认证和授权逻辑移到了一个专门的外部服务中,网关将用户的请求转发给认证服务并阻塞原始请求,并在认证服务以非 2xx 
状态响应时替换结果。
+
+## 属性
+
+| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述 |
+| -- | -- | -- | -- | -- | -- |
+| host | string | 必须 |  |  | 设置 `authorization` 服务的地址 (eg. 
https://localhost:9188) |
+| ssl_verify | boolean | 可选 | true |   | 是否验证证书 |
+| request_headers | array[string] | 可选 |  |  | 设置需要由 `client` 转发到 
`authorization` 服务的请求头。未设置时,只有 Apache APISIX 的(X-Forwarded-XXX)会被转发到 
`authorization` 服务。 |
+| upstream_headers | array[string] | 可选 |  |  | 认证通过时,设置 `authorization` 服务转发至 
`upstream` 的请求头。如果不设置则不转发任何请求头。
+| client_headers | array[string] | 可选 |  |  | 认证失败时,由 `authorization` 服务向 
`client` 发送的响应头。如果不设置则不转发任何响应头。 |
+| timeout | integer | 可选 | 3000ms | [1, 6]ms | `authorization` 服务请求超时时间 |
+| keepalive | boolean | 可选 | true |  | HTTP 长连接 |
+| keepalive_timeout | integer | 可选 | 6ms | [1000, ...]ms | 长连接空闲时间 |
+| keepalive_pool | integer | 可选 | 5 | [1, ...]ms | 连接池大小 |
+
+## 数据定义
+
+request_headers 属性中转发到 `authorization` 服务中的 Apache APISIX 内容清单
+| Scheme | HTTP Method | Host | URI | Source IP |
+| -- | -- | -- | -- | -- |
+| X-Forwarded-Proto | X-Forwarded-Method | X-Forwarded-Host | X-Forwarded-Uri 
| X-Forwarded-For |
+
+## 示例
+
+首先, 你需要设置一个认证服务。这里使用的是 Apache APISIX 无服务器插件模拟的示例。
+
+```shell
+curl -X PUT 'http://127.0.0.1:9080/apisix/admin/routes/auth' \
+-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' \
+-H 'Content-Type: application/json' \
+-d '{
+"uri": "/auth",
+"plugins": {
+"serverless-pre-function": {
+"phase": "rewrite",
+"functions": [
+"return function (conf, ctx) local core = 
require(\"apisix.core\"); local authorization = core.request.header(ctx, 
\"Authorization\"); if authorization == \"123\" then core.response.exit(200); 
elseif authorization == \"321\" then core.response.set_header(\"X-User-ID\", 
\"i-am-user\"); core.response.exit(200); else 
core.response.set_header(\"Location\", \"http://example.com/auth\;); 
core.response.exit(403); end end"
+]
+}
+}
+}'
+```
+
+下一步, 我们创建一个测试路由。
+
+```shell
+curl -X PUT http://127.0.0.1:9080/apisix/admin/routes/1
+-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'
+-d '{
+"uri": "/headers",
+"plugins": {
+"forward-auth": {
+"host": "http://127.0.0.1:9080/auth;,
+"request_headers": ["Authorization"],
+"upstream_headers": ["X-User-ID"],
+"client_headers": ["Location"]
+}
+},
+"upstream": {
+"nodes": {
+"httpbin.org:80": 1
+},
+"type": "roundrobin"
+}
+}'
+```
+
+我们可以进行下面三个测试:
+
+1. **request_headers** 从 `client` 转发请求头到 `authorization` 服务
+
+```shell
+curl http://127.0.0.1:9080/headers -H 'Authorization: 123'
+{
+"headers": {
+"Authorization": "123",
+"Next": "More-headers"
+}
+}
+```
+
+2. **upstream_headers** 转发 `authorization` 服务响应头到 `upstream`
+
+```shell
+curl http://127.0.0.1:9080/headers -H 'Authorization: 321'
+{
+"headers": {
+"Authorization": "321",
+"X-User-ID": "i-am-user",
+"Next": "More-headers"
+}
+}
+```
+
+3. **client_headers** 当授权失败时转发 `authorization` 服务响应头到 `client`
+
+```shell
+curl -i http://127.0.0.1:9080/headers
+HTTP/1.1 403 Forbidden
+Location: http://example.com/auth
+```
+
+最后,你可以通过在路由中移除的方式禁用 `forward-auth` 插件。

Review comment:
   ```suggestion
   最后,你可以通过在路由中移除的方式禁用 `forward-auth` 插件。
   ```




-- 
This is an automated message from the 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 #6269: docs: added installation mode for LTS version

2022-02-09 Thread GitBox


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


   


-- 
This is an automated message from the 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 installation mode for LTS version (#6269)

2022-02-09 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 04a4cf1  docs: added installation mode for LTS version (#6269)
04a4cf1 is described below

commit 04a4cf18d083d4940ad88bdc87b255dd18cfaab3
Author: John Chever 
AuthorDate: Thu Feb 10 09:44:01 2022 +0800

docs: added installation mode for LTS version (#6269)
---
 docs/en/latest/how-to-build.md | 6 +-
 docs/zh/latest/how-to-build.md | 6 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/docs/en/latest/how-to-build.md b/docs/en/latest/how-to-build.md
index 2eb830b..e02f362 100644
--- a/docs/en/latest/how-to-build.md
+++ b/docs/en/latest/how-to-build.md
@@ -23,7 +23,7 @@ title: How to build Apache APISIX
 
 ## Step 1: Install Apache APISIX
 
-You can install Apache APISIX via RPM Repository, Docker, Helm Chart, and 
source release package. Please choose one from the following options.
+You can install Apache APISIX via RPM Repository, Docker, Helm Chart, source 
release package, and source release package ( LTS version ). Please choose one 
from the following options.
 
 ### Installation via RPM Repository(CentOS 7)
 
@@ -128,6 +128,10 @@ Please refer to: [Installing Apache APISIX with Helm 
Chart](https://github.com/a
 
   Attention please, this operation will totally **remove** the related files.
 
+### LTS version Installation via Source Release Package
+
+The current LTS VERSION of Apache APISIX is `2.10.3`. Set `APISIX VERSION` in 
[install by source package](# Install by source package) to `2.10.3` and follow 
the other steps.
+
 ## Step 2: Install ETCD
 
 This step is required if you have installed only Apache APISIX via RPM, Docker 
or source code but not ETCD.
diff --git a/docs/zh/latest/how-to-build.md b/docs/zh/latest/how-to-build.md
index 10a0f39..5fe544e 100644
--- a/docs/zh/latest/how-to-build.md
+++ b/docs/zh/latest/how-to-build.md
@@ -23,7 +23,7 @@ title: 如何构建 Apache APISIX
 
 ## 步骤1:安装 Apache APISIX
 
-你可以通过 RPM 仓库、Docker、Helm Chart、源码包等多种方式来安装 Apache APISIX。请在以下选项中选择其中一种执行。
+你可以通过 RPM 仓库、Docker、Helm Chart、源码包、源码包(LTS 版本)等多种方式来安装 Apache 
APISIX。请在以下选项中选择其中一种执行。
 
 ### 通过 RPM 仓库安装(CentOS 7)
 
@@ -128,6 +128,10 @@ $ sudo yum install ./apisix/*.rpm
 
   请注意,该操作将完整**删除**相关文件。
 
+### 通过源码包安装 LTS 版本
+
+目前 Apache APISIX 的 LTS 版本为 `2.10.3`,将“[通过源码包安装](#通过源码包安装)”中的 `APISIX_VERSION` 
设置成 `2.10.3` ,其他步骤按顺序进行即可。
+
 ## 步骤2:安装 ETCD
 
 如果你只通过 RPM、Docker 或源代码安装了 Apache APISIX,而没有安装 ETCD,则需要这一步。


[GitHub] [apisix] spacewander commented on issue #6276: bug: prometheus plugin `enable_export_server=false` not working as expected

2022-02-09 Thread GitBox


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


   This is caused by the break change: 
https://github.com/apache/apisix/pull/6196
   The change is introduced to reduce attack vector.
   
   Let's add a new route with public-api plugin to work around it: 
https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/public-api.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] tzssangglass commented on pull request #6270: feat(oidc): add set_userinfo_detail_header

2022-02-09 Thread GitBox


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


   Can you show the relevant docs or issue, I don't understand its usefulness.


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

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

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




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

2022-02-09 Thread GitBox


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



##
File path: .github/workflows/performance.yml
##
@@ -0,0 +1,56 @@
+name: Performance Test
+
+on:
+  pull_request:
+branches: [master, 'release/**']
+paths-ignore:
+  - 'docs/**'
+  - '**/*.md'
+
+jobs:
+  performance:
+if: github.event_name == 'pull_request' || github.event.label.name == 
'performance'
+runs-on: ubuntu-18.04
+timeout-minutes: 45
+
+steps:
+  - name: Check out code
+uses: actions/checkout@v2.4.0
+with:
+  submodules: recursive
+
+  - name: Cache deps
+uses: actions/cache@v2.1.7
+env:
+  cache-name: cache-deps
+with:
+  path: deps
+  key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.os_name 
}}-${{ hashFiles('rockspec/apisix-master-0.rockspec') }}
+
+  - name: Install Dependencies
+run: sudo ./ci/performance_test.sh install_dependencies
+
+  - name: Install wrk2
+run: sudo ./ci/performance_test.sh install_wrk2
+
+  - name: Install SystemTap Tools
+run: sudo ./ci/performance_test.sh install_stap_tools
+
+  - name: Perf Test
+run: ./ci/performance_test.sh run_performance_test

Review comment:
   Tried it before and it didn't fit




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

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

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




[GitHub] [apisix-go-plugin-runner] spacewander commented on issue #34: request help: Introduce context to run plugin

2022-02-09 Thread GitBox


spacewander commented on issue #34:
URL: 
https://github.com/apache/apisix-go-plugin-runner/issues/34#issuecomment-1034391781


   Thanks for your design.
   My original thought is simpler: we can add a method in the Request to return 
a Context. It works like the one from the standard library: 
https://pkg.go.dev/net/http#Request.Context.
   
   People can fetch it only when they need the Context. And the timeout of 
Context is slightly smaller than 60s so people can still break the execution 
with a custom response before the actual timeout.
   
   There is a tricky place: the timeout of Nginx is per-operation, so when we 
communicate with Nginx again in 
https://github.com/apache/apisix-go-plugin-runner/blob/6bb1c4bd98ec374638af7ed02931e0efb2604044/internal/http/request.go#L326
   the timer will be reset. Maybe we can handle this in a separate PR.


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

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

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




[GitHub] [apisix-website] SkyeYoung commented on issue #871: A strange problem caused by switching color modes in multiple tabs

2022-02-09 Thread GitBox


SkyeYoung commented on issue #871:
URL: https://github.com/apache/apisix-website/issues/871#issuecomment-1034389287


   @1502shivam-singh Sorry, my English is very poor. Maybe my description 
misled you.
   
   I mean, first open the home page in a tab, and open the document navigation 
page in this tab, then right-click to open the document of apisix in the new 
tab, switch to the dark mode, then click the first tab, and click back to the 
home page, You will find that the home page is not reset to light mode as 
expected. (yes, I know there are some codes in the program to reset back to 
light mode)
   
   I reproduced this behavior on different devices (maybe not because my system 
is too slow) :D
   


-- 
This is an automated message from the 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] Baoyuantop commented on issue #871: A strange problem caused by switching color modes in multiple tabs

2022-02-09 Thread GitBox


Baoyuantop commented on issue #871:
URL: https://github.com/apache/apisix-website/issues/871#issuecomment-1034382051


   OK, I found the point @1502shivam-singh.
Following exactly the steps in the gif provided by SkyeYoung, the site's 
homepage ended up in the dark mode.
   


-- 
This is an automated message from the 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 #845: fix: aviod create pluginconfig in the tranlsation of route (#836)

2022-02-09 Thread GitBox


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


   Wait for #859 to fix 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-ingress-controller] tao12345666333 commented on a change in pull request #859: fix: ApisixClusterConfig e2e test case

2022-02-09 Thread GitBox


tao12345666333 commented on a change in pull request #859:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/859#discussion_r803200015



##
File path: Makefile
##
@@ -87,8 +87,8 @@ endif
 .PHONY: push-images-to-kind
 push-images-to-kind: kind-up
 ifeq ($(E2E_SKIP_BUILD), 0)
-   docker pull apache/apisix:dev
-   docker tag apache/apisix:dev $(LOCAL_REGISTRY)/apache/apisix:dev
+   docker pull apache/apisix:2.12.0-alpine
+   docker tag apache/apisix:2.12.0-alpine 
$(LOCAL_REGISTRY)/apache/apisix:dev

Review comment:
   Will rollback to stable version before confirming that dev is available.




-- 
This is an automated message from the 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 opened a new pull request #859: fix: ApisixClusterConfig e2e test case

2022-02-09 Thread GitBox


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


   * pin the image of APISIX to stable version
   * using the new plugin list API
   * fix ApisixClusterConfig status logic
   
   Signed-off-by: Jintao Zhang 
   
   
   
   ### Type of change:
   
   
   
   - [x] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   
   ### What this PR does / why we need it:
   
   
   fix: #857 
   ### 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-ingress-controller] tao12345666333 commented on issue #857: e2e test: ApisixClusterConfig enable prometheus failed

2022-02-09 Thread GitBox


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


   If we rollback the APISIX docker image used by the e2e test then it works 
fine.
   
   Created an issue https://github.com/apache/apisix/issues/6276


-- 
This is an automated message from the 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] tao12345666333 commented on issue #6276: bug: prometheus plugin `enable_export_server=false` not working as expected

2022-02-09 Thread GitBox


tao12345666333 commented on issue #6276:
URL: https://github.com/apache/apisix/issues/6276#issuecomment-1034329542


   I see some test cases here
   
https://github.com/apache/apisix/blob/defafb1e426c4ffe4aa740c9bb9ad26992fa2c2e/t/cli/test_prometheus.sh#L67-L105


-- 
This is an automated message from the 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] tao12345666333 opened a new issue #6276: bug: prometheus plugin `enable_export_server=false` not working as expected

2022-02-09 Thread GitBox


tao12345666333 opened a new issue #6276:
URL: https://github.com/apache/apisix/issues/6276


   ### Issue description
   
   In the recent Apache APISIX Ingress controller CI, we found that the 
Prometheus plugin does not take effect when set via global_rules. (we using 
apache/apisix:dev docker image)
   
   **If we fallback this image to `apache/apisix:2.11.0-alpine` then it works 
fine.**
   
   Below is our configuration:
   
   ```yaml
   apisix:
 enable_control: true
 enable_reuseport: true  # Enable nginx SO_REUSEPORT switch if set 
to true.
 allow_admin:
   - 127.0.0.0/24
   - 0.0.0.0/0
 port_admin: 9180
 stream_proxy: # TCP/UDP proxy
   only: false
   tcp:# TCP proxy port list
 - 9100
   udp:
 - 9200
   etcd:
 host:   # it's possible to define multiple etcd 
hosts addresses of the same etcd cluster.
   - "http://{{ .EtcdServiceFQDN }}:2379" # multiple etcd address
 prefix: "/apisix"   # apisix configurations prefix
 timeout: 30 # 30 seconds
   plugin_attr:
 prometheus:
   enable_export_server: false
   ```
   
   xref: https://github.com/apache/apisix-ingress-controller/issues/857
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):  using dev image. 
`apache/apisix@sha256:6e6b8999a981ab00e1a1373fbebf049d08e15aeddfec8e5945910eba134e66c7`
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: 
depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks 
--version`):
   
   
   ### Steps to reproduce
   
   1. `git clone https://github.com/apache/apisix-ingress-controller.git`
   2. `make push-images-to-kind`
   3. `kubectl apply -k samples/deploy/crd`
   4. ` cd test/e2e/`
   5. `ginkgo --focus='enable prometheus'`
   
   ### Actual result
   
   `/apisix/prometheus/metrics` return 404
   
   ### Error log
   
   ```
   127.0.0.1 - - [09/Feb/2022:15:32:54 +] localhost:32150 "GET 
/apisix/admin/global_rules HTTP/1.1" 200 303 0.005 "-" "Go-http-client/1.1" - - 
- "http://localhost:32150;
   127.0.0.1 - - [09/Feb/2022:15:32:54 +] localhost:31883 "GET 
/apisix/prometheus/metrics HTTP/1.1" 404 47 0.000 "-" "Go-http-client/1.1" - - 
- "http://localhost:31883;
   ```
   
   ### Expected result
   
   `/apisix/prometheus/metrics`  return 200


-- 
This is an automated message from the 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] yaule commented on pull request #6270: feat(oidc): add set_userinfo_detail_header

2022-02-09 Thread GitBox


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


   > hi @yaule , thanks for submitting the PR, can you explain the background 
of this PR?
   
   The service behind APISIX can directly obtain user information from the 
header, without using base64 to encode the data, like grafana


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

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

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




[GitHub] [apisix] seanleblanc commented on issue #6260: request help: JWT Auth

2022-02-09 Thread GitBox


seanleblanc commented on issue #6260:
URL: https://github.com/apache/apisix/issues/6260#issuecomment-1034182182


   Sure, this is our most recent config, which kind of works. I see that adding 
the public key works, but without that, it seems to try to do something like 
POSTing to introspection_endpoint? It seems the scope value is not used to 
inspect the scope(s) in the token, but instead is used somehow with these 
endpoints? So basically any valid token gets through.
   
{
 "access_token_in_authorization_header": true,
 "bearer_only": true,
 "client_id": "unconfigured",
 "client_secret": "unconfigured",
 "disable": false,
 "discovery": 
"https://KEYCLOAKHOST/auth/realms/REALM/.well-known/openid-configuration;,
 "public_key": "-BEGIN PUBLIC KEY-\KEY\n-END PUBLIC 
KEY-"
   }
   
   
   The samples you are showing seem to be from authz-keycloak? We are using 
keycloak for testing, but are likely to be using something else in other 
envs/projects. Will authz-keycloak interop only with Keycloak, or can it be 
used with any JWT token provider, assuming it has endpoints for certs? Also, in 
that sample up above for authz-keycloak, it has a client_id value, how is that 
used? Is it expecting the jwt token to have that client_id as a value, or is it 
somehow using that to authenticate to Keycloak for some reason?


-- 
This is an automated message from the 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] MirtoBusico commented on issue #853: question: How to use Service IP as upstream instead of Pod IP

2022-02-09 Thread GitBox


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


   Hi @tao12345666333 I don't know if it is related, but if you delete an 
apisixroute, it results deleted for kubernetes but is still alive in 
apisix-dashboard.
   
   First I deleted the route and waited for one hour and half
   https://user-images.githubusercontent.com/11090934/153266401-18853ea6-a881-4e21-ae1f-418b29520891.png;>
   
   Then I looked at upstream list in apisix-dashboard and the upstream (and 
route) is still there
   https://user-images.githubusercontent.com/11090934/153266547-1cc5d03d-31fe-4626-a00b-5d6f11bee80d.png;>
   
   Seems that kubernetes and apisix will never be synced.
   



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

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

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




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

2022-02-09 Thread GitBox


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


   > @zaunist any update?
   
   I have update the plugin code, still need to update test case.


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

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] 1502shivam-singh commented on issue #871: A strange problem caused by switching color modes in multiple tabs

2022-02-09 Thread GitBox


1502shivam-singh commented on issue #871:
URL: https://github.com/apache/apisix-website/issues/871#issuecomment-1033864478


   > If you open the docs in another tab and switch to dark mode, when you 
return to the home page in the original tab, the home page will also switch to 
dark mode
   
   What I observe is that the dark mode is switching to light mode, as is 
programmed (only not fast, surprisingly). Reason for this I guess is that the 
dark mode context of the documentation section (in other tab) is stored in 
localstorage of browser and the site opening on other tab picks it up as theme. 
   But, to maintain light mode on homepage, the code resets the theme using the 
docusaurus's useThemeContext(), 
   
https://github.com/apache/apisix-website/blob/2b43e5aeff92c2aabac14a540426de555cef238d/website/src/pages/index.js#L28-L41
   
   Only issue, is that this switch is slow on your system, but seems smooth on 
mine 樂
   


-- 
This is an automated message from the 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] hongbinhsu closed issue #2306: web build in node 16 rjsf/core version to lower

2022-02-09 Thread GitBox


hongbinhsu closed issue #2306:
URL: https://github.com/apache/apisix-dashboard/issues/2306


   


-- 
This is an automated message from the 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] tao12345666333 commented on issue #231: request help: Prometheus Apisix

2022-02-09 Thread GitBox


tao12345666333 commented on issue #231:
URL: 
https://github.com/apache/apisix-helm-chart/issues/231#issuecomment-1033863858


Starting from https://github.com/apache/apisix-helm-chart/pull/192, we have 
provided ServiceMonitor, if you are using Prometheus operator you can use it 
directly.
   
   Feel free to reopen this issue, if you still have questions.


-- 
This is an automated message from the 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] tao12345666333 closed issue #231: request help: Prometheus Apisix

2022-02-09 Thread GitBox


tao12345666333 closed issue #231:
URL: https://github.com/apache/apisix-helm-chart/issues/231


   


-- 
This is an automated message from the 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] CP3cham commented on a change in pull request #870: chore:add the LTS download button of 'apisix'

2022-02-09 Thread GitBox


CP3cham commented on a change in pull request #870:
URL: https://github.com/apache/apisix-website/pull/870#discussion_r802757739



##
File path: website/src/pages/downloads/ProjectCard.js
##
@@ -112,12 +156,47 @@ const ProjectCard = (props) => {
   Release Date ·{" "}
   {releaseDate}
 
-
+
+ 
+  
+  
+  
+https://www.apache.org/dyn/closer.cgi/apisix/2.10.3/apache-apisix-2.10.3-src.tgz`}

Review comment:
   Yep,maybe the version info can be put in the json file which include all 
version 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] moonming commented on pull request #6202: feat: use keepalive in server-info plugin

2022-02-09 Thread GitBox


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


   @zaunist any update?


-- 
This is an automated message from the 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] 1502shivam-singh edited a comment on issue #667: feat: add Apache APISIX dashboard playground on website

2022-02-09 Thread GitBox


1502shivam-singh edited a comment on issue #667:
URL: https://github.com/apache/apisix-website/issues/667#issuecomment-1033846171


   > can I get an insight of the feature wanted?
   
   For now, I guess change `go to docs` to `preview`/`demo` and adjust the href 
to the dashboard demo URL. 
   What say, @juzhiyuan.


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

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] 1502shivam-singh commented on issue #667: feat: add Apache APISIX dashboard playground on website

2022-02-09 Thread GitBox


1502shivam-singh commented on issue #667:
URL: https://github.com/apache/apisix-website/issues/667#issuecomment-1033846171


   > can I get an insight of the feature wanted?
   
   For now, I guess change `go to docs` to `preview` and adjust the href to the 
dashboard demo URL. 
   What say, @juzhiyuan.


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

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] 1502shivam-singh commented on issue #871: A strange problem caused by switching color modes in multiple tabs

2022-02-09 Thread GitBox


1502shivam-singh commented on issue #871:
URL: https://github.com/apache/apisix-website/issues/871#issuecomment-1033837549


   > I noticed that after switching to dark mode on other pages, it 
automatically changes back to the light mode when I return to the home page of 
the site.
   
   It is intended, please check this - 
https://github.com/apache/apisix-website/issues/872#issuecomment-1033831539
   
   > It's also good if the homepage has a good dark mode.
   
   Sure could be, but will need some time to decide color palettes for keeping 
a consistent visual design. So, based on prioritizing I think if one has time 
can take up this, or we could delegate this.


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

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

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




[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #858: bug: there are error logs for stream_routes

2022-02-09 Thread GitBox


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


   Refer to 
https://github.com/apache/apisix-ingress-controller/issues/851#issuecomment-1026306420


-- 
This is an automated message from the 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 #858: bug: there are error logs for stream_routes

2022-02-09 Thread GitBox


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


   Thanks for your report. 
   
   This is a known issue due to stream_route mode being disabled by default 
when using the APISIX v2.12.0 image.
   
   You can change the configmap to add stream_route configuration.
   
   I'm already working on this issue and will fix it this week.


-- 
This is an automated message from the 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] 1502shivam-singh commented on issue #872: UI problem of switching color mode in mobile browser

2022-02-09 Thread GitBox


1502shivam-singh commented on issue #872:
URL: https://github.com/apache/apisix-website/issues/872#issuecomment-1033831539


   For anyone who would want to work on this -
   
   - The intended working from my side was to keep the dark mode only for 
documentation section of the site, not the homepage (reason for this is related 
to maintaining a better visual design). This is why dark mode swatch disappears 
on desktop devices. 
   
   So, the work that needs to be done to actually resolve this, is to make the 
dark mode swatch disappear on mobile (which is not happening now, a miss from 
my side )


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

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

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




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

2022-02-09 Thread GitBox


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



##
File path: apisix/plugins/clickhouse-logger.lua
##
@@ -0,0 +1,179 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+local bp_manager_mod  = require("apisix.utils.batch-processor-manager")
+local log_util= require("apisix.utils.log-util")
+local core= require("apisix.core")
+local http= require("resty.http")
+local url = require("net.url")
+local plugin  = require("apisix.plugin")
+
+local ngx  = ngx
+local tostring = tostring
+
+local plugin_name = "clickhouse-logger"
+local batch_processor_manager = bp_manager_mod.new(plugin_name)
+
+local schema = {
+type = "object",
+properties = {
+endpoint_addr = core.schema.uri_def,
+user = {type = "string", default = ""},
+password = {type = "string", default = ""},
+database = {type = "string", default = ""},
+logtable = {type = "string", default = ""},
+timeout = {type = "integer", minimum = 1, default = 3},
+name = {type = "string", default = "clickhouse logger"},
+ssl_verify = {type = "boolean", default = true},
+},
+required = {"endpoint_addr", "user", "password", "database", "logtable"}
+}
+
+
+local metadata_schema = {
+type = "object",
+properties = {
+log_format = log_util.metadata_schema_log_format,
+},
+}
+
+
+local _M = {
+version = 0.1,
+priority = 398,
+name = plugin_name,
+schema = batch_processor_manager:wrap_schema(schema),
+metadata_schema = metadata_schema,
+}
+
+
+function _M.check_schema(conf, schema_type)
+if schema_type == core.schema.TYPE_METADATA then
+return core.schema.check(metadata_schema, conf)
+end
+return core.schema.check(schema, conf)
+end
+
+
+local function send_http_data(conf, log_message)
+local err_msg
+local res = true
+local url_decoded = url.parse(conf.endpoint_addr)
+local host = url_decoded.host
+local port = url_decoded.port
+
+core.log.info("sending a batch logs to ", conf.endpoint_addr)
+
+if not port then
+if url_decoded.scheme == "https" then
+port = 443
+else
+port = 80
+end
+end
+
+local httpc = http.new()
+httpc:set_timeout(conf.timeout * 1000)
+local ok, err = httpc:connect(host, port)
+
+if not ok then
+return false, "failed to connect to host[" .. host .. "] port["
+.. tostring(port) .. "] " .. err
+end
+
+if url_decoded.scheme == "https" and conf.ssl_verify then
+ok, err = httpc:ssl_handshake(true, host, false)

Review comment:
   sorry, my fault.




-- 
This is an automated message from the 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] guoqqqi edited a comment on pull request #870: chore:add the LTS download button of 'apisix'

2022-02-09 Thread GitBox


guoqqqi edited a comment on pull request #870:
URL: https://github.com/apache/apisix-website/pull/870#issuecomment-1033784867


   @CP3cham ping


-- 
This is an automated message from the 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] guoqqqi commented on pull request #870: chore:add the LTS download button of 'apisix'

2022-02-09 Thread GitBox


guoqqqi commented on pull request #870:
URL: https://github.com/apache/apisix-website/pull/870#issuecomment-1033784867


   cc @CP3cham ping


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

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

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




  1   2   >