Skip to content

Conversation

@martintmk
Copy link
Contributor

@martintmk martintmk commented Aug 10, 2023

Details on the issue fix or feature implementation

The follow-up of #1462 that introduces the base class for non-reactive resilience strategies.

Additional changes:

  • Make the construction of ResilienceStrategy internal (similar to ResilienceStrategy<T>). We now have full control over these top-level types.

This change make the decision when implementing a new resilience strategy straightforward:

  • Pick NonReactiveResilienceStrategy when you want to implement non-reactive strategy.
  • Pick ReactiveResilienceStrategy<T> when you want to implement reactive strategy.

Confirm the following

  • I started this PR by branching from the head of the default branch
  • I have targeted the PR to merge into the default branch
  • I have included unit tests for the issue/feature
  • I have successfully run a local build

@martintmk martintmk added the v8 Issues related to the new version 8 of the Polly library. label Aug 10, 2023
@martintmk martintmk added this to the v8.0.0 milestone Aug 10, 2023
@martintmk martintmk marked this pull request as ready for review August 10, 2023 09:48
public abstract class NonReactiveResilienceStrategy
{
/// <summary>
/// An implementation of non-reactive resilience strategy that executes the specified <paramref name="callback"/>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// An implementation of non-reactive resilience strategy that executes the specified <paramref name="callback"/>.
/// An implementation of a non-reactive resilience strategy that executes the specified <paramref name="callback"/>.

@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Merging #1476 (7c6cc04) into main (5f253dc) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1476      +/-   ##
==========================================
+ Coverage   83.90%   83.92%   +0.02%     
==========================================
  Files         275      276       +1     
  Lines        6498     6508      +10     
  Branches     1015     1016       +1     
==========================================
+ Hits         5452     5462      +10     
  Misses        837      837              
  Partials      209      209              
Flag Coverage Δ
linux ?
macos 83.92% <100.00%> (+0.02%) ⬆️
windows 83.92% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/Polly.Core/NullResilienceStrategy.cs 100.00% <ø> (ø)
...rc/Polly.Core/Timeout/TimeoutResilienceStrategy.cs 100.00% <ø> (ø)
...rc/Polly.Core/Utils/CompositeResilienceStrategy.cs 100.00% <ø> (ø)
...lly.Core/Utils/ReactiveResilienceStrategyBridge.cs 100.00% <ø> (ø)
...c/Polly.Core/Utils/ReloadableResilienceStrategy.cs 100.00% <ø> (ø)
...xtensions/Telemetry/TelemetryResilienceStrategy.cs 100.00% <ø> (ø)
...olly.RateLimiting/RateLimiterResilienceStrategy.cs 100.00% <ø> (ø)
...c/Polly.Core/CompositeStrategyBuilderExtensions.cs 100.00% <100.00%> (ø)
src/Polly.Core/ResilienceStrategy.cs 100.00% <100.00%> (ø)
....Core/Utils/NonReactiveResilienceStrategyBridge.cs 100.00% <100.00%> (ø)
... and 2 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v8 Issues related to the new version 8 of the Polly library.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants