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/01/19 12:33:55 UTC

[GitHub] [apisix] spacewander opened a new pull request #6151: fix(limit-count): keep the counter if the plugin conf is the same

spacewander opened a new pull request #6151:
URL: https://github.com/apache/apisix/pull/6151


   Signed-off-by: spacewander <sp...@gmail.com>
   
   ### What this PR does / why we need it:
   <!--- Why is this change required? What problem does it solve? -->
   <!--- If it fixes an open issue, please link to the issue here. -->
   
   ### Pre-submission checklist:
   
   <!--
   Please follow the PR manners:
   1. Use Draft if the PR is not ready to be reviewed
   2. Test is required for the feat/fix PR, unless you have a good reason
   3. Doc is required for the feat PR
   4. Use a new commit to resolve review instead of `push -f`
   5. If you need to resolve merge conflicts after the PR is reviewed, please merge master but do not rebase
   6. Use "request review" to notify the reviewer once you have resolved the review
   7. Only reviewer can click "Resolve conversation" to mark the reviewer's review resolved
   -->
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [x] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


-- 
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 merged pull request #6151: fix(limit-count): keep the counter if the plugin conf is the same

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #6151:
URL: https://github.com/apache/apisix/pull/6151


   


-- 
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] tokers commented on a change in pull request #6151: fix(limit-count): keep the counter if the plugin conf is the same

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



##########
File path: t/plugin/limit-count-redis-cluster.t
##########
@@ -63,7 +63,7 @@ __DATA__
 GET /t
 --- error_code: 400
 --- response_body
-{"error_msg":"failed to check the configuration of plugin limit-count err: failed to validate dependent schema for \"policy\": value should match only one schema, but matches none"}
+{"error_msg":"failed to check the configuration of plugin limit-count err: else clause did not match"}

Review comment:
       The error messages is confusing after changes, it cannot help API callers troubleshoot effectively, will we have some enhancements? 




-- 
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 #6151: fix(limit-count): keep the counter if the plugin conf is the same

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



##########
File path: t/plugin/limit-count-redis-cluster.t
##########
@@ -63,7 +63,7 @@ __DATA__
 GET /t
 --- error_code: 400
 --- response_body
-{"error_msg":"failed to check the configuration of plugin limit-count err: failed to validate dependent schema for \"policy\": value should match only one schema, but matches none"}
+{"error_msg":"failed to check the configuration of plugin limit-count err: else clause did not match"}

Review comment:
       Sure. We can improve it in the jsonschema library.




-- 
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 #6151: fix(limit-count): keep the counter if the plugin conf is the same

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



##########
File path: t/plugin/limit-count-redis-cluster.t
##########
@@ -63,7 +63,7 @@ __DATA__
 GET /t
 --- error_code: 400
 --- response_body
-{"error_msg":"failed to check the configuration of plugin limit-count err: failed to validate dependent schema for \"policy\": value should match only one schema, but matches none"}
+{"error_msg":"failed to check the configuration of plugin limit-count err: else clause did not match"}

Review comment:
       Sure. We can improve it in the jsonschema library.




-- 
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] tokers commented on a change in pull request #6151: fix(limit-count): keep the counter if the plugin conf is the same

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



##########
File path: t/plugin/limit-count-redis-cluster.t
##########
@@ -63,7 +63,7 @@ __DATA__
 GET /t
 --- error_code: 400
 --- response_body
-{"error_msg":"failed to check the configuration of plugin limit-count err: failed to validate dependent schema for \"policy\": value should match only one schema, but matches none"}
+{"error_msg":"failed to check the configuration of plugin limit-count err: else clause did not match"}

Review comment:
       The error messages is confusing after changes, it cannot help API callers troubleshoot effectively, will we have some enhancements? 




-- 
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 merged pull request #6151: fix(limit-count): keep the counter if the plugin conf is the same

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #6151:
URL: https://github.com/apache/apisix/pull/6151


   


-- 
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] bisakhmondal commented on a change in pull request #6151: fix(limit-count): keep the counter if the plugin conf is the same

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



##########
File path: apisix/core/json.lua
##########
@@ -26,6 +26,10 @@ local cached_tab = {}
 local _M = {
     version = 0.1,
     decode = require("cjson.safe").decode,
+    -- This method produces the same encoded string when the input is not changed.
+    -- Different calls with cjson.encode will produce different string because
+    -- it doesn't maintain the object key order.
+    stably_encode = require("dkjson").encode

Review comment:
       Much needed feature : )




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