Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the problem of empty vars expressions in "Advanced Routing Matching Conditions" #1798

Closed
Firstsawyou opened this issue Apr 20, 2021 · 3 comments · Fixed by #1921
Closed

the problem of empty vars expressions in "Advanced Routing Matching Conditions" #1798

Firstsawyou opened this issue Apr 20, 2021 · 3 comments · Fixed by #1921
Labels

Comments

@Firstsawyou
Copy link
Contributor

Firstsawyou commented Apr 20, 2021

Feature request

Please describe your feature

When adding a route, Dashboard will add an empty expression of "vars":{} by default:
image

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 maybe Dashboard 2.6 and APISIX 2.5 are used together, and the above-mentioned incompatibility problem may occur.

Back-end related issues: apache/apisix#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.

@Firstsawyou Firstsawyou changed the title the problem of empty vars expressions in advanced roads the problem of empty vars expressions in "Advanced Routing Matching Conditions" Apr 20, 2021
@belongwqz
Copy link

does Dashboard version 2.6 fix this error?

@Firstsawyou
Copy link
Contributor Author

does Dashboard version 2.6 fix this error?

This is a known issue of APISIX 2.5, and it is incompatible with data created in earlier versions of Dashboard 2.5. This problem has been fixed in later versions of APISIX 2.5.

apache/apisix#4048
apache/apisix#4056

@juzhiyuan
Copy link
Member

@belongwqz no, wait for #1799

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants