Firstsawyou opened a new issue #1798:
URL: https://github.com/apache/apisix-dashboard/issues/1798


   # Feature request
   
   ## Please describe your feature
   
   When adding a route, Dashboard will add an empty expression of `"vars":{}` 
by default:
   
![image](https://user-images.githubusercontent.com/52862365/115331938-6d594f00-a1c9-11eb-9640-f0e3bbcef968.png)
   
   However, only in the APISIX 2.5 version, APISIX will perform schema 
verification on the `"vars":{}` expression in the route. If there is 
`"vars":{}` in the route, the following error message will be reported:
   
   ```
   2021/04/14 14:09:03 [error] 42#42: 1 [lua] config_etcd.lua:230: 
load_full_data(): failed to check item data of [/apisix/routes] err:failed to 
validate the 'vars' expression: rule too short ,val: 
{"uris":["/ecom/"],"vars":{},"hosts":["dev.url","develop.url"],"id":"350417588708180914","update_time":1618401644,"status":1,"create_time":1618394758,"name":"ecom_dev_v2","upstream":{"hash_on":"vars","scheme":"http","type":"roundrobin","timeout":{"read":6000,"connect":6000,"send":6000},"pass_host":"pass","nodes":[{"host":"ecom-edg.development.svc.cluster.local","weight":1,"port":8085,"priority":0}]},"priority":0,"methods":["GET","POST","PUT","DELETE"]},
 context: init_worker_by_lua*
   ```
   
   I see that the community Dashboard 2.6 is ready to be released, which will 
be used in conjunction with the APISIX 2.5 version. But I am not sure whether 
Dashboard 2.6 will add the empty expression of `"vars":{}` by default when 
adding routes. If there is, then it is possible that Dashboard 2.6 and APISIX 
2.5 may be used in conjunction with APISIX 2.5, and the above-mentioned 
incompatibility may occur .
   
   Back-end related issues: https://github.com/apache/apisix/issues/4048
   
   ## Describe the solution you'd like
   
   If Dashboard version 2.6 adds the empty expression of `"vars":{}` by default 
when adding routes, then we should remove 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:
[email protected]


Reply via email to