Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: App-vNext/Polly
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8.3.0
Choose a base ref
...
head repository: App-vNext/Polly
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8.3.1
Choose a head ref

Commits on Feb 5, 2024

  1. Update NuGet packages

    Update dependencies to their latest versions.
    martincostello committed Feb 5, 2024
    Copy the full SHA
    f3e78ee View commit details
  2. Copy the full SHA
    de6d4b3 View commit details

Commits on Feb 8, 2024

  1. Bump github/codeql-action from 3.23.2 to 3.24.0 (#1959)

    Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.23.2 to 3.24.0.
    - [Release notes](https://github.com/github/codeql-action/releases)
    - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
    - [Commits](github/codeql-action@b7bf0a3...e8893c5)
    
    ---
    updated-dependencies:
    - dependency-name: github/codeql-action
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 8, 2024
    Copy the full SHA
    df7de34 View commit details
  2. Bump actions/download-artifact from 4.1.1 to 4.1.2 (#1960)

    Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.1 to 4.1.2.
    - [Release notes](https://github.com/actions/download-artifact/releases)
    - [Commits](actions/download-artifact@6b208ae...eaceaf8)
    
    ---
    updated-dependencies:
    - dependency-name: actions/download-artifact
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 8, 2024
    Copy the full SHA
    0d001ba View commit details
  3. Bump actions/upload-artifact from 4.3.0 to 4.3.1 (#1961)

    Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.0 to 4.3.1.
    - [Release notes](https://github.com/actions/upload-artifact/releases)
    - [Commits](actions/upload-artifact@26f96df...5d5d22a)
    
    ---
    updated-dependencies:
    - dependency-name: actions/upload-artifact
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 8, 2024
    Copy the full SHA
    b9be8ea View commit details
  4. Copy the full SHA
    1f40164 View commit details
  5. Fix CA1806 (#1963)

    Fix CA1806 warnings.
    gintsk authored Feb 8, 2024
    Copy the full SHA
    29086a3 View commit details

Commits on Feb 9, 2024

  1. Fix SA1129 (#1964)

    gintsk authored Feb 9, 2024
    Copy the full SHA
    2ad40a8 View commit details

Commits on Feb 10, 2024

  1. Fix S3717 (#1965)

    gintsk authored Feb 10, 2024
    Copy the full SHA
    c8c1890 View commit details
  2. Copy the full SHA
    8cd51d6 View commit details

Commits on Feb 14, 2024

  1. Update .NET SDK

    Update .NET SDK to version 8.0.200.
    
    ---
    updated-dependencies:
    - dependency-name: Microsoft.NET.Sdk
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: polly-updater-bot[bot] <138034000+polly-updater-bot[bot]@users.noreply.github.com>
    polly-updater-bot[bot] authored and martincostello committed Feb 14, 2024
    Copy the full SHA
    43690b7 View commit details
  2. Fix IDE0022 warnings

    Fix new IDE0022 warnings from .NET SDK upgrade.
    martincostello committed Feb 14, 2024
    Copy the full SHA
    f420098 View commit details
  3. Fix IDE0028 warnings

    Fix new IDE0028 warnings.
    martincostello committed Feb 14, 2024
    Copy the full SHA
    b194abf View commit details

Commits on Feb 15, 2024

  1. Bump actions/dependency-review-action from 4.0.0 to 4.1.0 (#1970)

    Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.0.0 to 4.1.0.
    - [Release notes](https://github.com/actions/dependency-review-action/releases)
    - [Commits](actions/dependency-review-action@4901385...80f10bf)
    
    ---
    updated-dependencies:
    - dependency-name: actions/dependency-review-action
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 15, 2024
    Copy the full SHA
    c5cb233 View commit details
  2. Bump github/codeql-action from 3.24.0 to 3.24.3 (#1971)

    Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.0 to 3.24.3.
    - [Release notes](https://github.com/github/codeql-action/releases)
    - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
    - [Commits](github/codeql-action@e8893c5...3796146)
    
    ---
    updated-dependencies:
    - dependency-name: github/codeql-action
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 15, 2024
    Copy the full SHA
    caa44e3 View commit details

Commits on Feb 16, 2024

  1. Fix SA1501/IDE0055 (#1957)

    * Fix SA1501/IDE0055
    
    * Improve unit test coverage
    baranyaimate authored Feb 16, 2024
    Copy the full SHA
    5fe3377 View commit details
  2. [Docs] Add cheat sheet for fault chaos (#1972)

    * Add cheat sheet for fault chaos
    
    * Apply suggestion
    peter-csala authored Feb 16, 2024
    Copy the full SHA
    a6b9b33 View commit details

Commits on Feb 19, 2024

  1. Copy the full SHA
    1ce60b2 View commit details
  2. Fix sample (#1976)

    peter-csala authored Feb 19, 2024
    Copy the full SHA
    de7fdb0 View commit details
  3. Copy the full SHA
    3e2164e View commit details

Commits on Feb 20, 2024

  1. Copy the full SHA
    10730b9 View commit details

Commits on Feb 21, 2024

  1. Update .NET SDK (#1981)

    Update .NET SDK to version 8.0.201.
    
    ---
    updated-dependencies:
    - dependency-name: Microsoft.NET.Sdk
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: polly-updater-bot[bot] <138034000+polly-updater-bot[bot]@users.noreply.github.com>
    Co-authored-by: polly-updater-bot[bot] <138034000+polly-updater-bot[bot]@users.noreply.github.com>
    polly-updater-bot[bot] authored Feb 21, 2024
    Copy the full SHA
    82474bf View commit details

Commits on Feb 22, 2024

  1. Bump github/codeql-action from 3.24.3 to 3.24.4 (#1986)

    Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.3 to 3.24.4.
    - [Release notes](https://github.com/github/codeql-action/releases)
    - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
    - [Commits](github/codeql-action@3796146...e2e140a)
    
    ---
    updated-dependencies:
    - dependency-name: github/codeql-action
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 22, 2024
    Copy the full SHA
    d4aa640 View commit details
  2. Bump actions/dependency-review-action from 4.1.0 to 4.1.3 (#1987)

    Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.1.0 to 4.1.3.
    - [Release notes](https://github.com/actions/dependency-review-action/releases)
    - [Commits](actions/dependency-review-action@80f10bf...9129d7d)
    
    ---
    updated-dependencies:
    - dependency-name: actions/dependency-review-action
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 22, 2024
    Copy the full SHA
    b8930cc View commit details
  3. Bump the xunit group with 2 updates (#1988)

    Bumps the xunit group with 2 updates: [xunit](https://github.com/xunit/xunit) and [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit).
    
    
    Updates `xunit` from 2.6.6 to 2.7.0
    - [Commits](xunit/xunit@2.6.6...2.7.0)
    
    Updates `xunit.runner.visualstudio` from 2.5.6 to 2.5.7
    - [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
    - [Commits](xunit/visualstudio.xunit@2.5.6...2.5.7)
    
    ---
    updated-dependencies:
    - dependency-name: xunit
      dependency-type: direct:production
      update-type: version-update:semver-minor
      dependency-group: xunit
    - dependency-name: xunit.runner.visualstudio
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: xunit
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 22, 2024
    Copy the full SHA
    9dac088 View commit details
  4. Bump docfx from 2.75.2 to 2.75.3 (#1989)

    Bumps [docfx](https://github.com/dotnet/docfx) from 2.75.2 to 2.75.3.
    - [Release notes](https://github.com/dotnet/docfx/releases)
    - [Changelog](https://github.com/dotnet/docfx/blob/main/RELEASENOTE.md)
    - [Commits](dotnet/docfx@v2.75.2...v2.75.3)
    
    ---
    updated-dependencies:
    - dependency-name: docfx
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 22, 2024
    Copy the full SHA
    4e7f0ad View commit details
  5. Update xunit

    Bump xunit packages to their latest versions.
    martincostello committed Feb 22, 2024
    Copy the full SHA
    d721cbe View commit details
  6. Update NuGet tools

    - Bump xunit.runner.console to 2.7.0.
    - Bump dotnet-stryker to 4.0.0.
    martincostello committed Feb 22, 2024
    Copy the full SHA
    7f35b49 View commit details

Commits on Feb 23, 2024

  1. Move chaos APIs to shipped (#1993)

    Mark the new chaos engineering functionality as shipped.
    peter-csala authored Feb 23, 2024
    Copy the full SHA
    5f726d3 View commit details

Commits on Feb 24, 2024

  1. Fix CircuitBreaker handling of Half-Open (#1991)

    * Rename methods to clarify intention
    
    * Ensure that an unhandled exception in half open state closes the circuit instead of blocking any further transition from half open state
    
    * Fix mutation survived in StrategyHelper; add explicit test to replace no longer existing implicit test in CircuitBreakerResilienceStrategyTests
    DominicUllmann authored Feb 24, 2024
    Copy the full SHA
    de6eb20 View commit details

Commits on Feb 28, 2024

  1. Update NuGet packages

    Update NuGet packages to their latest versions.
    martincostello committed Feb 28, 2024
    Copy the full SHA
    61a767e View commit details

Commits on Feb 29, 2024

  1. Bump actions/download-artifact from 4.1.2 to 4.1.3 (#2000)

    Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.2 to 4.1.3.
    - [Release notes](https://github.com/actions/download-artifact/releases)
    - [Commits](actions/download-artifact@eaceaf8...87c5514)
    
    ---
    updated-dependencies:
    - dependency-name: actions/download-artifact
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 29, 2024
    Copy the full SHA
    687cfad View commit details
  2. Bump github/codeql-action from 3.24.4 to 3.24.6 (#2001)

    Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.4 to 3.24.6.
    - [Release notes](https://github.com/github/codeql-action/releases)
    - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
    - [Commits](github/codeql-action@e2e140a...8a470fd)
    
    ---
    updated-dependencies:
    - dependency-name: github/codeql-action
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 29, 2024
    Copy the full SHA
    769b066 View commit details
  3. Bump codecov/codecov-action from 4.0.1 to 4.1.0 (#1999)

    Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.0.1 to 4.1.0.
    - [Release notes](https://github.com/codecov/codecov-action/releases)
    - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
    - [Commits](codecov/codecov-action@e0b68c6...54bcd87)
    
    ---
    updated-dependencies:
    - dependency-name: codecov/codecov-action
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 29, 2024
    Copy the full SHA
    3336d1c View commit details

Commits on Mar 1, 2024

  1. Update samples to .NET 8 (#2004)

    - Update various sample projects from `net7.0` to `net8.0`.
    - Fix CA1849 warning from updating snippets to .NET 8.
    - Fix IDE0034 warning identified by the .NET 9 SDK in #2003.
    martincostello authored Mar 1, 2024
    Copy the full SHA
    44668fb View commit details
  2. Fix calculation of exponential delay in flow chart (#2005)

    Fix value and power being swapped.
    janher authored Mar 1, 2024
    Copy the full SHA
    8c2041d View commit details

Commits on Mar 2, 2024

  1. Use collection expressions

    Use collection expressions in Cake script.
    martincostello committed Mar 2, 2024
    Copy the full SHA
    1dba402 View commit details

Commits on Mar 5, 2024

  1. Cleanup XML comments (#2007)

    * Fix SA1629 for ArgumentNullException XML comments
    
    * Fix "CA1200: Avoid using cref tags with a prefix" for ArgumentNullException
    
    * Fix SA1629 and unify ArgumentNullException style
    
    * Fix "SA1627 The documentation text within the 'exception' tag should not be empty"
    
    * Unify ArgumentNullException XML comment style
    
    * Fix SA1629 in remarks (are they even neccessary?)
    
    * Unify ArgumentNullException XML comment style
    
    * Fix SA1629 and unify XML comments in ArgumentNullException with two params; and fix wrongly referenced parameters in comments
    
    * Fix SA1629 and unify comments in returns tag
    Fix SA1629 in ArgumentOutOfRangeException XML comments and an summary tags
    
    * Fix SA1614 "Element parameter documentation should have text"
    
    * Fix SA1629 in param and returns tags
    Fix SA1611 "The documentation for parameter 'key' is missing"
    
    * Fix more SA1629; fixed some incorrect and added missing param comments
    
    * PR comments (fix tag order, parameter name, remove duplicates)
    gintsk authored Mar 5, 2024
    Copy the full SHA
    8a1f276 View commit details
  2. XML documentation cleanup (#2008)

    * Enable documentation generation for `Polly`
    
    * Fix CS1734 "XML comment on '{1}' has a paramref tag for '{0}', but there is no parameter by that name"
    
    * Fix CS1658 "Type parameter declaration must be an identifier not a type."
    
    * Fix SA1616 "Element return value documentation should have text"
    
    * Fix SA1648 "inheritdoc should be used with inheriting class"
    
    * Fix SA1642 "Constructor summary documentation should begin with standard text"
    
    * Fix SA1629 "Documentation text should end with a period"
    
    * Fix SA1619 "The documentation for type parameter 'TResult' is missing"
    
    * Fix CA1200 "Avoid using cref tags with a prefix"
    
    * Fix SA1600 "Elements should be documented"
    gintsk authored Mar 5, 2024
    Copy the full SHA
    613279e View commit details

Commits on Mar 6, 2024

  1. Update CHANGELOG

    Add changelog entries for Polly 8.3.1.
    martincostello committed Mar 6, 2024
    Copy the full SHA
    010a8cf View commit details
Showing with 3,708 additions and 2,770 deletions.
  1. +1 −1 .config/dotnet-tools.json
  2. +11 −11 .github/workflows/build.yml
  3. +3 −3 .github/workflows/codeql-analysis.yml
  4. +1 −1 .github/workflows/dependency-review.yml
  5. +1 −1 .github/workflows/gh-pages.yml
  6. +2 −2 .github/workflows/ossf-scorecard.yml
  7. +22 −0 CHANGELOG.md
  8. +10 −10 Directory.Packages.props
  9. +7 −7 README.md
  10. +1 −3 bench/Polly.Core.Benchmarks/CircuitBreakerOpenedBenchmark.cs
  11. +2 −6 bench/Polly.Core.Benchmarks/CreationBenchmark.cs
  12. +4 −8 bench/Polly.Core.Benchmarks/PredicateBenchmark.cs
  13. +5 −16 bench/Polly.Core.Benchmarks/ResiliencePipelineBenchmark.cs
  14. +1 −3 bench/Polly.Core.Benchmarks/ResiliencePipelineProviderBenchmark.cs
  15. +1 −4 bench/Polly.Core.Benchmarks/Utils/EmptyResilienceStrategy.cs
  16. +2 −4 bench/Polly.Core.Benchmarks/Utils/Helper.Hedging.cs
  17. +11 −13 build.cake
  18. +13 −7 docs/community/cheat-sheets.md
  19. +1 −0 docs/community/resources.md
  20. BIN docs/media/cheat-sheet-fault.pdf
  21. BIN docs/media/cheat-sheet-fault.pptx
  22. +8 −0 docs/pipelines/index.md
  23. +1 −1 docs/strategies/fallback.md
  24. +18 −1 docs/strategies/hedging.md
  25. +3 −5 docs/strategies/retry.md
  26. +7 −0 docs/strategies/timeout.md
  27. +1 −1 global.json
  28. +15 −0 samples/Chaos/Chaos.csproj
  29. +45 −0 samples/Chaos/ChaosManager.cs
  30. +13 −0 samples/Chaos/IChaosManager.cs
  31. +77 −0 samples/Chaos/Program.cs
  32. +12 −0 samples/Chaos/Properties/launchSettings.json
  33. +10 −0 samples/Chaos/README.md
  34. +7 −0 samples/Chaos/TodoModel.cs
  35. +7 −0 samples/Chaos/TodosClient.cs
  36. +8 −0 samples/Chaos/appsettings.Development.json
  37. +9 −0 samples/Chaos/appsettings.json
  38. +1 −1 samples/DependencyInjection/DependencyInjection.csproj
  39. +2 −2 samples/GenericPipelines/GenericPipelines.csproj
  40. +2 −2 samples/Intro/Intro.csproj
  41. +1 −0 samples/README.md
  42. +1 −1 samples/Retries/Retries.csproj
  43. +7 −0 samples/Samples.sln
  44. +3 −3 src/Polly.Core/CircuitBreaker/CircuitBreakerResilienceStrategy.cs
  45. +8 −9 src/Polly.Core/CircuitBreaker/Controller/CircuitStateController.cs
  46. +3 −5 src/Polly.Core/CircuitBreaker/Health/HealthMetrics.cs
  47. +14 −22 src/Polly.Core/PredicateBuilder.TResult.cs
  48. +115 −0 src/Polly.Core/PublicAPI.Shipped.txt
  49. +0 −115 src/Polly.Core/PublicAPI.Unshipped.txt
  50. +1 −4 src/Polly.Core/ResilienceContext.cs
  51. +2 −2 src/Polly.Core/ResiliencePipelineBuilderExtensions.cs
  52. +1 −4 src/Polly.Core/ResilienceProperties.cs
  53. +2 −4 src/Polly.Core/Simmy/ChaosStrategy.TResult.cs
  54. +2 −4 src/Polly.Core/Simmy/ChaosStrategy.cs
  55. +1 −1 src/Polly.Core/Timeout/TimeoutStrategyOptions.cs
  56. +1 −4 src/Polly.Core/Timeout/TimeoutUtil.cs
  57. +12 −18 src/Polly.Core/Utils/Pipeline/DelegatingComponent.cs
  58. +1 −5 src/Polly.Core/Utils/Pipeline/ExternalComponent.cs
  59. +1 −4 src/Polly.Core/Utils/Pipeline/ReloadableComponent.cs
  60. +3 −7 src/Polly.Core/Utils/ValidationHelper.cs
  61. +1 −1 src/Polly.Extensions/Telemetry/TagsList.cs
  62. +2 −2 src/Polly.Extensions/Telemetry/TelemetryOptions.cs
  63. +8 −4 src/Polly/AsyncPolicy.ContextAndKeys.cs
  64. +40 −36 src/Polly/AsyncPolicy.ExecuteOverloads.cs
  65. +26 −24 src/Polly/AsyncPolicy.TResult.ExecuteOverloads.cs
  66. +3 −3 src/Polly/AsyncPolicy.TResult.cs
  67. +3 −3 src/Polly/AsyncPolicy.cs
  68. +1 −1 src/Polly/Bulkhead/AsyncBulkheadEngine.cs
  69. +8 −5 src/Polly/Bulkhead/AsyncBulkheadSyntax.cs
  70. +8 −6 src/Polly/Bulkhead/AsyncBulkheadTResultSyntax.cs
  71. +0 −1 src/Polly/Bulkhead/BulkheadPolicy.cs
  72. +8 −5 src/Polly/Bulkhead/BulkheadSyntax.cs
  73. +8 −5 src/Polly/Bulkhead/BulkheadTResultSyntax.cs
  74. +1 −3 src/Polly/Caching/AsyncCachePolicy.cs
  75. +70 −58 src/Polly/Caching/AsyncCacheSyntax.cs
  76. +155 −137 src/Polly/Caching/AsyncCacheTResultSyntax.cs
  77. +5 −5 src/Polly/Caching/AsyncSerializingCacheProvider.cs
  78. +2 −2 src/Polly/Caching/CacheProviderExtensions.cs
  79. +70 −70 src/Polly/Caching/CacheSyntax.cs
  80. +155 −137 src/Polly/Caching/CacheTResultSyntax.cs
  81. +2 −1 src/Polly/Caching/ContextualTtl.cs
  82. +2 −2 src/Polly/Caching/DefaultCacheKeyStrategy.cs
  83. +1 −1 src/Polly/Caching/GenericCacheProvider.cs
  84. +2 −2 src/Polly/Caching/ICacheItemSerializer.cs
  85. +2 −2 src/Polly/Caching/ICacheKeyStrategy.cs
  86. +1 −1 src/Polly/Caching/NonSlidingTtl.cs
  87. +2 −1 src/Polly/Caching/RelativeTtl.cs
  88. +4 −3 src/Polly/Caching/ResultTtl.cs
  89. +5 −5 src/Polly/Caching/SerializingCacheProvider.cs
  90. +3 −2 src/Polly/Caching/SlidingTtl.cs
  91. +3 −3 src/Polly/Caching/Ttl.cs
  92. +1 −1 src/Polly/Caching/TtlStrategyExtensions.cs
  93. +74 −58 src/Polly/CircuitBreaker/AdvancedCircuitBreakerSyntax.cs
  94. +74 −58 src/Polly/CircuitBreaker/AdvancedCircuitBreakerTResultSyntax.cs
  95. +72 −57 src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerSyntax.cs
  96. +64 −56 src/Polly/CircuitBreaker/AsyncAdvancedCircuitBreakerTResultSyntax.cs
  97. +28 −23 src/Polly/CircuitBreaker/AsyncCircuitBreakerSyntax.cs
  98. +28 −23 src/Polly/CircuitBreaker/AsyncCircuitBreakerTResultSyntax.cs
  99. +28 −25 src/Polly/CircuitBreaker/CircuitBreakerSyntax.cs
  100. +28 −25 src/Polly/CircuitBreaker/CircuitBreakerTResultSyntax.cs
  101. +5 −1 src/Polly/CircuitBreaker/CircuitStateController.cs
  102. +43 −0 src/Polly/CircuitBreaker/ICircuitController.cs
  103. +17 −0 src/Polly/CircuitBreaker/IHealthMetrics.cs
  104. +28 −22 src/Polly/Context.Dictionary.cs
  105. +3 −2 src/Polly/Context.cs
  106. +3 −3 src/Polly/DelegateResult.cs
  107. +48 −32 src/Polly/Fallback/AsyncFallbackSyntax.cs
  108. +78 −52 src/Polly/Fallback/FallbackSyntax.cs
  109. +1 −1 src/Polly/IAsyncPolicy.Extensions.cs
  110. +23 −23 src/Polly/IAsyncPolicy.TResult.cs
  111. +35 −34 src/Polly/IAsyncPolicy.cs
  112. +1 −1 src/Polly/ISyncPolicy.Extensions.cs
  113. +20 −26 src/Polly/ISyncPolicy.TResult.cs
  114. +33 −39 src/Polly/ISyncPolicy.cs
  115. +2 −2 src/Polly/IsPolicy.cs
  116. +1 −1 src/Polly/NoOp/AsyncNoOpPolicy.cs
  117. +1 −1 src/Polly/NoOp/NoOpPolicy.cs
  118. +8 −4 src/Polly/Policy.ContextAndKeys.cs
  119. +43 −45 src/Polly/Policy.ExecuteOverloads.cs
  120. +2 −0 src/Polly/Policy.HandleSyntax.cs
  121. +24 −28 src/Polly/Policy.TResult.ExecuteOverloads.cs
  122. +4 −3 src/Polly/Policy.TResult.cs
  123. +3 −3 src/Polly/Policy.cs
  124. +6 −6 src/Polly/PolicyBase.ContextAndKeys.cs
  125. +4 −4 src/Polly/PolicyBase.cs
  126. +5 −2 src/Polly/PolicyBuilder.OrSyntax.cs
  127. +5 −4 src/Polly/PolicyBuilder.cs
  128. +31 −31 src/Polly/PolicyResult.cs
  129. +2 −1 src/Polly/Polly.csproj
  130. +1 −1 src/Polly/RateLimit/AsyncRateLimitPolicy.cs
  131. +6 −3 src/Polly/RateLimit/AsyncRateLimitSyntax.cs
  132. +7 −4 src/Polly/RateLimit/AsyncRateLimitTResultSyntax.cs
  133. +1 −1 src/Polly/RateLimit/IRateLimiter.cs
  134. +9 −10 src/Polly/RateLimit/LockFreeTokenBucketRateLimiter.cs
  135. +2 −1 src/Polly/RateLimit/RateLimitRejectedException.cs
  136. +6 −3 src/Polly/RateLimit/RateLimitSyntax.cs
  137. +7 −4 src/Polly/RateLimit/RateLimitTResultSyntax.cs
  138. +14 −14 src/Polly/Registry/IConcurrentPolicyRegistry.cs
  139. +3 −3 src/Polly/Registry/IPolicyRegistry.cs
  140. +6 −5 src/Polly/Registry/IReadOnlyPolicyRegistry.cs
  141. +19 −19 src/Polly/Registry/PolicyRegistry.cs
  142. +2 −1 src/Polly/ResultPredicates.cs
  143. +4 −1 src/Polly/Retry/AsyncRetryEngine.cs
  144. +173 −187 src/Polly/Retry/AsyncRetrySyntax.cs
  145. +164 −182 src/Polly/Retry/AsyncRetryTResultSyntax.cs
  146. +4 −1 src/Polly/Retry/RetryEngine.cs
  147. +115 −117 src/Polly/Retry/RetrySyntax.cs
  148. +104 −110 src/Polly/Retry/RetryTResultSyntax.cs
  149. +56 −43 src/Polly/Timeout/AsyncTimeoutSyntax.cs
  150. +62 −47 src/Polly/Timeout/AsyncTimeoutTResultSyntax.cs
  151. +54 −43 src/Polly/Timeout/TimeoutSyntax.cs
  152. +55 −43 src/Polly/Timeout/TimeoutTResultSyntax.cs
  153. +2 −1 src/Polly/Timeout/TimeoutValidator.cs
  154. +1 −1 src/Polly/Utilities/ExceptionExtensions.cs
  155. +8 −6 src/Polly/Utilities/SystemClock.cs
  156. +8 −6 src/Polly/Wrap/AsyncPolicyWrap.ContextAndKeys.cs
  157. +6 −6 src/Polly/Wrap/AsyncPolicyWrap.cs
  158. +16 −8 src/Polly/Wrap/AsyncPolicyWrapSyntax.cs
  159. +2 −2 src/Polly/Wrap/IPolicyWrap.cs
  160. +6 −2 src/Polly/Wrap/IPolicyWrapExtension.cs
  161. +8 −6 src/Polly/Wrap/PolicyWrap.ContextAndKeys.cs
  162. +6 −6 src/Polly/Wrap/PolicyWrap.cs
  163. +16 −8 src/Polly/Wrap/PolicyWrapSyntax.cs
  164. +3 −3 src/Snippets/Docs/Fallback.cs
  165. +2 −4 src/Snippets/Docs/Retry.cs
  166. +2 −2 src/Snippets/Snippets.csproj
  167. +1 −3 test/Polly.Core.Tests/CircuitBreaker/BrokenCircuitExceptionTests.cs
  168. +3 −7 test/Polly.Core.Tests/CircuitBreaker/CircuitBreakerResilienceStrategyTests.cs
  169. +2 −4 test/Polly.Core.Tests/CircuitBreaker/Controller/AdvancedCircuitBehaviorTests.cs
  170. +15 −15 test/Polly.Core.Tests/CircuitBreaker/Controller/CircuitStateControllerTests.cs
  171. +1 −3 test/Polly.Core.Tests/CircuitBreaker/Health/HealthMetricsTests.cs
  172. +1 −3 test/Polly.Core.Tests/CircuitBreaker/IsolatedCircuitExceptionTests.cs
  173. +1 −3 test/Polly.Core.Tests/CircuitBreaker/OnCircuitHalfOpenedArgumentsTests.cs
  174. +2 −4 test/Polly.Core.Tests/Fallback/FallbackHelper.cs
  175. +1 −3 test/Polly.Core.Tests/Fallback/FallbackResiliencePipelineBuilderExtensionsTests.cs
  176. +2 −6 test/Polly.Core.Tests/Fallback/FallbackResilienceStrategyTests.cs
  177. +1 −3 test/Polly.Core.Tests/GenericResiliencePipelineBuilderTests.cs
  178. +3 −7 test/Polly.Core.Tests/Hedging/Controller/HedgingExecutionContextTests.cs
  179. +1 −3 test/Polly.Core.Tests/Hedging/Controller/TaskExecutionTests.cs
  180. +2 −4 test/Polly.Core.Tests/Hedging/HedgingActions.cs
  181. +2 −4 test/Polly.Core.Tests/Hedging/HedgingHelper.cs
  182. +1 −3 test/Polly.Core.Tests/Hedging/HedgingResiliencePipelineBuilderExtensionsTests.cs
  183. +4 −12 test/Polly.Core.Tests/Hedging/HedgingResilienceStrategyTests.cs
  184. +2 −4 test/Polly.Core.Tests/Hedging/PrimaryStringTasks.cs
  185. +2 −6 test/Polly.Core.Tests/PredicateResultTests.cs
  186. +2 −6 test/Polly.Core.Tests/Registry/ResiliencePipelineProviderTests.cs
  187. +2 −6 test/Polly.Core.Tests/Registry/ResiliencePipelineRegistryTests.cs
  188. +6 −18 test/Polly.Core.Tests/ResilienceContextPoolTests.cs
  189. +2 −4 test/Polly.Core.Tests/ResiliencePipelineTests.Async.cs
  190. +2 −4 test/Polly.Core.Tests/ResiliencePipelineTests.AsyncT.cs
  191. +2 −4 test/Polly.Core.Tests/ResiliencePipelineTests.Sync.cs
  192. +2 −4 test/Polly.Core.Tests/ResiliencePipelineTests.SyncT.cs
  193. +1 −3 test/Polly.Core.Tests/ResiliencePropertyKeyTests.cs
  194. +2 −6 test/Polly.Core.Tests/Simmy/Behavior/ChaosBehaviorPipelineBuilderExtensionsTests.cs
  195. +2 −6 test/Polly.Core.Tests/Simmy/Fault/ChaosFaultPipelineBuilderExtensionsTests.cs
  196. +8 −10 test/Polly.Core.Tests/Simmy/Fault/ChaosFaultStrategyTests.cs
  197. +1 −3 test/Polly.Core.Tests/Simmy/Outcomes/ChaosOutcomePipelineBuilderExtensionsTests.cs
  198. +16 −19 test/Polly.Core.Tests/Simmy/Outcomes/ChaosOutcomeStrategyTests.cs
  199. +1 −3 test/Polly.Core.Tests/Timeout/TimeoutConstantsTests.cs
  200. +1 −3 test/Polly.Core.Tests/Timeout/TimeoutResiliencePipelineBuilderExtensionsTests.cs
  201. +2 −0 test/Polly.Core.Tests/Timeout/TimeoutResilienceStrategyTests.cs
  202. +1 −3 test/Polly.Core.Tests/Timeout/TimeoutUtilTests.cs
  203. +1 −3 test/Polly.Core.Tests/Utils/DisposeHelperTests.cs
  204. +1 −3 test/Polly.Core.Tests/Utils/ObjectPoolTests.cs
  205. +2 −6 test/Polly.Core.Tests/Utils/Pipeline/BridgePipelineComponentTests.cs
  206. +2 −4 test/Polly.Core.Tests/Utils/Pipeline/CompositePipelineComponentTests.cs
  207. +1 −3 test/Polly.Core.Tests/Utils/RandomUtilTests.cs
  208. +24 −3 test/Polly.Core.Tests/Utils/StrategyHelperTests.cs
  209. +4 −10 test/Polly.Extensions.Tests/DependencyInjection/PollyServiceCollectionExtensionTests.cs
  210. +1 −4 test/Polly.Extensions.Tests/ReloadableResiliencePipelineTests.cs
  211. +1 −3 test/Polly.Extensions.Tests/Telemetry/TagsListTests.cs
  212. +2 −6 test/Polly.Extensions.Tests/Telemetry/TelemetryListenerImplTests.cs
  213. +1 −3 test/Polly.Extensions.Tests/Telemetry/TelemetryResiliencePipelineBuilderExtensionsTests.cs
  214. +1 −3 test/Polly.RateLimiting.Tests/RateLimiterConstantsTests.cs
  215. +3 −9 test/Polly.RateLimiting.Tests/RateLimiterResiliencePipelineBuilderExtensionsTests.cs
  216. +1 −3 test/Polly.RateLimiting.Tests/RateLimiterResilienceStrategyTests.cs
  217. +11 −1 test/Polly.Specs/Bulkhead/BulkheadAsyncSpecs.cs
  218. +12 −2 test/Polly.Specs/Bulkhead/BulkheadSpecs.cs
  219. +11 −1 test/Polly.Specs/Bulkhead/BulkheadTResultAsyncSpecs.cs
  220. +11 −1 test/Polly.Specs/Bulkhead/BulkheadTResultSpecs.cs
  221. +3 −3 test/Polly.Specs/Caching/AbsoluteTtlSpecs.cs
  222. +60 −0 test/Polly.Specs/Caching/ContextualTtlSpecs.cs
  223. +3 −3 test/Polly.Specs/Caching/RelativeTtlSpecs.cs
  224. +4 −4 test/Polly.Specs/Caching/ResultTtlSpecs.cs
  225. +4 −4 test/Polly.Specs/Caching/SerializingCacheProviderAsyncSpecs.cs
  226. +4 −4 test/Polly.Specs/Caching/SerializingCacheProviderSpecs.cs
  227. +3 −3 test/Polly.Specs/Caching/SlidingTtlSpecs.cs
  228. +154 −0 test/Polly.Specs/CircuitBreaker/AdvancedCircuitBreakerAsyncSpecs.cs
  229. +30 −0 test/Polly.Specs/PolicyContextAndKeyAsyncSpecs.cs
  230. +2 −2 test/Polly.Specs/Polly.Specs.csproj
  231. +20 −0 test/Polly.Specs/Retry/RetryAsyncSpecs.cs
  232. +38 −0 test/Polly.Specs/Retry/RetryForeverAsyncSpecs.cs
  233. +61 −0 test/Polly.Specs/Retry/WaitAndRetryAsyncSpecs.cs
  234. +72 −0 test/Polly.Specs/Retry/WaitAndRetryForeverAsyncSpecs.cs
  235. +2 −2 test/Polly.Specs/Retry/WaitAndRetryForeverSpecs.cs
  236. +6 −6 test/Polly.Specs/Retry/WaitAndRetrySpecs.cs
  237. +42 −0 test/Polly.Specs/Retry/WaitAndRetryTResultAsyncSpecs.cs
  238. +2 −2 test/Polly.Specs/Timeout/TimeoutAsyncSpecs.cs
  239. +2 −2 test/Polly.Specs/Timeout/TimeoutSpecs.cs
  240. +2 −2 test/Polly.Specs/Timeout/TimeoutTResultAsyncSpecs.cs
  241. +2 −2 test/Polly.Specs/Timeout/TimeoutTResultSpecs.cs
  242. +38 −0 test/Polly.Specs/Utilities/SystemClockSpecs.cs
  243. +1 −3 test/Polly.TestUtils/FakeLogger.cs
  244. +1 −1 test/Polly.TestUtils/FakeTelemetryListener.cs
  245. +1 −3 test/Polly.TestUtils/OutcomeExtensions.cs
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
]
},
"docfx": {
"version": "2.75.2",
"version": "2.75.3",
"commands": [
"docfx"
]
22 changes: 11 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -68,35 +68,35 @@ jobs:

- name: Upload Coverage Reports
if: always()
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: coverage-${{ matrix.os_name }}
path: ./artifacts/coverage-reports
if-no-files-found: ignore

- name: Upload coverage to Codecov
uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4.0.1
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0
with:
files: ./artifacts/coverage-reports/Polly.Core.Tests/Cobertura.xml,./artifacts/coverage-reports/Polly.Specs/Cobertura.xml,./artifacts/coverage-reports/Polly.RateLimiting.Tests/Cobertura.xml,./artifacts/coverage-reports/Polly.Extensions.Tests/Cobertura.xml,./artifacts/coverage-reports/Polly.Testing.Tests/Cobertura.xml,
flags: ${{ matrix.os_name }}
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload Mutation Report
if: always() && env.RUN_MUTATION_TESTS == 'true'
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: mutation-report
path: ./artifacts/mutation-report

- name: Publish NuGet packages
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: packages-${{ matrix.os_name }}
path: ./artifacts/package/release
if-no-files-found: error

- name: Upload signing file list
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: matrix.os_name == 'windows'
with:
name: signing-config
@@ -109,7 +109,7 @@ jobs:
steps:

- name: Download packages
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
with:
name: packages-windows

@@ -144,13 +144,13 @@ jobs:
steps:

- name: Download unsigned packages
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
with:
name: packages-windows
path: packages

- name: Download signing configuration
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
with:
name: signing-config
path: signing-config
@@ -182,7 +182,7 @@ jobs:
--verbosity "${{ runner.debug == '1' && 'Debug' || 'Warning' }}"
- name: Upload signed packages
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: signed-packages
path: packages
@@ -194,7 +194,7 @@ jobs:
steps:

- name: Download packages
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
with:
name: signed-packages

@@ -306,7 +306,7 @@ jobs:
steps:

- name: Download signed packages
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
with:
name: signed-packages

6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -44,14 +44,14 @@ jobs:
restore-keys: ${{ runner.os }}-nuget-

- name: Initialize CodeQL
uses: github/codeql-action/init@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
uses: github/codeql-action/init@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
uses: github/codeql-action/autobuild@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
uses: github/codeql-action/analyze@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
with:
category: "/language:${{ matrix.language }}"
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -18,4 +18,4 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Review dependencies
uses: actions/dependency-review-action@4901385134134e04cec5fbe5ddfe3b2c5bd5d976 # v4.0.0
uses: actions/dependency-review-action@9129d7d40b8c12c1ed0f60400d00c92d437adcce # v4.1.3
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ jobs:
!**/BenchmarkDotNet.Artifacts/**/*.md
- name: Spellcheck
uses: rojopolis/spellcheck-github-actions@737c1f7be0fa441a9d64a3763f9dcacf20a284d4 # v0.35.0
uses: rojopolis/spellcheck-github-actions@dbd2f1da869c05ad874fffeb6fe1ed50cd1a6e98 # v0.36.0
with:
config_path: .github/spellcheck.yml

4 changes: 2 additions & 2 deletions .github/workflows/ossf-scorecard.yml
Original file line number Diff line number Diff line change
@@ -32,13 +32,13 @@ jobs:
results_format: sarif

- name: Upload artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: SARIF
path: results.sarif
retention-days: 5

- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@b7bf0a3ed3ecfa44160715d7c442788f65f0f923 # v3.23.2
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
with:
sarif_file: results.sarif
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,28 @@

<!-- markdownlint-disable MD034 -->

## 8.3.1

* Add example for chaos engineering by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1956
* Fix CA1806 by [@gintsk](https://github.com/gintsk) in https://github.com/App-vNext/Polly/pull/1963
* Fix SA1129 by [@gintsk](https://github.com/gintsk) in https://github.com/App-vNext/Polly/pull/1964
* Fix S3717 by [@gintsk](https://github.com/gintsk) in https://github.com/App-vNext/Polly/pull/1965
* Add link to chaos engineering blog post by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1966
* Fix SA1501/IDE0055 by [@baranyaimate](https://github.com/baranyaimate) in https://github.com/App-vNext/Polly/pull/1957
* [Docs] Add cheat sheet for fault chaos by [@peter-csala](https://github.com/peter-csala) in https://github.com/App-vNext/Polly/pull/1972
* Improve unit test coverage in `Polly.Specs` by [@gintsk](https://github.com/gintsk) in https://github.com/App-vNext/Polly/pull/1974
* [Docs] Fix antipattern sample code by [@peter-csala](https://github.com/peter-csala) in https://github.com/App-vNext/Polly/pull/1976
* [Docs] Improve diagrams for hedging cancellation by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1975
* Add short description to each package by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1977
* Update NuGet tools by [@martincostello](https://github.com/martincostello) in https://github.com/App-vNext/Polly/pull/1992
* Move simmy from unshipped to shipped by [@peter-csala](https://github.com/peter-csala) in https://github.com/App-vNext/Polly/pull/1993
* Fix issue #1979: an unhandled exception in half open state must transition to closed and not prevent leaving half open state forever by [@DominicUllmann](https://github.com/DominicUllmann) in https://github.com/App-vNext/Polly/pull/1991
* Update samples to .NET 8 by [@martincostello](https://github.com/martincostello) in https://github.com/App-vNext/Polly/pull/2004
* [Docs] Fix calculation of exponential delay in flow chart by [@janher](https://github.com/janher) in https://github.com/App-vNext/Polly/pull/2005
* Use collection expressions in Cake script by [@martincostello](https://github.com/martincostello) in https://github.com/App-vNext/Polly/pull/2006
* Xml comments cleanup and improvement by [@gintsk](https://github.com/gintsk) in https://github.com/App-vNext/Polly/pull/2007
* Xml documentation cleanup by [@gintsk](https://github.com/gintsk) in https://github.com/App-vNext/Polly/pull/2008

## 8.3.0

* Update CHANGELOG for 8.2.1 by [@martincostello](https://github.com/martincostello) in https://github.com/App-vNext/Polly/pull/1882
20 changes: 10 additions & 10 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@
<PropertyGroup>
<MicrosoftExtensionsVersion>8.0.0</MicrosoftExtensionsVersion>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<PollyVersion>8.2.0</PollyVersion>
<PollyVersion>8.3.0</PollyVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="coverlet.msbuild" Version="6.0.0" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.11" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.1" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.12" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
@@ -22,8 +22,8 @@
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="$(MicrosoftExtensionsVersion)" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="$(MicrosoftExtensionsVersion)" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="$(MicrosoftExtensionsVersion)" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="8.2.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageVersion Include="MinVer" Version="4.3.0" />
<PackageVersion Include="NSubstitute" Version="5.1.0" />
<PackageVersion Include="Polly" Version="$(PollyVersion)" />
@@ -32,15 +32,15 @@
<PackageVersion Include="Polly.Extensions" Version="$(PollyVersion)" />
<PackageVersion Include="Polly.Testing" Version="$(PollyVersion)" />
<PackageVersion Include="Polly.Contrib.WaitAndRetry" Version="1.1.1" />
<PackageVersion Include="ReportGenerator" Version="5.2.0" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.15.0.81779" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.507" />
<PackageVersion Include="ReportGenerator" Version="5.2.2" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="9.20.0.85982" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="4.5.0" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="$(MicrosoftExtensionsVersion)" />
<PackageVersion Include="System.Threading.RateLimiting" Version="$(MicrosoftExtensionsVersion)" />
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="xunit" Version="2.6.6" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.6" />
<PackageVersion Include="xunit" Version="2.7.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
</ItemGroup>
</Project>
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -16,13 +16,13 @@ We are a member of the [.NET Foundation](https://www.dotnetfoundation.org/about)
## NuGet Packages

| **Package** | **Latest Version** |
|:--|:--|
| Polly | [![NuGet](https://buildstats.info/nuget/Polly)](https://www.nuget.org/packages/Polly/ "Download Polly from NuGet.org") |
| Polly.Core | [![NuGet](https://buildstats.info/nuget/Polly.Core)](https://www.nuget.org/packages/Polly.Core/ "Download Polly.Core from NuGet.org") |
| Polly.Extensions | [![NuGet](https://buildstats.info/nuget/Polly.Extensions)](https://www.nuget.org/packages/Polly.Extensions/ "Download Polly.Extensions from NuGet.org") |
| Polly.RateLimiting | [![NuGet](https://buildstats.info/nuget/Polly.RateLimiting)](https://www.nuget.org/packages/Polly.RateLimiting/ "Download Polly.RateLimiting from NuGet.org") |
| Polly.Testing | [![NuGet](https://buildstats.info/nuget/Polly.Testing)](https://www.nuget.org/packages/Polly.Testing/ "Download Polly.Testing from NuGet.org") |
| **Package** | **Latest Version** | **About** |
|:--|:--|:--|
| `Polly.Core` | [![NuGet](https://buildstats.info/nuget/Polly.Core)](https://www.nuget.org/packages/Polly.Core/ "Download Polly.Core from NuGet.org") | The core abstractions and [built-in strategies](https://www.pollydocs.org/strategies/index). |
| `Polly.Extensions` | [![NuGet](https://buildstats.info/nuget/Polly.Extensions)](https://www.nuget.org/packages/Polly.Extensions/ "Download Polly.Extensions from NuGet.org") | [Telemetry](https://www.pollydocs.org/advanced/telemetry) and [dependency injection](https://www.pollydocs.org/advanced/dependency-injection) support. |
| `Polly.RateLimiting` | [![NuGet](https://buildstats.info/nuget/Polly.RateLimiting)](https://www.nuget.org/packages/Polly.RateLimiting/ "Download Polly.RateLimiting from NuGet.org") | Integration with [`System.Threading.RateLimiting`](https://www.nuget.org/packages/System.Threading.RateLimiting) APIs. |
| `Polly.Testing` | [![NuGet](https://buildstats.info/nuget/Polly.Testing)](https://www.nuget.org/packages/Polly.Testing/ "Download Polly.Testing from NuGet.org") | [Testing support](https://www.pollydocs.org/advanced/testing) for Polly libraries. |
| `Polly` | [![NuGet](https://buildstats.info/nuget/Polly)](https://www.nuget.org/packages/Polly/ "Download Polly from NuGet.org") | This package contains the legacy API exposed by versions of the Polly library before version 8. |

## Documentation

4 changes: 1 addition & 3 deletions bench/Polly.Core.Benchmarks/CircuitBreakerOpenedBenchmark.cs
Original file line number Diff line number Diff line change
@@ -42,7 +42,5 @@ public async ValueTask ExecuteAsync_Exception_V8()

[Benchmark(Baseline = true)]
public async ValueTask ExecuteAsync_Outcome_V8()
{
await _reactivePipeline!.ExecuteAsync(_ => new ValueTask<string>("dummy"), CancellationToken.None).ConfigureAwait(false);
}
=> await _reactivePipeline!.ExecuteAsync(_ => new ValueTask<string>("dummy"), CancellationToken.None).ConfigureAwait(false);
}
8 changes: 2 additions & 6 deletions bench/Polly.Core.Benchmarks/CreationBenchmark.cs
Original file line number Diff line number Diff line change
@@ -5,21 +5,17 @@
public class CreationBenchmark
{
[Benchmark]
public static void Fallback_V7()
{
public static void Fallback_V7() =>
Policy
.HandleResult<string>(s => true)
.FallbackAsync(_ => Task.FromResult("fallback"));
}

[Benchmark]
public static void Fallback_V8()
{
public static void Fallback_V8() =>
new ResiliencePipelineBuilder<string>()
.AddFallback(new()
{
FallbackAction = _ => Outcome.FromResultAsValueTask("fallback")
})
.Build();
}
}
12 changes: 4 additions & 8 deletions bench/Polly.Core.Benchmarks/PredicateBenchmark.cs
Original file line number Diff line number Diff line change
@@ -31,14 +31,10 @@ public class PredicateBenchmark
};

[Benchmark(Baseline = true)]
public ValueTask<bool> Predicate_SwitchExpression()
{
return _delegate.ShouldHandle(_args);
}
public ValueTask<bool> Predicate_SwitchExpression() =>
_delegate.ShouldHandle(_args);

[Benchmark]
public ValueTask<bool> Predicate_PredicateBuilder()
{
return _builder.ShouldHandle(_args);
}
public ValueTask<bool> Predicate_PredicateBuilder() =>
_builder.ShouldHandle(_args);
}
21 changes: 5 additions & 16 deletions bench/Polly.Core.Benchmarks/ResiliencePipelineBenchmark.cs
Original file line number Diff line number Diff line change
@@ -23,16 +23,12 @@ public async ValueTask ExecuteAsync_ResilienceContextAndState()
}

[Benchmark]
public async ValueTask ExecuteAsync_CancellationToken()
{
public async ValueTask ExecuteAsync_CancellationToken() =>
await ResiliencePipeline.Empty.ExecuteAsync(_ => new ValueTask<string>("dummy"), CancellationToken.None).ConfigureAwait(false);
}

[Benchmark]
public async ValueTask ExecuteAsync_GenericStrategy_CancellationToken()
{
public async ValueTask ExecuteAsync_GenericStrategy_CancellationToken() =>
await ResiliencePipeline<string>.Empty.ExecuteAsync(_ => new ValueTask<string>("dummy"), CancellationToken.None).ConfigureAwait(false);
}

[Benchmark]
public void Execute_ResilienceContextAndState()
@@ -43,23 +39,16 @@ public void Execute_ResilienceContextAndState()
}

[Benchmark]
public void Execute_CancellationToken()
{
public void Execute_CancellationToken() =>
ResiliencePipeline.Empty.Execute(_ => "dummy", CancellationToken.None);
}

[Benchmark]
public void Execute_GenericStrategy_CancellationToken()
{
public void Execute_GenericStrategy_CancellationToken() =>
ResiliencePipeline<string>.Empty.Execute(_ => "dummy", CancellationToken.None);
}

public class NonGenericStrategy
{
[MethodImpl(MethodImplOptions.NoOptimization)]
public virtual ValueTask<T> ExecuteAsync<T>(Func<ValueTask<T>> callback)
{
return callback();
}
public virtual ValueTask<T> ExecuteAsync<T>(Func<ValueTask<T>> callback) => callback();
}
}
Original file line number Diff line number Diff line change
@@ -7,14 +7,12 @@ public class ResiliencePipelineProviderBenchmark
private ResiliencePipelineProvider<string>? _provider;

[GlobalSetup]
public void Setup()
{
public void Setup() =>
_provider = new ServiceCollection()
.AddResiliencePipeline("dummy", builder => builder.AddTimeout(new TimeoutStrategyOptions()))
.AddResiliencePipeline<string, string>("dummy", builder => builder.AddTimeout(new TimeoutStrategyOptions()))
.BuildServiceProvider()
.GetRequiredService<ResiliencePipelineProvider<string>>();
}

[Benchmark]
public void GetPipeline_Ok() => _provider!.GetPipeline("dummy");
5 changes: 1 addition & 4 deletions bench/Polly.Core.Benchmarks/Utils/EmptyResilienceStrategy.cs
Original file line number Diff line number Diff line change
@@ -5,8 +5,5 @@ internal class EmptyResilienceStrategy : ResilienceStrategy
protected internal override ValueTask<Outcome<TResult>> ExecuteCore<TResult, TState>(
Func<ResilienceContext, TState, ValueTask<Outcome<TResult>>> callback,
ResilienceContext context,
TState state)
{
return callback(context, state);
}
TState state) => callback(context, state);
}
6 changes: 2 additions & 4 deletions bench/Polly.Core.Benchmarks/Utils/Helper.Hedging.cs
Original file line number Diff line number Diff line change
@@ -6,15 +6,13 @@ internal static partial class Helper
{
public const string Failure = "failure";

public static ResiliencePipeline<string> CreateHedging()
{
return CreateStrategy(builder =>
public static ResiliencePipeline<string> CreateHedging() =>
CreateStrategy(builder =>
{
builder.AddHedging(new HedgingStrategyOptions<string>
{
ShouldHandle = args => new ValueTask<bool>(args.Outcome.Result == Failure),
ActionGenerator = args => () => Outcome.FromResultAsValueTask("hedged response"),
});
});
}
}
Loading