Skip to content

Conversation

@martintmk
Copy link
Contributor

@martintmk martintmk commented Jun 30, 2023

Details on the issue fix or feature implementation

Dynamic reloads implementation can be simplified with a simple change. Instead of passing the Func<CancellationToken> we actually use a factory that produces the Func<CancellationToken>. This allows us to activate the factory only once when the strategy is being created and we do not have to handle multiple occurrences of Func<CancellationToken>.

As a part of this PR I am also hiding some API which might not be used outside of Polly. We can still unhide later.

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 Jun 30, 2023
@martintmk martintmk added this to the v8.0.0 milestone Jun 30, 2023
@codecov
Copy link

codecov bot commented Jun 30, 2023

Codecov Report

Merging #1374 (c2bdb7a) into main (70129e2) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1374      +/-   ##
==========================================
- Coverage   83.61%   83.57%   -0.04%     
==========================================
  Files         268      267       -1     
  Lines        6403     6388      -15     
  Branches     1004     1002       -2     
==========================================
- Hits         5354     5339      -15     
  Misses        840      840              
  Partials      209      209              
Flag Coverage Δ
macos 83.57% <100.00%> (-0.04%) ⬇️
windows 83.57% <100.00%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
...dencyInjection/PollyServiceCollectionExtensions.cs 100.00% <ø> (ø)
src/Polly.Core/Registry/ConfigureBuilderContext.cs 100.00% <100.00%> (ø)
.../Polly.Core/Registry/ResilienceStrategyRegistry.cs 100.00% <100.00%> (ø)
...ependencyInjection/AddResilienceStrategyContext.cs 100.00% <100.00%> (ø)
src/Polly.Extensions/Utils/OptionsReloadHelper.cs 100.00% <100.00%> (ø)

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