apisix icon indicating copy to clipboard operation
apisix copied to clipboard

chore: The maximum length of the name when creating a route is 100, but an error will still be prompted at the end

Open idbeta opened this issue 6 years ago • 11 comments

  • Why do you submit this issue?
  • [ ] Question or discussion
  • [x] Bug
  • [ ] Requirements
  • [ ] Feature or performance improvement
  • [ ] Other

Bug

  • Which version of Apache APISIX Dashboard, OS, and Browser? APISIX 2.0 + APISIX-dashboard 2.0

The maximum length of the name when creating a route is 100, but input a name of 100 length an error will still be prompted at the end. image

idbeta avatar Nov 08 '20 12:11 idbeta

Need to check if this rule is set on the frontend first.

juzhiyuan avatar Nov 08 '20 13:11 juzhiyuan

I reproduce this bug in my local env with branch v2.0.

Maybe the Front-end and the Back-end need to recalibrate the rules, not sure if the Back-end has updated the rules again. cc @idbeta @juzhiyuan

image image

LiteSun avatar Nov 09 '20 01:11 LiteSun

On the frontend, does it have that rule? No more than 100 characters. If yes, then just let the backend to check.

juzhiyuan avatar Nov 09 '20 01:11 juzhiyuan

Front-end has that rule. image

LiteSun avatar Nov 09 '20 02:11 LiteSun

Then it should be a bug from backend

juzhiyuan avatar Nov 09 '20 02:11 juzhiyuan

it seems to be a small bug, @gxthrj I think you can help to fix this bug

can we fix it in 2.0?

membphis avatar Nov 09 '20 05:11 membphis

It seems to fix the logic both in manager-api and APISIX, the name of route has max length 50 in APISIX

gxthrj avatar Nov 09 '20 06:11 gxthrj

@spacewander @Firstsawyou do you have time to resolve,the max length of route name is 50 in APISIX by now, it seems to short. and we had better to keep it the same as dashboard.

gxthrj avatar Nov 09 '20 06:11 gxthrj

It seems to fix the logic both in manager-api and APISIX, the name of route has max length 50 in APISIX

we should change the max length to 100, same as the dashboard.

membphis avatar Nov 09 '20 06:11 membphis

Just wait, we should make a decision on this issue, what's the proper max limit? If 100 is good to go, then we should update the backend. If 50 is enough, then let the frontend to update.

juzhiyuan avatar Nov 09 '20 06:11 juzhiyuan

If 100 is good to go, then we should update the backend.

I vote for this. 50 is small.

membphis avatar Nov 09 '20 07:11 membphis