Skip to content
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

Cleanup of callback API #1125

Merged
merged 6 commits into from
Apr 14, 2023
Merged

Cleanup of callback API #1125

merged 6 commits into from
Apr 14, 2023

Conversation

martintmk
Copy link
Contributor

@martintmk martintmk commented Apr 14, 2023

Details on the issue fix or feature implementation

  • Turning events, predicates and generators from abstract to sealed classes. The extra complexity didn't warrant the added value.
  • Rename SimpleEvent to NoOutcomeEvent
  • Added non-generic methods to OutcomeGenerator. This allows adding new extensions for retry.
  • Adding a new generic OutcomePredicate<TArgs, TResult> that only configures the predicates for a specific result-type.
  • Deleting unnecessary classes.
  • Prefixing methods in OutcomePredicate with Handler
  • Renaming methods in OutcomeEvent from Add to Register.

In the follow-up PR I will also add non-generic overloads to OutcomeEvent

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 Apr 14, 2023
@martintmk martintmk added this to the v8.0.0 milestone Apr 14, 2023
@martintmk martintmk marked this pull request as ready for review April 14, 2023 07:46
@codecov-commenter
Copy link

codecov-commenter commented Apr 14, 2023

Codecov Report

Merging #1125 (284802b) into main (8b944d3) will increase coverage by 0.26%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #1125      +/-   ##
==========================================
+ Coverage   77.88%   78.14%   +0.26%     
==========================================
  Files         202      201       -1     
  Lines        4788     4846      +58     
  Branches      858      863       +5     
==========================================
+ Hits         3729     3787      +58     
  Misses        854      854              
  Partials      205      205              
Flag Coverage Δ
linux 78.14% <100.00%> (+0.26%) ⬆️
macos ?
windows 78.14% <100.00%> (+0.26%) ⬆️

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

Impacted Files Coverage Δ
src/Polly.Core/Retry/OnRetryArguments.cs 100.00% <ø> (ø)
src/Polly.Core/Retry/RetryDelayArguments.cs 100.00% <ø> (ø)
src/Polly.Core/Retry/ShouldRetryArguments.cs 100.00% <ø> (ø)
src/Polly.Core/Strategy/OutcomeEvent.Handler.cs 100.00% <ø> (ø)
...lly.RateLimiting/OnRateLimiterRejectedArguments.cs 100.00% <ø> (ø)
src/Polly.Core/Retry/RetryResilienceStrategy.cs 100.00% <100.00%> (ø)
.../Retry/RetryResilienceStrategyBuilderExtensions.cs 100.00% <100.00%> (ø)
src/Polly.Core/Retry/RetryStrategyOptions.cs 100.00% <100.00%> (ø)
src/Polly.Core/Strategy/NoOutcomeEvent.cs 100.00% <100.00%> (ø)
src/Polly.Core/Strategy/OutcomeEvent.cs 100.00% <100.00%> (ø)
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@martintmk martintmk enabled auto-merge (squash) April 14, 2023 08:39
@martintmk martintmk merged commit e5916bc into main Apr 14, 2023
@martintmk martintmk deleted the mtomka/cleanup-events branch April 14, 2023 09:20
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.

3 participants