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

Clean duplications around disposing the pipelines #1530

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

martintmk
Copy link
Contributor

@martintmk martintmk commented Aug 31, 2023

Details on the issue fix or feature implementation

Internally, PipelineComponent implemented both IDisposable and IAsyncDisposable that caused some duplications. Now it only implements IAsyncDisposable.

The registry still implements IDisposable and IAsyncDisposable for ease of use. We can afford sync-over-async because in most scenarios DisposeAsync will have sync implementation anyway.

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 31, 2023
@martintmk martintmk added this to the v8.0.0 milestone Aug 31, 2023
@martintmk martintmk enabled auto-merge (squash) August 31, 2023 07:26
@codecov
Copy link

codecov bot commented Aug 31, 2023

Codecov Report

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

Comparison is base (0cbc4c6) 83.99% compared to head (791a7c3) 83.93%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1530      +/-   ##
==========================================
- Coverage   83.99%   83.93%   -0.06%     
==========================================
  Files         279      279              
  Lines        6547     6523      -24     
  Branches     1023     1017       -6     
==========================================
- Hits         5499     5475      -24     
  Misses        839      839              
  Partials      209      209              
Flag Coverage Δ
macos 83.93% <100.00%> (?)
windows 83.93% <100.00%> (-0.06%) ⬇️

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

Files Changed Coverage Δ
...ore/Registry/ResiliencePipelineRegistry.TResult.cs 100.00% <ø> (ø)
...olly.Core/Utils/Pipeline/ComponentDisposeHelper.cs 100.00% <ø> (ø)
...re/Utils/Pipeline/ComponentWithDisposeCallbacks.cs 100.00% <ø> (ø)
...rc/Polly.Core/Utils/Pipeline/CompositeComponent.cs 100.00% <ø> (ø)
src/Polly.Core/Utils/Pipeline/ExternalComponent.cs 100.00% <ø> (ø)
src/Polly.Core/Utils/Pipeline/PipelineComponent.cs 100.00% <ø> (ø)
.../Polly.Core/Registry/ResiliencePipelineRegistry.cs 100.00% <100.00%> (ø)
...c/Polly.Core/Utils/Pipeline/BridgeComponentBase.cs 100.00% <100.00%> (ø)
...c/Polly.Core/Utils/Pipeline/ReloadableComponent.cs 100.00% <100.00%> (ø)

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

@martintmk martintmk merged commit a7cb07c into main Aug 31, 2023
12 checks passed
@martintmk martintmk deleted the mtomka/clean-disposable-duplications branch August 31, 2023 07:58
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