You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/04/15 05:49:37 UTC

[GitHub] [apisix] Gary-Airwallex opened a new issue #4057: bug: setting an empty global rule stops route plugins from running?

Gary-Airwallex opened a new issue #4057:
URL: https://github.com/apache/apisix/issues/4057


   ### Issue description
   See steps to reproduce.
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 2.5
   * OS (cmd: `uname -a`): Ubuntu 18.04
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): 1.19.3.1
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): 3.4.0
   * apisix-dashboard version, if have:
   
   ### Minimal test code / Steps to reproduce the issue
   
   1. Create a global rule with an empty map of plugins
   ```
   local code, body = t('/apisix/admin/global_rules/1',
                    ngx.HTTP_PUT,
                    [[{
                       "plugins": {}
                   }]]
                   )
   ```
            
   2. Create a route, enable prometheus
   ```
   local code, body = t('/apisix/admin/routes/1',
                   ngx.HTTP_PUT,
                   [[{
                       "plugins": {
                           "prometheus": {}
                       },
                       "upstream": {
                           "nodes": {
                               "127.0.0.1:1980": 1
                           },
                           "type": "roundrobin"
                       },
                       "uri": "/hello"
                   }]]
                   )
   ```
   3. Request `/hello`. 
   4. Get prometheus metrics.
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   The `/hello` request is not counted by apisix_http_status. In fact, it never entered log phase of exporter.lua.
   ### What's the expected result?
   Prometheus plugin should work as normal.


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

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



[GitHub] [apisix] Firstsawyou commented on issue #4057: bug: setting an empty global rule stops route plugins from running?

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #4057:
URL: https://github.com/apache/apisix/issues/4057#issuecomment-820241509


   I tested it and reproduced it.
   
   @spacewander  Should we need to fix it?


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

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



[GitHub] [apisix] Yiyiyimu closed issue #4057: bug: setting an empty global rule stops route plugins from running?

Posted by GitBox <gi...@apache.org>.
Yiyiyimu closed issue #4057:
URL: https://github.com/apache/apisix/issues/4057


   


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

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



[GitHub] [apisix] Yiyiyimu closed issue #4057: bug: setting an empty global rule stops route plugins from running?

Posted by GitBox <gi...@apache.org>.
Yiyiyimu closed issue #4057:
URL: https://github.com/apache/apisix/issues/4057


   


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

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