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

The deafult RateLimiterStrategyOptions instance is now valid #1315

Merged
merged 5 commits into from
Jun 16, 2023

Conversation

martintmk
Copy link
Contributor

@martintmk martintmk commented Jun 16, 2023

Details on the issue fix or feature implementation

The #1313 got me thinking that RateLimiterStrategyOptions will be the only options that is invalid by default.

We can address that by introducing RateLimiterStrategyOptions.DefaultRateLimiterOptions property that will be used unless someone explicitly assigns RateLimiterStrategyOptions.RateLimiter.

This provides a nice out-of-box experience.

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

@martincostello martincostello left a comment

Choose a reason for hiding this comment

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

Nice change.

src/Polly.RateLimiting/RateLimiterStrategyOptions.cs Outdated Show resolved Hide resolved
src/Polly.RateLimiting/RateLimiterStrategyOptions.cs Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Merging #1315 (999ce70) into main (4524822) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1315      +/-   ##
==========================================
+ Coverage   83.28%   83.33%   +0.04%     
==========================================
  Files         264      264              
  Lines        6301     6318      +17     
  Branches      997      998       +1     
==========================================
+ Hits         5248     5265      +17     
  Misses        844      844              
  Partials      209      209              
Flag Coverage Δ
linux ?
macos 83.33% <100.00%> (+0.04%) ⬆️
windows 83.33% <100.00%> (?)

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

Impacted Files Coverage Δ
.../RateLimiterResilienceStrategyBuilderExtensions.cs 100.00% <100.00%> (ø)
...c/Polly.RateLimiting/RateLimiterStrategyOptions.cs 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

@martintmk martintmk enabled auto-merge (squash) June 16, 2023 13:45
@martintmk martintmk merged commit f6e09cc into main Jun 16, 2023
9 checks passed
@martintmk martintmk deleted the mtomka/RateLimiterStrategyOptions branch June 16, 2023 15:05
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