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

Finalize the API review #1528

Merged
merged 3 commits into from
Aug 31, 2023
Merged

Finalize the API review #1528

merged 3 commits into from
Aug 31, 2023

Conversation

martintmk
Copy link
Contributor

@martintmk martintmk commented Aug 30, 2023

Details on the issue fix or feature implementation

  • Rename Outcome.FromResultAsTask to Outcome.FromResultAsValueTask to indicate ValueTask is returned.
  • Drop RetryDelayGeneratorArguments.DelayHint. Now, returning null TimeSpan has the same effect as using delay hint.
  • PredicateResult.True and PredicateResult.False are now methods.
  • Rename Outcome.EnsureSucccess to Outcome.ThrowIfException
  • Move BrokenCircuitException<TResult> back to Polly. Polly V8 only throws BrokenCircuitException. (solves problems with disposable results)

Closes #1507
Closes #1301

This change finalizes the API review and allows us to publish the beta.

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

codecov bot commented Aug 30, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.05% ⚠️

Comparison is base (a0be561) 84.02% compared to head (a6a5f77) 83.98%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1528      +/-   ##
==========================================
- Coverage   84.02%   83.98%   -0.05%     
==========================================
  Files         278      278              
  Lines        6546     6542       -4     
  Branches     1024     1023       -1     
==========================================
- Hits         5500     5494       -6     
- Misses        837      839       +2     
  Partials      209      209              
Flag Coverage Δ
linux 83.98% <100.00%> (-0.05%) ⬇️
macos 83.98% <100.00%> (-0.05%) ⬇️
windows 83.98% <100.00%> (-0.05%) ⬇️

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

Files Changed Coverage Δ
...c/Polly.Core/Retry/RetryDelayGeneratorArguments.cs 100.00% <ø> (ø)
...y/CircuitBreaker/BrokenCircuitException.TResult.cs 50.00% <ø> (ø)
...ircuitBreaker/Controller/CircuitStateController.cs 100.00% <100.00%> (ø)
src/Polly.Core/Outcome.TResult.cs 100.00% <100.00%> (ø)
src/Polly.Core/Outcome.cs 100.00% <100.00%> (ø)
src/Polly.Core/PredicateResult.cs 100.00% <100.00%> (ø)
src/Polly.Core/Retry/RetryResilienceStrategy.cs 100.00% <100.00%> (ø)
...c/Polly.Core/Retry/RetryStrategyOptions.TResult.cs 100.00% <100.00%> (ø)
src/Polly.Core/Utils/DefaultPredicates.cs 100.00% <100.00%> (ø)
...rc/Polly.Core/Utils/Pipeline/CompositeComponent.cs 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 88 to 89
/// The generator can override the delay generated by the retry strategy. If generator returns <see langword="null"/>, the delay generated
/// by retry strategy for that attempt will be used.
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
/// The generator can override the delay generated by the retry strategy. If generator returns <see langword="null"/>, the delay generated
/// by retry strategy for that attempt will be used.
/// The generator can override the delay generated by the retry strategy. If the generator returns <see langword="null"/>, the delay generated
/// by the retry strategy for that attempt will be used.

@martintmk martintmk merged commit 5baee94 into main Aug 31, 2023
@martintmk martintmk deleted the mtomka/finalize-api-review branch August 31, 2023 05:32
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.

Finalize the V8 API
2 participants