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 2022/03/16 01:08:59 UTC

[GitHub] [apisix] rpei2022 opened a new pull request #6622: improve fetch_api_router

rpei2022 opened a new pull request #6622:
URL: https://github.com/apache/apisix/pull/6622


   ### Description
   
   <!-- Please include a summary of the change and which issue is fixed. -->
   <!-- Please also include relevant motivation and context. -->
   
   Fixes # (issue)
   
   ### Checklist
   
   - [ ] I have explained the need for this PR and the problem it solves
   - [ ] I have explained the changes or the new features added in this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [ ] I have verified that this change is backwards compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark PR as draft until its ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after you make changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on a change in pull request #6622: improve fetch_api_router

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #6622:
URL: https://github.com/apache/apisix/pull/6622#discussion_r828623830



##########
File path: apisix/api_router.lua
##########
@@ -42,6 +42,10 @@ function fetch_api_router()
             core.log.debug("fetched api routes: ",
                            core.json.delay_encode(api_routes, true))
             for _, route in ipairs(api_routes) do
+                if route.uri == nil then
+                    break

Review comment:
       Would be better to add an error log?




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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] rpei2022 commented on a change in pull request #6622: improve fetch_api_router

Posted by GitBox <gi...@apache.org>.
rpei2022 commented on a change in pull request #6622:
URL: https://github.com/apache/apisix/pull/6622#discussion_r828673271



##########
File path: apisix/api_router.lua
##########
@@ -42,6 +42,10 @@ function fetch_api_router()
             core.log.debug("fetched api routes: ",
                            core.json.delay_encode(api_routes, true))
             for _, route in ipairs(api_routes) do
+                if route.uri == nil then
+                    break

Review comment:
       
   > Would be better to add an error log?
   good suggestion
   




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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] rpei2022 closed pull request #6622: fix: improve fetch_api_router

Posted by GitBox <gi...@apache.org>.
rpei2022 closed pull request #6622:
URL: https://github.com/apache/apisix/pull/6622


   


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] rpei2022 commented on pull request #6622: fix: improve fetch_api_router

Posted by GitBox <gi...@apache.org>.
rpei2022 commented on pull request #6622:
URL: https://github.com/apache/apisix/pull/6622#issuecomment-1070322880


   > 
   
   The uris used in the example-plugin.lua seems to be correct, because apisix/control/router.lua use uris 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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on pull request #6622: fix: improve fetch_api_router

Posted by GitBox <gi...@apache.org>.
spacewander commented on pull request #6622:
URL: https://github.com/apache/apisix/pull/6622#issuecomment-1070360225


   > > 
   > 
   > I am not quite sure, the uris used in the example-plugin.lua seems to be correct, because apisix/control/router.lua use uris too. @spacewander
   
   Yes. You are right.


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] liangliang4ward commented on pull request #6622: improve fetch_api_router

Posted by GitBox <gi...@apache.org>.
liangliang4ward commented on pull request #6622:
URL: https://github.com/apache/apisix/pull/6622#issuecomment-1069795215


   you should rename the PR title according to https://github.com/zeke/semantic-pull-requests.


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] rpei2022 closed pull request #6622: fix: improve fetch_api_router

Posted by GitBox <gi...@apache.org>.
rpei2022 closed pull request #6622:
URL: https://github.com/apache/apisix/pull/6622


   


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

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] rpei2022 edited a comment on pull request #6622: fix: improve fetch_api_router

Posted by GitBox <gi...@apache.org>.
rpei2022 edited a comment on pull request #6622:
URL: https://github.com/apache/apisix/pull/6622#issuecomment-1070322880


   > 
   
   I am not quite sure, the uris used in the example-plugin.lua seems to be correct, because apisix/control/router.lua use uris too. @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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org