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 2020/11/07 08:00:26 UTC

[GitHub] [apisix-dashboard] idbeta opened a new issue #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   - Why do you submit this issue?
   - [ ] Question or discussion
   - [x] Bug
   - [ ] Requirements
   - [ ] Feature or performance improvement
   - [ ] Other
   
   I used admin API created a consumer like this
   ```
   curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
     "username": "user123",
     "plugins": {
         "jwt-auth": {
             "key": "dd",
             "secret": "my-secret-key"
         }
     }
   }'
   ```
   but when I try to delete it by dashboard, it prompt error
   ![image](https://user-images.githubusercontent.com/7396835/98435973-4d9a0700-2112-11eb-91d1-8dda51ac0d01.png)
   


----------------------------------------------------------------
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] idbeta commented on issue #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   @membphis 
   request
   ```
   Request URL: http://127.0.0.1:8080/apisix/admin/consumers/
   Request Method: DELETE
   Status Code: 200 OK
   ```
   response
   ![image](https://user-images.githubusercontent.com/7396835/98436734-c43a0300-2118-11eb-9ed3-06334d0405e4.png)
   


----------------------------------------------------------------
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 edited a comment on issue #718: bug: The consumer can not be delete by dashboard which created by admin API

Posted by GitBox <gi...@apache.org>.
membphis edited a comment on issue #718:
URL: https://github.com/apache/apisix-dashboard/issues/718#issuecomment-723520576


   @nic-chen please confim if we need any update for manager-api. I think we do not need to update `manager-api`.
   
   if we do not need to update `manager-api`, we should remove the label `backend`.


----------------------------------------------------------------
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 edited a comment on issue #718: bug: The consumer can not be delete by dashboard which created by admin API

Posted by GitBox <gi...@apache.org>.
juzhiyuan edited a comment on issue #718:
URL: https://github.com/apache/apisix-dashboard/issues/718#issuecomment-723427291


   ![image](https://user-images.githubusercontent.com/2106987/98438448-47615600-2125-11eb-8e7d-b04dbed5d99a.png)
   
   @membphis This issue is related to API, that's because the API doesn't return ID as agreed.
   
   https://github.com/apache/apisix-dashboard/blob/v2.0/web/src/pages/Consumer/List.tsx#L65


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   Yes, the frontend has to update the consumer.


----------------------------------------------------------------
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 edited a comment on issue #718: bug: The consumer can not be delete by dashboard which created by admin API

Posted by GitBox <gi...@apache.org>.
membphis edited a comment on issue #718:
URL: https://github.com/apache/apisix-dashboard/issues/718#issuecomment-723512066


   the `id` and `username` must be the same.  if they were not the same, will return an error message. confirm this.
   
   the doc is wrong. will update it soon.
   
   if we can get `username`, we should use `username`. if not, we can use `id`.
   
   I create an issue right now: https://github.com/apache/apisix/issues/2651


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   yes, I have created the issue in APISIX project: https://github.com/apache/apisix/issues/2653


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   ![image](https://user-images.githubusercontent.com/2106987/98438448-47615600-2125-11eb-8e7d-b04dbed5d99a.png)
   
   @membphis This issue is related to API, that's because the API doesn't return ID as agreed.


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   @juzhiyuan if we both use `username`, please confirm the `frontend` need to update.
   
   it shows you mainly use `id` now:
   https://github.com/apache/apisix-dashboard/issues/718#issuecomment-723427291


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   Why the frontend should do this fallback? If it's sure that we must use the username as identify (from docs), then both fe and backend should use the username. 


----------------------------------------------------------------
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] moonming commented on issue #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   Why the update time is 1970 in dashboard? @juzhiyuan 


----------------------------------------------------------------
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 edited a comment on issue #718: bug: The consumer can not be delete by dashboard which created by admin API

Posted by GitBox <gi...@apache.org>.
membphis edited a comment on issue #718:
URL: https://github.com/apache/apisix-dashboard/issues/718#issuecomment-723418412


   > but when I try to delete it by dashboard, it prompt error
   
   What is the request sent by the front end at this time?
   
   Is there a network API call?


----------------------------------------------------------------
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 closed issue #718: bug: The consumer can not be delete by dashboard which created by admin API

Posted by GitBox <gi...@apache.org>.
juzhiyuan closed issue #718:
URL: https://github.com/apache/apisix-dashboard/issues/718


   


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   @juzhiyuan 
   
   > if we can get `username`, we should use `username`. if not, we can use `id`.
   
   `frontend` should use this way to read the consumer `id`.


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   @membphis  That’s because the API doesn’t return consumer name.


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   I suggest we remove `input.ID` to avoid trouble. only use the consumer name is clearer and simpler.


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   > @nic-chen please confim if we need any update for manager-api. I think we do not need to update `manager-api`.
   > 
   > if we do not need to update `manager-api`, we should remove the label `backend`.
   
   yes, we do not need to update `manager-api`.


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   I check the process in APISIX, I am sure that we can use `username` is enough. then we can ignore the field `id`.
   
   > use the username as identify (from docs), then both fe and backend should use the username
   
   agree +1


----------------------------------------------------------------
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] moonming commented on issue #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   Then we should remove id of consumer in schema too. Only keep name of consumer


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   > but when I try to delete it by dashboard, it prompt error


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   > https://github.com/apache/apisix-dashboard/blob/v2.0/api/internal/handler/consumer/consumer.go#L102-L110
   > 
   > Should the manager-api still handle ID? cc @nic-chen @membphis
   
   the schema of consumer has field ID, the code here is just used to make sure keep the ID same as name. 
   
   


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   > > @membphis  That’s because the API doesn’t return consumer name.
   > 
   > But the user name can display in dashboard
   
   ID has been used since the beginning, and no one tells us to fallback to a username.


----------------------------------------------------------------
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 edited a comment on issue #718: bug: The consumer can not be delete by dashboard which created by admin API

Posted by GitBox <gi...@apache.org>.
membphis edited a comment on issue #718:
URL: https://github.com/apache/apisix-dashboard/issues/718#issuecomment-723512066


   the `id` and `username` must be the same.  if they were not the same, will return an error message. confirm this.
   
   if we can get `username`, we should use `username`. if not, we can use `id`.
   
   I create an issue right now to fix the doc issue: https://github.com/apache/apisix/issues/2651


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   ![image](https://user-images.githubusercontent.com/2106987/98438634-a7a4c780-2126-11eb-99a5-63ebe6cfb541.png)
   
   @membphis @moonming  And according to this doc, we MUST use the ID as the key instead of the username.


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   the `id` and `username` must be the same.  if they were not the same, will return an error message. confirm this.
   
   the doc is wrong. will update it soon.
   
   if we can get `username`, we should use `username`. if not, we can use `id`.
   


----------------------------------------------------------------
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] moonming commented on issue #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   > @membphis  That’s because the API doesn’t return consumer name.
   
   But the user name can display in dashboard 


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   > Why the update time is 1970 in dashboard? @juzhiyuan
   
   because the date returned from API is invalid.


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   @idbeta  Why not paste the response here?


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   @nic-chen please if we need any update for manager-api. I think we do not need to update `manager-api`.
   
   if we do not need to update `manager-api`, we should remove the label `backend`.


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   > Request URL: http://127.0.0.1:8080/apisix/admin/consumers/
   > Request Method: DELETE
   
   the URL should be wrong. missing consumer name.
   
   https://github.com/apache/apisix/blob/master/doc/admin-api.md#consumer


----------------------------------------------------------------
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 #718: bug: The consumer can not be delete by dashboard which created by admin API

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


   https://github.com/apache/apisix-dashboard/blob/v2.0/api/internal/handler/consumer/consumer.go#L102-L110
   
   Should the manager-api still handle ID? cc @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