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/10/26 04:51:28 UTC

[GitHub] [apisix] tokers opened a new pull request #2516: feature: support percentage for fault injection

tokers opened a new pull request #2516:
URL: https://github.com/apache/apisix/pull/2516


   ### What this PR does / why we need it:
   
   Support percentage for the finer granularity fault injection.
   
   ### Pre-submission checklist:
   
   * [x] Did you explain what problem does this PR solve? Or what new features have been added?
   * [x] Have you added corresponding test cases?
   * [x] Have you modified the corresponding document?
   * [x] Is this PR backward compatible?
   


----------------------------------------------------------------
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] membphis merged pull request #2516: feature: support percentage for fault injection

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


   


----------------------------------------------------------------
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] tokers commented on a change in pull request #2516: feature: support percentage for fault injection

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



##########
File path: apisix/plugins/fault-injection.lua
##########
@@ -28,13 +30,15 @@ local schema = {
             properties = {
                 http_status = {type = "integer", minimum = 200},
                 body = {type = "string", minLength = 0},
+                percentage = {type = "integer", minimum = 0, maximum = 100}

Review comment:
       Actually the percentage is inspired from Istio. I think the purpose of fault injection is to observe whether the whole request link is still normal when some parts of them don't work so perfectly,which may need the randomness to mimic the production, instead of the deliberate order from administrator.




----------------------------------------------------------------
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] membphis commented on pull request #2516: feature: support percentage for fault injection

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


   @tokers merged already, many thx for your contribution


----------------------------------------------------------------
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] membphis commented on a change in pull request #2516: feature: support percentage for fault injection

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



##########
File path: apisix/plugins/fault-injection.lua
##########
@@ -28,13 +30,15 @@ local schema = {
             properties = {
                 http_status = {type = "integer", minimum = 200},
                 body = {type = "string", minLength = 0},
+                percentage = {type = "integer", minimum = 0, maximum = 100}

Review comment:
       I am not sure if this way is power enough.
   
   I am thinking, how about support `vars` for this feature?
   
   `vars`, here is an example: `["random_100", ">", 70]`.
   
   then we can support to use any request header or query string as condition, eg: `["arg_age", ">", 18]`




----------------------------------------------------------------
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] membphis commented on a change in pull request #2516: feature: support percentage for fault injection

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



##########
File path: apisix/plugins/fault-injection.lua
##########
@@ -28,13 +30,15 @@ local schema = {
             properties = {
                 http_status = {type = "integer", minimum = 200},
                 body = {type = "string", minLength = 0},
+                percentage = {type = "integer", minimum = 0, maximum = 100}

Review comment:
       thx for your explain 




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