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/01/14 14:54:44 UTC

[GitHub] [apisix-dashboard] juzhiyuan opened a new issue #1300: Label feature doesn't support Chinese as key?

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


   # Bug report
   
   ## Describe the bug
   
   When I create a route with Label, an error occurred when using Chinese as key.
   
   ## Expected behavior
   
   A clear and concise description of what you expected to happen.
   
   ## Screenshots
   
   ![image](https://user-images.githubusercontent.com/2106987/104607114-706d0c80-56bb-11eb-8c6b-6d0ac3181eb0.png)
   
   ![image](https://user-images.githubusercontent.com/2106987/104606805-1c622800-56bb-11eb-9536-be01b06b92de.png)
   
   ## System information
   
   - Version: master branch
   
   ## Additional context
   
   ```sh
   $ curl 'http://139.217.190.60/apisix/admin/routes/337358106080052037' \
     -X 'PUT' \
     -H 'Accept: application/json' \
     --data-binary '{"name":"route_with_servicenoname","status":1,"methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],"priority":0,"uris":["/*"],"labels":{"分组1":"标签2","API_VERSION":"v1"},"vars":[],"upstream_id":"337065625484526491"}' 
   ```
   


----------------------------------------------------------------
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-dashboard] tokers commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-761728111


   Agree + 1, as long as we have a strong mechanism to detect malformed label, it's no problem to accept any language.


----------------------------------------------------------------
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-dashboard] juzhiyuan commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-760640883


   failed with English.
   
   ```sh
   curl 'http://139.217.190.60/apisix/admin/routes' \
     -H 'Content-Type: application/json;charset=UTF-8' \
     --data-binary '{"name":"test_route_with_label","desc":"","status":1,"methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],"priority":0,"uris":["/*"],"labels":{"Group1":"测试 API","Group2":"示例 API"},"vars":[],"upstream_id":"337065625484526491"}' 
   ```
   
   ```json
   {"code":10000,"message":"schema validate failed: labels.Group1: Does not match pattern '^[a-zA-Z0-9-_.]+$'\nlabels.Group2: Does not match pattern '^[a-zA-Z0-9-_.]+$'"}
   ```


----------------------------------------------------------------
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-dashboard] juzhiyuan commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-760266306


   but this is used as a label's key 🤔 


----------------------------------------------------------------
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-dashboard] imjoey commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-760282766


   > @juzhiyuan
   > 
   > Chinese characters as the name or value of Label is not such common. Until Kubernetes 1.17+, the name and value of Label are strictly limited to match `'([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]`, not accepting Chinese. IMHO, we could keep the same as Kubernetes.
   > 
   > Looking forward to others insights. Thanks.
   
   > but this is used as a label's key 🤔
   
   @juzhiyuan sorry for not clear enough. The `name` mentioned above is the `key` of Label.
   
   


----------------------------------------------------------------
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-dashboard] juzhiyuan commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-761728786


   yep, then who is glad to take this issue?


----------------------------------------------------------------
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-dashboard] liuxiran commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
liuxiran commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-760288688


   Technical aspects aside, I would vote for supporting Chinese labels 🤦‍♀️, both the key and value, that would be convenient for Chinese users


----------------------------------------------------------------
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-dashboard] starsz commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
starsz commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-760582566


   I think we should support Chinese labels. This will be more convenient for some companies.
   In another way, we only need to update the validate schema, then we can support the Chinese labels., why not?
   


----------------------------------------------------------------
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-dashboard] nic-chen commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-764217528


   need support in APISIX first if we want to support 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-dashboard] nic-chen commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-764231399


   cc @spacewander 


----------------------------------------------------------------
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-dashboard] juzhiyuan commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-760247886


   Chinese as the key is a normal requirement IMHO, what's your opinion?
   
   cc @liuxiran @nic-chen @membphis 


----------------------------------------------------------------
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-dashboard] membphis commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-764226137


   do we need to transfer this issue to APISIX?


----------------------------------------------------------------
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-dashboard] nic-chen commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-764217528






----------------------------------------------------------------
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-dashboard] imjoey commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-760595948


   Yep, I slightly changed my mind and we should confirm the following two things fine, then we can add support.
   
   - If Chinese is supported, it should be better to also support all other non English languages
   - As APISIX can be deployed in kubernetes as ingress controller at present, maybe as sidecar in future, we shall ensure that this label will not introduce the incompatibility with kubernetes.
   
   Thanks.
   


----------------------------------------------------------------
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-dashboard] juzhiyuan commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-760312606


   let's wait for others' opinion 💯 


----------------------------------------------------------------
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-dashboard] imjoey commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
imjoey commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-760259140


   @juzhiyuan
   
   Chinese characters as the name or value of Label is not such common. Until Kubernetes 1.17+, the name and value of Label are strictly limited to match `'([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]`, not accepting Chinese. IMHO,  we could keep the same as Kubernetes. 
   
   Looking forward to others insights. Thanks.
   


----------------------------------------------------------------
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-dashboard] membphis commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-764226137


   do we need to transfer this issue to APISIX?


----------------------------------------------------------------
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-dashboard] juzhiyuan commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-760612472


   thanks for your point! @gxthrj please take a look at this issue, too.


----------------------------------------------------------------
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-dashboard] membphis commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-760613921


   > Chinese as the key is a normal requirement IMHO, what's your opinion?
   > * If Chinese is supported, it should be better to also support all other non English languages
   
   agree to support Chinese and other non-English languages.


----------------------------------------------------------------
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-dashboard] gxthrj commented on issue #1300: Label feature doesn't support Chinese as key?

Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #1300:
URL: https://github.com/apache/apisix-dashboard/issues/1300#issuecomment-760788203


   Agree, I did not find a suitable reason to refuse to use Chinese as the key 👍 


----------------------------------------------------------------
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