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/12/02 06:16:45 UTC

[GitHub] [apisix-dashboard] JieTrancender opened a new issue #950: make api-test filed

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


   # Bug report
   
   ## Describe the bug
   
   I got the newest code of master branch, and then exec `make api-test`. unfortunate, not pass all test.
   
   ## How to Reproduce
   
   And this failed test making a dirty data in etcd.
   
   ## Expected behavior
   
   I got the newest code or master branch, and then exec `make api-test`. unfortunate, not pass all test.
   A clear and concise description of what you expected to happen.
   
   ## Screenshots
   ![image](https://user-images.githubusercontent.com/13239914/100835220-3d264380-34a8-11eb-8e63-7750f6130208.png)
   
   Add screenshots to help explain your problem if applicable.
   
   ## System information
   
   - OS: [e.g. macOS, Windows]
   - Browser (if applies) [e.g. Chrome, Safari, Edge]
   - Version: [e.g. 2.0-rc3]
   
   ## Additional context
   
   Add any other context about the problem 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] JieTrancender commented on issue #950: make api-test filed

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


   maybe i know what things happened.
   
   in **apisix** project **script** filed used to make lua code by using loadstring function, code in this:
   
   https://github.com/apache/apisix/blob/2472db56c8adbd1495707fffc0e3e4f00a8cab88/apisix/admin/routes.lua#L136-L146
   
   so the type of **script** is string, schema is `script = {type = "string", minLength = 10, maxLength = 102400}`. but in this test, **script** is a object. convert it to go structure, and then make string for lua code. code in this:
   
   https://github.com/apache/apisix-dashboard/blob/c574813eea82edcd6d95a2ea0f8857b736049717/api/internal/handler/route/route.go#L220-L237
   
   answer is clear, the route schema is not suitable. maybe we should use new schema which different from **apisix** project, but is difficut to maintain in the future, so i think we should keep it consistent.
   
   what do you think?


----------------------------------------------------------------
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 #950: make api-test filed

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


   Developers may not know this tip, FAQ is a good place 😁


----------------------------------------------------------------
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 edited a comment on issue #950: make api-test filed

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


   I also reproduced in the local environment. @nic-chen 


----------------------------------------------------------------
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 #950: make api-test filed

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


   This is indeed a bug of the unit test case.


----------------------------------------------------------------
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 #950: make api-test filed

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


   


----------------------------------------------------------------
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] JieTrancender commented on issue #950: make api-test filed

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


   Get more information by adding some log.
   After the first time to exec `make api-test`, get a test error. at the same time, dirty data keep in etcd.
   ~~~
   TestRoute: route_test.go:396:
           	Error Trace:	route_test.go:396
           	Error:      	Expected nil, but got: &errors.errorString{s:"schema validate failed: script: String length must be greater than or equal to 10"}
   ~~~
   ![image](https://user-images.githubusercontent.com/13239914/100859767-9b641e00-34ca-11eb-85e5-b1945abd98c0.png)
   
   Then, exec `make api-test` will repeat this problem.
   Failure assertion code is:
   https://github.com/apache/apisix-dashboard/blob/b4ad55d405cb61b97b9147d2924ab8121fa0e406/api/internal/handler/route/route_test.go#L393
   
   The Verified format is so complex, find where making wrong is difficult for me 😬 😬 .


----------------------------------------------------------------
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 #950: make api-test filed

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


   @JieTrancender  
   
   Currently, the Manager API relies on Lua and lib `dag-to-lua`. That's why you run test failed.
   
   please have a look at:
   
   https://github.com/apache/apisix-dashboard/blob/master/.github/workflows/backend-unit-test.yml#L27-L32
   
   and
   
   https://github.com/apache/apisix-dashboard/blob/master/.github/workflows/backend-unit-test.yml#L39-L42
   
   
   cc @moonming 
   
   
   


----------------------------------------------------------------
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 #950: make api-test filed

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


   cc @idbeta 


----------------------------------------------------------------
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 #950: make api-test filed

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


   


----------------------------------------------------------------
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 #950: make api-test filed

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


   cc @nic-chen @membphis 
   why CI pass?


----------------------------------------------------------------
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] JieTrancender edited a comment on issue #950: make api-test filed

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


   maybe i know what things happened.
   
   in **apisix** project **script** filed used to make lua code by using loadstring function, code in here:
   
   https://github.com/apache/apisix/blob/2472db56c8adbd1495707fffc0e3e4f00a8cab88/apisix/admin/routes.lua#L136-L146
   
   so the type of **script** is string, schema is `script = {type = "string", minLength = 10, maxLength = 102400}`. but in this test, **script** is a object. convert it to go structure, and then make string for lua code. code in here:
   
   https://github.com/apache/apisix-dashboard/blob/c574813eea82edcd6d95a2ea0f8857b736049717/api/internal/handler/route/route.go#L220-L237
   
   answer is clear, the route schema is not suitable. maybe we should use new schema which different from **apisix** project, but is difficut to maintain in the future, so i think we should keep it consistent.
   
   what do you think?


----------------------------------------------------------------
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 #950: make api-test filed

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


   > Currently, the Manager API relies on Lua and lib `dag-to-lua`. That's why you run test failed.
   
   Run `make api-test`, should check `dag-to-lua` dependencies, if the dependencies are not installed, we need to download and install.
   
   All of those steps, we'd better write them in `Makefile`.


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