-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculated break duration for Circuit breaker #1715
Conversation
@dotnet-policy-service agree |
src/Polly.Core/CircuitBreaker/CircuitBreakerStrategyOptions.TResult.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/Controller/CircuitStateController.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/Controller/CircuitStateController.cs
Outdated
Show resolved
Hide resolved
test/Polly.Core.Tests/CircuitBreaker/Health/RollingHealthMetricsTests.cs
Outdated
Show resolved
Hide resolved
test/Polly.Core.Tests/CircuitBreaker/Controller/CircuitStateControllerTests.cs
Outdated
Show resolved
Hide resolved
test/Polly.Core.Tests/CircuitBreaker/Controller/CircuitStateControllerTests.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/CircuitBreakerStrategyOptions.TResult.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/Controller/CircuitStateController.cs
Outdated
Show resolved
Hide resolved
Please also update the related anti-pattern under the circuit breaker docs. |
test/Polly.Core.Tests/CircuitBreaker/Controller/CircuitStateControllerTests.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/BreakDurationGeneratorArguments.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/BreakDurationGeneratorArguments.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/CircuitBreakerStrategyOptions.TResult.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/CircuitBreakerStrategyOptions.TResult.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/Controller/CircuitStateController.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/CircuitBreakerStrategyOptions.TResult.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/BreakDurationGeneratorArguments.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/BreakDurationGeneratorArguments.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/BreakDurationGeneratorArguments.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/BreakDurationGeneratorArguments.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/BreakDurationGeneratorArguments.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/BreakDurationGeneratorArguments.cs
Outdated
Show resolved
Hide resolved
src/Polly.Core/CircuitBreaker/BreakDurationGeneratorArguments.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run the build locally and fix the analyser warnings that are reported to you, such as code formatting issues and the Public API Analyser warnings. Opening the code with Visual Studio should provide you with gestures on the analyzer warnings to automatically update the appropriate files.
test/Polly.Core.Tests/CircuitBreaker/Controller/AdvancedCircuitBehaviorTests.cs
Outdated
Show resolved
Hide resolved
test/Polly.Core.Tests/CircuitBreaker/Health/RollingHealthMetricsTests.cs
Outdated
Show resolved
Hide resolved
test/Polly.Core.Tests/CircuitBreaker/Controller/CircuitStateControllerTests.cs
Outdated
Show resolved
Hide resolved
test/Polly.Core.Tests/CircuitBreaker/Controller/CircuitStateControllerTests.cs
Outdated
Show resolved
Hide resolved
test/Polly.Core.Tests/CircuitBreaker/Controller/CircuitStateControllerTests.cs
Outdated
Show resolved
Hide resolved
test/Polly.Core.Tests/CircuitBreaker/Controller/CircuitStateControllerTests.cs
Outdated
Show resolved
Hide resolved
The build is now complaining about not all of the changes' code paths being covered by a test. You can use the coverage report attached to the build artifacts to take a look at what is missing. |
5448c32
to
41fd38c
Compare
Pull Request
The issue or feature being addressed
#653
Details on the issue fix or feature implementation
FailureCount
get property toCircuitBehavior
to retrieve the count of failures._breakDurationGenerator
of typeFunc<int, TimeSpan>
toCircuitStateController
for dynamic break duration generation.CircuitStateController
with an overload to accommodate_breakDurationGenerator
.FailureCount
intoHealthInfo
.OpenCircuitFor_NeedsLock
to assign the_blockedUntil
value based on both the presence ofbreakDuration
and the number of failures.Confirm the following