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 05:46:27 UTC

[GitHub] [apisix] membphis commented on a change in pull request #2516: feature: support percentage for fault injection

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