Skip to content

Commit

Permalink
Shorten parameter name
Browse files Browse the repository at this point in the history
Signed-off-by: Bernd Verst <[email protected]>
  • Loading branch information
berndverst committed Jan 31, 2024
1 parent ec8bcfa commit 460cb4b
Show file tree
Hide file tree
Showing 4 changed files with 245 additions and 1,928 deletions.
4 changes: 2 additions & 2 deletions src/containerapp/azext_containerapp/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def load_arguments(self, _):
c.argument('in_timeout_response_in_seconds', type=int, options_list=['--in-timeout'], help='Specify the response timeout in seconds for the inbound policy. This spans between the point at which the entire request has been processed and when the response has been completely processed. This timeout includes all retries.')

with self.argument_context('containerapp env dapr-component resiliency', arg_group='Inbound Circuit Breaker Policy') as c:
c.argument('in_circuit_breaker_consecutive_errors', type=int, options_list=['--in-cb-sequential-errors'], help='The number of consecutive errors before the circuit is opened.')
c.argument('in_circuit_breaker_consecutive_errors', type=int, options_list=['--in-cb-sequential-err'], help='The number of consecutive errors before the circuit is opened.')
c.argument('in_circuit_breaker_interval', type=int, options_list=['--in-cb-interval'], help='The optional interval in seconds after which the error count resets to 0. An interval of 0 will never reset. If not specified, the timeout value will be used.')
c.argument('in_circuit_breaker_timeout', type=int, options_list=['--in-cb-timeout'], help='The interval in seconds until a retry attempt is made after the circuit is opened.')

Expand All @@ -151,7 +151,7 @@ def load_arguments(self, _):
c.argument('out_timeout_response_in_seconds', type=int, options_list=['--out-timeout'], help='Specify the response timeout in seconds for the outbound policy. This spans between the point at which the entire request has been processed and when the response has been completely processed. This timeout includes all retries.')

with self.argument_context('containerapp env dapr-component resiliency', arg_group='Outbound Circuit Breaker Policy') as c:
c.argument('out_circuit_breaker_consecutive_errors', type=int, options_list=['--out-cb-sequential-errors'], help='The number of consecutive errors before the circuit is opened.')
c.argument('out_circuit_breaker_consecutive_errors', type=int, options_list=['--out-cb-sequential-err'], help='The number of consecutive errors before the circuit is opened.')
c.argument('out_circuit_breaker_interval', type=int, options_list=['--out-cb-interval'], help='The optional interval in seconds after which the error count resets to 0. An interval of 0 will never reset. If not specified, the timeout value will be used.')
c.argument('out_circuit_breaker_timeout', type=int, options_list=['--out-cb-timeout'], help='The interval in seconds until a retry attempt is made after the circuit is opened.')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,18 +138,18 @@ def validate_arguments(self):
self.validate_positive_argument("out_http_retry_delay_in_milliseconds", "out-http-delay")
self.validate_positive_argument("in_http_retry_interval_in_milliseconds", "in-http-interval")
self.validate_positive_argument("out_http_retry_interval_in_milliseconds", "out-http-interval")
self.validate_positive_argument("in_circuit_breaker_consecutive_errors", "in-cb-sequential-errors")
self.validate_positive_argument("out_circuit_breaker_consecutive_errors", "out-cb-sequential-errors")
self.validate_positive_argument("in_circuit_breaker_consecutive_errors", "in-cb-sequential-err")
self.validate_positive_argument("out_circuit_breaker_consecutive_errors", "out-cb-sequential-err")
self.validate_positive_argument("in_circuit_breaker_timeout", "in-cb-timeout")
self.validate_positive_argument("out_circuit_breaker_timeout", "out-cb-timeout")
self.validate_not_negative_argument("in_circuit_breaker_interval", "in-cb-interval")
self.validate_not_negative_argument("out_circuit_breaker_interval", "out-cb-interval")
self.validate_required_argument_group(required_argument_names=["in_circuit_breaker_consecutive_errors", "in_circuit_breaker_timeout"],
required_param_names=["in-cb-sequential-errors", "in-cb-timeout"],
required_param_names=["in-cb-sequential-err", "in-cb-timeout"],
optional_argument_names=["in_circuit_breaker_interval"],
condition_message="when providing an inbound dapr component circuit breaker policy.")
self.validate_required_argument_group(required_argument_names=["out_circuit_breaker_consecutive_errors", "out_circuit_breaker_timeout"],
required_param_names=["out-cb-sequential-errors", "out-cb-timeout"],
required_param_names=["out-cb-sequential-err", "out-cb-timeout"],
optional_argument_names=["out_circuit_breaker_interval"],
condition_message="when providing an outbound dapr component circuit breaker policy.")

Expand Down
Loading

0 comments on commit 460cb4b

Please sign in to comment.