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

v7.2.3: Rate-limit policy and codebase maintenance #912

Merged
merged 21 commits into from
Jan 17, 2022
Merged

Commits on Jun 7, 2021

  1. remove Optimize>true

    it is the default in release
    SimonCropp authored and martincostello committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    12fc5b6 View commit details
    Browse the repository at this point in the history
  2. remove AssemblyName and RootNamespace

    they are inferred from the project name
    SimonCropp authored and martincostello committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    739008a View commit details
    Browse the repository at this point in the history
  3. update xunit

    SimonCropp authored and martincostello committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    12a014f View commit details
    Browse the repository at this point in the history
  4. update moq (#861)

    Co-authored-by: Martin Costello <martin@martincostello.com>
    SimonCropp and martincostello authored Jun 7, 2021
    Configuration menu
    Copy the full SHA
    a9c3301 View commit details
    Browse the repository at this point in the history
  5. update Microsoft.NET.Test.Sdk (#862)

    Co-authored-by: Martin Costello <martin@martincostello.com>
    SimonCropp and martincostello authored Jun 7, 2021
    Configuration menu
    Copy the full SHA
    077e9ae View commit details
    Browse the repository at this point in the history
  6. remove xunit cli (#863)

    deprecated long ago https://xunit.net/docs/nuget-packages#retired
    
    Co-authored-by: Martin Costello <martin@martincostello.com>
    SimonCropp and martincostello authored Jun 7, 2021
    Configuration menu
    Copy the full SHA
    4c8b858 View commit details
    Browse the repository at this point in the history
  7. update to c# 9 (#865)

    * update to c# 9
    
    * Update Directory.Build.props
    SimonCropp authored Jun 7, 2021
    Configuration menu
    Copy the full SHA
    8e36925 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2021

  1. move to PackageIcon (#866)

    * move to PackageIcon
    
    PackageIconUrl is obsolete
    
    * Update src/Polly/Polly.csproj
    
    Co-authored-by: Martin Costello <martin@martincostello.com>
    
    * Update src/Polly/Polly.csproj
    
    Co-authored-by: Martin Costello <martin@martincostello.com>
    
    Co-authored-by: Martin Costello <martin@martincostello.com>
    SimonCropp and martincostello authored Jun 8, 2021
    Configuration menu
    Copy the full SHA
    d7d04d2 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2021

  1. remove redundant ConfigureAwait (#867)

    * remove redundant ConfigureAwait
    
    * Update src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs
    
    Co-authored-by: Martin Costello <martin@martincostello.com>
    
    * Update src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs
    
    Co-authored-by: Martin Costello <martin@martincostello.com>
    
    * Update src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs
    
    Co-authored-by: Martin Costello <martin@martincostello.com>
    
    * Update src/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs
    
    Co-authored-by: Martin Costello <martin@martincostello.com>
    
    * Update AsyncPolicy.TResult.cs
    
    Co-authored-by: Martin Costello <martin@martincostello.com>
    SimonCropp and martincostello authored Jun 9, 2021
    Configuration menu
    Copy the full SHA
    493bb07 View commit details
    Browse the repository at this point in the history

Commits on Jun 11, 2021

  1. Update FluentAssertions (#869)

    * FluentAssertions" Version="5.10.3
    
    * Update NoOpTResultAsyncSpecs.cs
    
    * Update AdvancedCircuitBreakerAsyncSpecs.cs
    SimonCropp authored Jun 11, 2021
    Configuration menu
    Copy the full SHA
    ab27d3c View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2021

  1. Configuration menu
    Copy the full SHA
    6a0d133 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    049524a View commit details
    Browse the repository at this point in the history
  3. Merge pull request #871 from App-vNext/discardParams

    Discard some unused parameters
    SimonCropp authored Jul 1, 2021
    Configuration menu
    Copy the full SHA
    59d058b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c527d4a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9bead9f View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2021

  1. Add Benchmarks project (#864)

    * Add benchmarks project
    
    Add basic benchmarks project for comparing the latest* NuGet version of Polly with the local project.
    
    * Extend retry benchmarks
    
    Extend the retry benchmarks for more usages.
    
    * Rename class
    
    Remove the Benchmarks suffix.
    
    * More benchmarks
    
    Add more benchmarks for different policies.
    Reuse the policies in the Retry benchmarks.
    
    * Remove broken bechmark
    
    Remove benchmark that just hangs.
    
    * Add cache benchmarks
    
    Add benchmarks for the cache policy using the implementation from Polly.Caching.MemoryCache.
    
    * Remove EventPipeProfiler
    
    Remove EventPipeProfiler as it doesn't seem to report anything that useful.
    
    * Remove another hanging benchmark
    
    Remove another benchmark that just hangs indefinitely.
    
    * Add bulkhead to wrap benchmark
    
    Also add a bulkhead policy to the PolicyWrap benchmarks.
    
    * Update BenchmarkDotNet
    
    Update to the latest release of BenchmarkDotNet.
    
    * Use Task.CompletedTask
    
    Use Task.CompletedTask in .NET versions that support it.
    
    * Use TryGetValue()
    
    Use TryGetValue() with dictionary, instead of ContainsKey() and the indexer.
    
    * Use LangVersion latest
    
    Set LangVersion to latest now that BenchmarkDotNet supports it.
    martincostello authored Aug 25, 2021
    Configuration menu
    Copy the full SHA
    ca8f51f View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2021

  1. Configuration menu
    Copy the full SHA
    a9b50fd View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2022

  1. Add RateLimitPolicy (#903)

    * Add core RateLimiter implementations
    
    * Add example async TResult rate-limiter policy implementation
    
    * Add example syntax
    
    * Make the retryAfterFactory take Timespan as an input parameter!
    
    * Initial LockFreeTokenBucketRateLimiterTests
    
    * Tidy BulkheadSpecsHelper
    
    * Factor out test helpers
    
    * Factor out common tests; add tests on lock-based rate limiter
    
    * Allow for slow-running on CI servers
    
    * Add tests on full bucket capacity
    
    * Fix RateLimitRejectedException
    
    * Remove unused configuration overloads
    
    * Introduce a factory for obtaining the preferred rate-limiter implementation
    
    * Pull some test helper methods into a common base-class
    
    * Add first specs on async policy syntax
    
    * Add full set of specs on rate-limit policies thus far
    
    * Add tests on retryAfterFactory
    
    * Add tests on context passed to retryAfterFactory
    
    * Add async non-generic syntax and specs
    
    * Improve code layout
    
    * Add sync rate-limit policies
    
    * Add initial rate-limit doco; bump to v7.2.0
    
    * Improve bulkhead doco in readme
    
    * Minor expressivity refinements
    
    * Neaten bulkhead tests commentary
    
    * Control visibility of IRateLimiter components
    
    * Fix non-generic rate-limit tests to be genuinely non-generic
    
    * Remove LockBasedTokenBucketRateLimiter
    
    Remove the LockBasedTokenBucketRateLimiter class which isn't used other than in tests.
    
    * Throw ArgumentNullException
    
    Throw ArgumentNullException instead of NullReferenceException.
    
    * Pass value to ArgumentOutOfRangeException
    
    Pass the invalid value when throwing ArgumentOutOfRangeException.
    
    * Make LockFreeTokenBucketRateLimiter sealed
    
    Seal the LockFreeTokenBucketRateLimiter class.
    
    * Make RateLimiterFactory static
    
    Make the RateLimiterFactory class static.
    
    * Add parenthesis
    
    Add parenthesis to operation to make it clearer.
    
    * Use string not String
    
    Use the always-unambiguous `string` keyword instead of `String`.
    See https://blog.paranoidcoding.com/2019/04/08/string-vs-String-is-not-about-style.html.
    
    * Bump version to 7.3.0
    
    Bump the next version to 7.3.0.
    
    * Fix typo
    
    Remove superfluous dollar character from exception message.
    
    * Code review fixes
    
    Fix exception message typos.
    Add access modifier.
    Remove blank line after comment.
    
    * Fix links
    
    Change ratelimit to rate-limit.
    
    * Fix typos
    
    Fix various typos, as well as free whitespace trimming from using Atom.
    
    * Add rate-limit documentation
    
    Add documentation for the RateLimit policy.
    
    * Update Cake
    
    Update to the highest 0.x version of Cake and pin to use a version of Cake.FileHelpers and Cake.Yaml released in the same time frame.
    
    * Do not generate benchmarks package
    
    Suppress a NuGet package being created by the benchmarks project.
    
    Co-authored-by: reisenberger <software@reisenberger.net>
    martincostello and reisenberger authored Jan 17, 2022
    Configuration menu
    Copy the full SHA
    720f4ab View commit details
    Browse the repository at this point in the history
  2. Target .NET 6 in tests and update packages (#909)

    * Target .NET 6
    
    Target .NET 6 in the tests and benchmarks.
    
    * Update NuGet packages
    
    Update various NuGet packages to their latest versions.
    
    * Update to Visual Studio 2022
    
    Use the Visual Studio 2022 image for a .NET 6 installation.
    martincostello authored Jan 17, 2022
    Configuration menu
    Copy the full SHA
    426f172 View commit details
    Browse the repository at this point in the history
  3. Handle rate-limit edge case (#911)

    If a large numberOfExecutions value (e.g. int.MaxValue) is used with a small perTimeSpan value, the division between the two will create a number too small to be represented by a tick, ending up with a TimeSpan.Zero value.
    This then created a confusing exception message saying that the user had specified TimeSpan.Zero, when they hadn't.
    Improved the exception message by throwing a specific exception if onePer ends up with a zero or negative value once computed.
    martincostello authored Jan 17, 2022
    Configuration menu
    Copy the full SHA
    197c5d3 View commit details
    Browse the repository at this point in the history
  4. Update CHANGELOG

    Add other contributors' changes for v7.3.0.
    martincostello authored Jan 17, 2022
    Configuration menu
    Copy the full SHA
    15a51d1 View commit details
    Browse the repository at this point in the history