bakerLecter opened a new issue, #9777:
URL: https://github.com/apache/apisix/issues/9777

   ### Current Behavior
   
   Enable Plugin in config and use it restrict some route in dashboard. Because 
there is no default config sample in dashboard when setting the workflow 
plugin. So I copy this 
https://apisix.apache.org/zh/docs/apisix/3.0/plugins/workflow sample to the 
dashboard and modified it as I expected as below.
   ```
   // I know it's wrong now.
     "workflow": {
       "_meta": {
         "disable": false
       },
       "actions": [
         [
           "return",
           {
             "code": 500
           }
         ]
       ],
       "case": [
         [
           "uri",
           "==",
           "/v1/kv.*"
         ]
       ]
     }
   ```
   After I update this route to apisix, etcd problem pop out at once. 
   
   `52#52: *1281175 [lua] config_etcd.lua:595: failed to fetch data from etcd: 
/usr/local/apisix/apisix/plugins/workflow.lua:118: bad argument #1 to 'ipairs' 
(table expected, got nil)`
   
   And the route I just add is not available, any new route adding or modified 
is not working. I remove the plugin from the route and it still working 
abnormal, but the old routes and plugins are working fine. After I remove the 
workflow plugin from the route and reboot the apisix, things getting back to 
normal.
   
   ### Expected Behavior
   
   Apisix should warn me for the wrong config in dashboard.
   And it should back to normal after I remove the wrong config for plugin 
workflow without rebooting the whole apisix.
   
   ### Error Logs
   
   46#46: *112327 [lua] config_etcd.lua:595: failed to fetch data from etcd: 
/usr/local/apisix//deps/share/lua/5.1/resty/expr/v1.lua:260: bad argument #1 to 
'str_upper' (string expected, got nil)
   47#47: *112276 [lua] config_etcd.lua:595: failed to fetch data from etcd: 
/usr/local/apisix//deps/share/lua/5.1/resty/expr/v1.lua:260: bad argument #1 to 
'str_upper' (string expected, got nil)
   52#52: *112001 [lua] config_etcd.lua:595: failed to fetch data from etcd: 
/usr/local/apisix//deps/share/lua/5.1/resty/expr/v1.lua:260: bad argument #1 to 
'str_upper' (string expected, got nil)
   
   ### Steps to Reproduce
   
   1. Run APISIX(version 3.0.0) with plugin workflow enable
   2. Run APISIX Dashboard(version 3.0.1)
   3. Adding or modify any route with plugin workflow via dashboard
   4. make sure the configuration of plugin workflow is wrong
   5. etcd problem should pop up now and any route modified will be failure but 
without any warning in dashboard
   
   ### Environment
   
   - APISIX version (run `apisix version`): version 3.0.0
   - Operating system (run `uname -a`):Linux adminapisixgw-6ffb98cb69-5xj9d 
4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):nginx 
version: openresty/1.21.4.1
   - APISIX Dashboard version, if relevant: version 3.0.1
   - Plugin runner version, for issues related to plugin runners: apisix plguin
   - LuaRocks version, for installation issues (run `luarocks --version`): not 
showing
   


-- 
This is an automated message from the 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to