diff --git a/.github/spellcheck.yml b/.github/spellcheck.yml new file mode 100644 index 00000000000..fde4a19d54f --- /dev/null +++ b/.github/spellcheck.yml @@ -0,0 +1,30 @@ +matrix: +- name: Markdown + aspell: + ignore-case: true + lang: en + dictionary: + encoding: utf-8 + wordlists: + - .github/wordlist.txt + pipeline: + - pyspelling.filters.url: + - pyspelling.filters.markdown: + markdown_extensions: + - markdown.extensions.extra + - pymdownx.superfences + - pyspelling.filters.context: + context_visible_first: true + escapes: \\[\\`~] + delimiters: + # Ignore text between inline back ticks + - open: '(?P`+)' + close: '(?P=open)' + - pyspelling.filters.html: + comments: false + ignores: + - code + - pre + sources: + - '!CHANGELOG.md|!**/BenchmarkDotNet.Artifacts/**/*.md|!docs/community/resources.md|!docs/community/libraries-and-contributions.md|**/*.md' + default_encoding: utf-8 diff --git a/.github/wordlist.txt b/.github/wordlist.txt new file mode 100644 index 00000000000..feb1d089693 --- /dev/null +++ b/.github/wordlist.txt @@ -0,0 +1,63 @@ +alloc +apis +async +azurefunctions +bcl +bdd +cancellable +changelog +circuitbreaker +comparer +contrib +deserialization +dotnet +dotnetrocks +durations +eshoponcontainers +extensibility +flurl +hangfire +jetbrains +jitter +jittered +json +loggingpolicy +markdownsnippets +minver +moq +namespace +natively +ndc +nuget +oss +pcl +parallelize +pluralsight +pollydocs +pre +rabbitmq +ratelimiting +ratiosd +readme +resharper +rethrow +rethrows +retryable +reusability +sdk +serializers +silverlight +simmy +stackexchange +stddev +struct +synchronizationcontext +telemetryeventarguments +telemetrylistener +testability +timingpolicy +ui +uwp +waitandretry +wpf +xunit diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index cfcec8167ec..f6cc1085464 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -31,6 +31,11 @@ jobs: !CHANGELOG.md !**/BenchmarkDotNet.Artifacts/**/*.md + - name: Spellcheck + uses: rojopolis/spellcheck-github-actions@47363488bf2b5b90cf1ae9b92c11357eee961e10 # v0.34.0 + with: + config_path: .github/spellcheck.yml + - name: Setup .NET SDK uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index e3ec62e7140..0ee1da620c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,13 +17,13 @@ * Add docs on how to use snippets by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1604 * [Docs] General extensibility and implementation of proactive strategies by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1602 * Align the telemetry tags with official guidelines by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1583 -* Add antipatterns to retry strategy by [@peter-csala](https://github.com/peter-csala) in https://github.com/App-vNext/Polly/pull/1603 +* Add anti-patterns to retry strategy by [@peter-csala](https://github.com/peter-csala) in https://github.com/App-vNext/Polly/pull/1603 * [Docs] Reactive strategies extensibility by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1606 -* Add antipatterns to fallback strategy by [@peter-csala](https://github.com/peter-csala) in https://github.com/App-vNext/Polly/pull/1607 +* Add anti-patterns to fallback strategy by [@peter-csala](https://github.com/peter-csala) in https://github.com/App-vNext/Polly/pull/1607 * Avoid capturing where possible. by [@IEvangelist](https://github.com/IEvangelist) in https://github.com/App-vNext/Polly/pull/1609 * Fix urls within readme extensions project by [@wahid-moh](https://github.com/wahid-moh) in https://github.com/App-vNext/Polly/pull/1616 * [Docs] Testing by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1608 -* [Docs] Add antipatterns to circuit breaker documentation page by [@peter-csala](https://github.com/peter-csala) in https://github.com/App-vNext/Polly/pull/1621 +* [Docs] Add anti-patterns to circuit breaker documentation page by [@peter-csala](https://github.com/peter-csala) in https://github.com/App-vNext/Polly/pull/1621 * [Docs] Performance docs improvements by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1618 * [Docs] Polish the docs by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1619 * Introduce `RetryStrategyOptions.MaxDelay` property by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1620 @@ -124,7 +124,7 @@ * API Review Feedback by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1520 * Got rid of some warnings in the Polly project by [@IgorIgorevich94](https://github.com/IgorIgorevich94) in https://github.com/App-vNext/Polly/pull/1514 * API Review Feedback by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1521 -* Cleanup Outcome internals and drop unused hedging and fallbacks APIs by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1523 +* Cleanup Outcome internals and drop unused hedging and fallback APIs by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1523 * Improve debugging experience for `ResilienceProperties` by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1524 * Protect against retry delay overflows by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1522 * Fix DelayAsync extension by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1525 @@ -352,7 +352,7 @@ Thanks to: - Enhancement: Improved cache error message (issue 455) ## 6.0.1 -- Version 6 RTM, for integration to ASPNET Core 2.1 IHttpClientFactory +- Version 6 RTM, for integration to ASP.NET Core 2.1 IHttpClientFactory ## 6.0.0-v6alpha - Publish as strong-named package only (discontinue non-strong-named versions) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 07c19958e30..7ffa3c5d948 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,7 +1,4 @@ # Code of Conduct -Polly is part of the [.NET Foundation][dnf], and we ask our contributors to abide -by their [Code of Conduct][dnf-coc]. - -[dnf]: https://dotnetfoundation.org/ -[dnf-coc]: https://www.dotnetfoundation.org/code-of-conduct +Polly is part of the [.NET Foundation](https://dotnetfoundation.org/), and we ask our contributors to abide +by their [Code of Conduct](https://www.dotnetfoundation.org/code-of-conduct). diff --git a/README.md b/README.md index 1b442f2d0cb..33c9e97b5b1 100644 --- a/README.md +++ b/README.md @@ -103,12 +103,12 @@ Polly categorizes resilience strategies into two main groups: | Strategy | Reactive | Premise | AKA | How does the strategy mitigate?| | ------------- | --- | ------------- |:-------------: |------------- | -|**Retry**
(strategy family)
([quickstart](#retry) ; [deep](https://www.pollydocs.org/strategies/retry)) |Yes|Many faults are transient and may self-correct after a short delay.| *Maybe it's just a blip* | Allows configuring automatic retries. | -|**Circuit-breaker**
(strategy family)
([quickstart](#circuit-breaker) ; [deep](https://www.pollydocs.org/strategies/circuit-breaker))|Yes|When a system is seriously struggling, failing fast is better than making users/callers wait.

Protecting a faulting system from overload can help it recover. | *Stop doing it if it hurts*

*Give that system a break* | Breaks the circuit (blocks executions) for a period, when faults exceed some pre-configured threshold. | -|**Timeout**
([quickstart](#timeout) ; [deep](https://www.pollydocs.org/strategies/timeout))|No|Beyond a certain wait, a success result is unlikely.| *Don't wait forever* |Guarantees the caller won't have to wait beyond the timeout. | -|**Rate Limiter**
([quickstart](#rate-limiter) ; [deep](https://www.pollydocs.org/strategies/rate-limiter))|No|Limiting the rate a system handles requests is another way to control load.

This can apply to the way your system accepts incoming calls, and/or to the way you call downstream services. | *Slow down a bit, will you?* |Constrains executions to not exceed a certain rate. | -|**Fallback**
([quickstart](#fallback) ; [deep](https://www.pollydocs.org/strategies/fallback))|Yes|Things will still fail - plan what you will do when that happens.| *Degrade gracefully* |Defines an alternative value to be returned (or action to be executed) on failure. | -|**Hedging**
([quickstart](#hedging) ; [deep](https://www.pollydocs.org/strategies/hedging))|Yes|Things can be slow sometimes, plan what you will do when that happens.| *Hedge your bets* | Executes parallel actions when things are slow and waits for the fastest one. | +|**Retry**
(strategy family)
([quick-start](#retry) ; [deep](https://www.pollydocs.org/strategies/retry)) |Yes|Many faults are transient and may self-correct after a short delay.| *Maybe it's just a blip* | Allows configuring automatic retries. | +|**Circuit-breaker**
(strategy family)
([quick-start](#circuit-breaker) ; [deep](https://www.pollydocs.org/strategies/circuit-breaker))|Yes|When a system is seriously struggling, failing fast is better than making users/callers wait.

Protecting a faulting system from overload can help it recover. | *Stop doing it if it hurts*

*Give that system a break* | Breaks the circuit (blocks executions) for a period, when faults exceed some pre-configured threshold. | +|**Timeout**
([quick-start](#timeout) ; [deep](https://www.pollydocs.org/strategies/timeout))|No|Beyond a certain wait, a success result is unlikely.| *Don't wait forever* |Guarantees the caller won't have to wait beyond the timeout. | +|**Rate Limiter**
([quick-start](#rate-limiter) ; [deep](https://www.pollydocs.org/strategies/rate-limiter))|No|Limiting the rate a system handles requests is another way to control load.

This can apply to the way your system accepts incoming calls, and/or to the way you call downstream services. | *Slow down a bit, will you?* |Constrains executions to not exceed a certain rate. | +|**Fallback**
([quick-start](#fallback) ; [deep](https://www.pollydocs.org/strategies/fallback))|Yes|Things will still fail - plan what you will do when that happens.| *Degrade gracefully* |Defines an alternative value to be returned (or action to be executed) on failure. | +|**Hedging**
([quick-start](#hedging) ; [deep](https://www.pollydocs.org/strategies/hedging))|Yes|Things can be slow sometimes, plan what you will do when that happens.| *Hedge your bets* | Executes parallel actions when things are slow and waits for the fastest one. | Visit [resilience strategies](https://www.pollydocs.org/strategies) docs to explore how to configure individual resilience strategies in more detail. @@ -430,7 +430,7 @@ To learn more about Polly, visit [pollydocs.org][polly-docs]. - [Samples](samples/README.md): Samples in this repository that serve as an introduction to Polly. - [Polly-Samples](https://github.com/App-vNext/Polly-Samples): Contains practical examples for using various implementations of Polly. Please feel free to contribute to the Polly-Samples repository in order to assist others who are either learning Polly for the first time, or are seeking advanced examples and novel approaches provided by our generous community. -- Microsoft's [eShopOnContainers project](https://github.com/dotnet-architecture/eShopOnContainers): Sample project demonstrating a .NET Microservices architecture and using Polly for resilience. +- Microsoft's [eShopOnContainers project](https://github.com/dotnet-architecture/eShopOnContainers): Sample project demonstrating a .NET Micro-services architecture and using Polly for resilience. ## License diff --git a/docs/advanced/simmy.md b/docs/advanced/simmy.md index 1d3ed0a825c..4bdbc2ff8b0 100644 --- a/docs/advanced/simmy.md +++ b/docs/advanced/simmy.md @@ -1,6 +1,6 @@ # Chaos engineering with Simmy [Simmy][simmy] is a major new companion project adding a chaos-engineering and fault-injection dimension to Polly, through the provision of policies to selectively inject faults or latency. -Head over to the [Simmy][simmy] repo to find out more. +Head over to the [Simmy][simmy] repository to find out more. [simmy]: https://github.com/Polly-Contrib/Simmy diff --git a/docs/api/index.md b/docs/api/index.md index 64a1235da3f..96c768cbffe 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -1,4 +1,3 @@ # PLACEHOLDER -TODO: Add .NET projects to the *src* folder and run `docfx` to -generate **REAL** *API Documentation*! +`docfx` automatically generates this file when GitHub Pages are built. diff --git a/docs/community/libraries-and-contributions.md b/docs/community/libraries-and-contributions.md index ca31c26e702..24b32061a41 100644 --- a/docs/community/libraries-and-contributions.md +++ b/docs/community/libraries-and-contributions.md @@ -2,10 +2,10 @@ - [Fluent Assertions](https://github.com/fluentassertions/fluentassertions) - A set of .NET extension methods that allow you to more naturally specify the expected outcome of a TDD or BDD-style test | [Apache License 2.0 (Apache)](https://github.com/dennisdoomen/fluentassertions/blob/develop/LICENSE) - [xUnit.net](https://github.com/xunit/xunit) - Free, open source, community-focused unit testing tool for the .NET Framework | [Apache License 2.0 (Apache)](https://github.com/xunit/xunit/blob/main/license.txt) -- [Ian Griffith's TimedLock](http://www.interact-sw.co.uk/iangblog/2004/04/26/yetmoretimedlocking) -- [Steven van Deursen's ReadOnlyDictionary](http://www.cuttingedge.it/blogs/steven/pivot/entry.php?id=29) (until Polly v5.0.6) -- [Stephen Cleary's AsyncEx library](https://github.com/StephenCleary/AsyncEx) for AsyncSemaphore (supports BulkheadAsync policy for .NET4.0 only) (until Polly v5.9.0) | [MIT license](https://github.com/StephenCleary/AsyncEx/blob/master/LICENSE) -- [@theraot](https://github.com/theraot)'s [ExceptionDispatchInfo implementation for .NET4.0](https://stackoverflow.com/a/31226509/) (supports Timeout policy for .NET4.0 only) (until Polly v5.9.0) including also a contribution by [@migueldeicaza](https://github.com/migueldeicaza) | Licensed under and distributed under [Creative Commons Attribution Share Alike license](https://creativecommons.org/licenses/by-sa/3.0/) per [StackExchange Terms of Service](https://stackexchange.com/legal) +- [Ian Griffith's `TimedLock`](http://www.interact-sw.co.uk/iangblog/2004/04/26/yetmoretimedlocking) +- [Steven van Deursen's `ReadOnlyDictionary`](http://www.cuttingedge.it/blogs/steven/pivot/entry.php?id=29) (until Polly v5.0.6) +- [Stephen Cleary's `AsyncEx` library](https://github.com/StephenCleary/AsyncEx) for `AsyncSemaphore` (supports `BulkheadAsync` policy for .NET 4.0 only) (until Polly v5.9.0) | [MIT license](https://github.com/StephenCleary/AsyncEx/blob/master/LICENSE) +- [@theraot](https://github.com/theraot)'s [`ExceptionDispatchInfo` implementation for .NET 4.0](https://stackoverflow.com/a/31226509/) (supports Timeout policy for .NET4.0 only) (until Polly v5.9.0) including also a contribution by [@migueldeicaza](https://github.com/migueldeicaza) | Licensed under and distributed under [Creative Commons Attribution Share Alike license](https://creativecommons.org/licenses/by-sa/3.0/) per [StackExchange Terms of Service](https://stackexchange.com/legal) - Build powered by [Cake](https://cakebuild.net/) and [MinVer](https://github.com/adamralph/minver). Developers powered by [Resharper](https://www.jetbrains.com/resharper/), with thanks to JetBrains for [OSS licensing](https://www.jetbrains.com/support/community/#section=open-source). ## Acknowledgements @@ -19,62 +19,62 @@ - [@ThomasMentzel](https://github.com/ThomasMentzel) - Added ability to capture the results of executing a policy via `ExecuteAndCapture` - [@yevhen](https://github.com/yevhen) - Added full control of whether to continue on captured synchronization context or not - [@reisenberger](https://github.com/reisenberger) - Added full async cancellation support -- [@reisenberger](https://github.com/reisenberger) - Added async support for ContextualPolicy -- [@reisenberger](https://github.com/reisenberger) - Added ContextualPolicy support for circuit-breaker +- [@reisenberger](https://github.com/reisenberger) - Added async support for `ContextualPolicy` +- [@reisenberger](https://github.com/reisenberger) - Added `ContextualPolicy` support for circuit-breaker - [@reisenberger](https://github.com/reisenberger) - Extended circuit-breaker for public monitoring and control -- [@reisenberger](https://github.com/reisenberger) - Added ExecuteAndCapture support with arbitrary context data -- [@kristianhald](https://github.com/kristianhald) and [@reisenberger](https://github.com/reisenberger) - Added AdvancedCircuitBreaker -- [@reisenberger](https://github.com/reisenberger) - Allowed async onRetry delegates to async retry policies -- [@Lumirris](https://github.com/Lumirris) - Add new Polly.Net40Async project/package supporting async for .NET40 via Microsoft.Bcl.Async -- [@SteveCote](https://github.com/SteveCote) - Added overloads to WaitAndRetry and WaitAndRetryAsync methods that accept an onRetry delegate which includes the attempt count. -- [@reisenberger](https://github.com/reisenberger) - Allowed policies to handle returned results; added strongly-typed policies Policy<TResult>;. +- [@reisenberger](https://github.com/reisenberger) - Added `ExecuteAndCapture` support with arbitrary context data +- [@kristianhald](https://github.com/kristianhald) and [@reisenberger](https://github.com/reisenberger) - Added `AdvancedCircuitBreaker` +- [@reisenberger](https://github.com/reisenberger) - Allowed async `onRetry` delegates to async retry policies +- [@Lumirris](https://github.com/Lumirris) - Add new `Polly.Net40Async` project/package supporting async for .NET 4.0 via Microsoft.Bcl.Async +- [@SteveCote](https://github.com/SteveCote) - Added overloads to `WaitAndRetry{Async}` methods that accept an `onRetry` delegate which includes the attempt count. +- [@reisenberger](https://github.com/reisenberger) - Allowed policies to handle returned results; added strongly-typed policies `Policy<TResult>`. - [@christopherbahr](https://github.com/christopherbahr) - Added optimisation for circuit-breaker hot path. - [@Finity](https://github.com/Finity) - Fixed circuit-breaker threshold bug. -- [@reisenberger](https://github.com/reisenberger) - Add some missing ExecuteAndCapture/Async overloads. -- [@brunolauze](https://github.com/brunolauze) - Add CancellationToken support to synchronous executions (to support TimeoutPolicy). -- [@reisenberger](https://github.com/reisenberger) - Add PolicyWrap. +- [@reisenberger](https://github.com/reisenberger) - Add some missing `ExecuteAndCapture{Async}` overloads. +- [@brunolauze](https://github.com/brunolauze) - Add CancellationToken support to synchronous executions (to support `TimeoutPolicy`). +- [@reisenberger](https://github.com/reisenberger) - Add `PolicyWrap`. - [@reisenberger](https://github.com/reisenberger) - Add Fallback policy. -- [@reisenberger](https://github.com/reisenberger) - Add PolicyKeys and context to all policy executions, as bedrock for policy events and metrics tracking executions. +- [@reisenberger](https://github.com/reisenberger) - Add `PolicyKeys` and context to all policy executions, as bedrock for policy events and metrics tracking executions. - [@reisenberger](https://github.com/reisenberger), and contributions from [@brunolauze](https://github.com/brunolauze) - Add Bulkhead Isolation policy. - [@reisenberger](https://github.com/reisenberger) - Add Timeout policy. -- [@reisenberger](https://github.com/reisenberger) - Fix .NETStandard 1.0 targeting. Remove PCL259 target. PCL259 support is provided via .NETStandard1.0 target, going forward. -- [@reisenberger](https://github.com/reisenberger) - Fix CircuitBreaker HalfOpen state and cases when breakDuration is shorter than typical call timeout. Thanks to [@vgouw](https://github.com/vgouw) and [@kharos](https://github.com/kharos) for the reports and insightful thinking. -- [@lakario](https://github.com/lakario) - Tidy CircuitBreaker LastException property. -- [@lakario](https://github.com/lakario) - Add NoOpPolicy. -- [@Julien-Mialon](https://github.com/Julien-Mialon) - Fixes, support and examples for .NETStandard compatibility with Xamarin PCL projects +- [@reisenberger](https://github.com/reisenberger) - Fix .NET Standard 1.0 targeting. Remove `PCL259` target. `PCL259` support is provided via .NET Standard 1.0 target, going forward. +- [@reisenberger](https://github.com/reisenberger) - Fix CircuitBreaker `HalfOpen` state and cases when breakDuration is shorter than typical call timeout. Thanks to [@vgouw](https://github.com/vgouw) and [@kharos](https://github.com/kharos) for the reports and insightful thinking. +- [@lakario](https://github.com/lakario) - Tidy CircuitBreaker `LastException` property. +- [@lakario](https://github.com/lakario) - Add `NoOpPolicy`. +- [@Julien-Mialon](https://github.com/Julien-Mialon) - Fixes, support and examples for .NET Standard compatibility with Xamarin PCL projects - [@reisenberger](https://github.com/reisenberger) - Add mutable Context and extra overloads taking Context. Allows different parts of a policy execution to exchange data via the mutable Context travelling with each execution. -- [@ankitbko](https://github.com/ankitbko) - Add PolicyRegistry for storing and retrieving policies. +- [@ankitbko](https://github.com/ankitbko) - Add `PolicyRegistry` for storing and retrieving policies. - [@reisenberger](https://github.com/reisenberger) - Add interfaces by policy type and execution type. -- [@seanfarrow](https://github.com/SeanFarrow) - Add IReadOnlyPolicyRegistry interface. -- [@kesmy](https://github.com/Kesmy) - Migrate solution to msbuild15, banish project.json and packages.config -- [@hambudi](https://github.com/hambudi) - Ensure sync TimeoutPolicy with TimeoutStrategy.Pessimistic rethrows delegate exceptions without additional AggregateException. -- [@jiimaho](https://github.com/jiimaho) and [@Extremo75](https://github.com/ExtRemo75) - Provide public factory methods for PolicyResult, to support testing. +- [@seanfarrow](https://github.com/SeanFarrow) - Add `IReadOnlyPolicyRegistry` interface. +- [@kesmy](https://github.com/Kesmy) - Migrate solution to msbuild15, banish `project.json` and `packages.config` +- [@hambudi](https://github.com/hambudi) - Ensure sync `TimeoutPolicy` with `TimeoutStrategy.Pessimistic` rethrows delegate exceptions without additional `AggregateException`. +- [@jiimaho](https://github.com/jiimaho) and [@Extremo75](https://github.com/ExtRemo75) - Provide public factory methods for `PolicyResult`, to support testing. - [@Extremo75](https://github.com/ExtRemo75) - Allow fallback delegates to take handled fault as input parameter. -- [@reisenberger](https://github.com/reisenberger) and [@seanfarrow](https://github.com/SeanFarrow) - Add CachePolicy, with interfaces for pluggable cache providers and serializers. +- [@reisenberger](https://github.com/reisenberger) and [@seanfarrow](https://github.com/SeanFarrow) - Add `CachePolicy`, with interfaces for pluggable cache providers and serializers. - Thanks to the awesome devs at [@tretton37](https://github.com/tretton37) who delivered the following as part of a one-day in-company hackathon led by [@reisenberger](https://github.com/reisenberger), sponsored by [@tretton37](https://github.com/tretton37) and convened by [@thecodejunkie](https://github.com/thecodejunkie) - - [@matst80](https://github.com/matst80) - Allow WaitAndRetry to take handled fault as an input to the sleepDurationProvider, allowing WaitAndRetry to take account of systems which specify a duration to wait as part of a fault response; eg Azure CosmosDB may specify this in `x-ms-retry-after-ms` headers or in a property to an exception thrown by the Azure CosmosDB SDK. - - [@MartinSStewart](https://github.com/martinsstewart) - Add GetPolicies() extension methods to IPolicyWrap. + - [@matst80](https://github.com/matst80) - Allow WaitAndRetry to take handled fault as an input to the `sleepDurationProvider`, allowing WaitAndRetry to take account of systems which specify a duration to wait as part of a fault response; e.g. Azure CosmosDB may specify this in `x-ms-retry-after-ms` headers or in a property to an exception thrown by the Azure CosmosDB SDK. + - [@MartinSStewart](https://github.com/martinsstewart) - Add `GetPolicies()` extension methods to `IPolicyWrap`. - [@jbergens37](https://github.com/jbergens37) - Parallelize test running where possible, to improve overall build speed. - [@reisenberger](https://github.com/reisenberger) - Add new `.HandleInner(...)` syntax for handling inner exceptions natively. -- [@rjongeneelen](https://github.com/rjongeneelen) and [@reisenberger](https://github.com/reisenberger) - Allow PolicyWrap configuration to configure policies via interfaces. +- [@rjongeneelen](https://github.com/rjongeneelen) and [@reisenberger](https://github.com/reisenberger) - Allow `PolicyWrap` configuration to configure policies via interfaces. - [@reisenberger](https://github.com/reisenberger) - Performance improvements. -- [@awarrenlove](https://github.com/awarrenlove) - Add ability to calculate cache Ttl based on item to cache. -- [@erickhouse](https://github.com/erickhouse) - Add a new onBreak overload that provides the prior state on a transition to an open state. -- [@benagain](https://github.com/benagain) - Bug fix: RelativeTtl in CachePolicy now always returns a ttl relative to time item is cached. -- [@urig](https://github.com/urig) - Allow TimeoutPolicy to be configured with Timeout.InfiniteTimeSpan. -- [@reisenberger](https://github.com/reisenberger) - Integration with [IHttpClientFactory](https://github.com/aspnet/HttpClientFactory/) for ASPNET Core 2.1. -- [@freakazoid182](https://github.com/Freakazoid182) - WaitAnd/RetryForever overloads where onRetry takes the retry number as a parameter. -- [@dustyhoppe](https://github.com/dustyhoppe) - Overloads where onTimeout takes thrown exception as a parameter. +- [@awarrenlove](https://github.com/awarrenlove) - Add ability to calculate cache TTL based on item to cache. +- [@erickhouse](https://github.com/erickhouse) - Add a new `onBreak` overload that provides the prior state on a transition to an open state. +- [@benagain](https://github.com/benagain) - Bug fix: `RelativeTtl` in `CachePolicy` now always returns a ttl relative to time item is cached. +- [@urig](https://github.com/urig) - Allow `TimeoutPolicy` to be configured with `Timeout.InfiniteTimeSpan`. +- [@reisenberger](https://github.com/reisenberger) - Integration with [`IHttpClientFactory`](https://github.com/aspnet/HttpClientFactory/) for ASP.NET Core 2.1. +- [@freakazoid182](https://github.com/Freakazoid182) - `WaitAndRetry{Forever}` overloads where `onRetry` takes the retry number as a parameter. +- [@dustyhoppe](https://github.com/dustyhoppe) - Overloads where `onTimeout` takes thrown exception as a parameter. - [@flin-zap](https://github.com/flin-zap) - Catch missing async continuation control. - [@reisenberger](https://github.com/reisenberger) - Clarify separation of sync and async policies. - [@reisenberger](https://github.com/reisenberger) - Enable extensibility by custom policies hosted external to Polly. -- [@seanfarrow](https://github.com/SeanFarrow) - Enable collection initialization syntax for PolicyRegistry. +- [@seanfarrow](https://github.com/SeanFarrow) - Enable collection initialization syntax for `PolicyRegistry`. - [@moerwald](https://github.com/moerwald) - Code clean-ups, usage of more concise C# members. -- [@cmeeren](https://github.com/cmeeren) - Enable cache policies to cache values of default(TResult). -- [@aprooks](https://github.com/aprooks) - Build script tweaks for Mac and mono. -- [@kesmy](https://github.com/Kesmy) - Add Soucelink support, clean up cake build. -- [@simluk](https://github.com/simluk) - Fix continueOnCaptureContext not being honored in async retry implementation (bug in v7.1.0 only). +- [@cmeeren](https://github.com/cmeeren) - Enable cache policies to cache values of `default(TResult)`. +- [@aprooks](https://github.com/aprooks) - Build script tweaks for Mac and Mono. +- [@kesmy](https://github.com/Kesmy) - Add SourceLink support, clean up cake build. +- [@simluk](https://github.com/simluk) - Fix `continueOnCaptureContext` not being honored in async retry implementation (bug in v7.1.0 only). - [@jnyrup](https://github.com/jnyrup) - Upgrade tests to Fluent Assertions v5.9.0 -- [@SimonCropp](https://github.com/SimonCropp) - Add netcoreapp3.0 target; code clean-ups. -- [@aerotog](https://github.com/aerotog) and [@reisenberger](https://github.com/reisenberger) - IConcurrentPolicyRegistry methods on PolicyRegistry +- [@SimonCropp](https://github.com/SimonCropp) - Add `netcoreapp3.0` target; code clean-ups. +- [@aerotog](https://github.com/aerotog) and [@reisenberger](https://github.com/reisenberger) - `IConcurrentPolicyRegistry` methods on `PolicyRegistry` - [@reisenberger](https://github.com/reisenberger) and [@martincostello](https://github.com/martincostello) - Add RateLimit policy. diff --git a/docs/community/polly-contrib.md b/docs/community/polly-contrib.md index bdf8b3a379c..a278387e16b 100644 --- a/docs/community/polly-contrib.md +++ b/docs/community/polly-contrib.md @@ -2,18 +2,18 @@ Polly now has a [Polly-Contrib](https://github.com/Polly-Contrib) to allow the community to contribute policies or other enhancements around Polly with a low burden of ceremony. -Have a contrib you'd like to publish under Polly-Contrib? Contact us with an issue here or on [Polly's Slack](http://pollytalk.slack.com), and we can set up a CI-ready Polly.Contrib repo to which you have full rights, to help you manage and deliver your awesomeness to the community! +Have a contrib you'd like to publish under Polly-Contrib? Contact us with an issue here or on [Polly's Slack](http://pollytalk.slack.com), and we can set up a CI-ready Polly.Contrib repository to which you have full rights, to help you manage and deliver your awesomeness to the community! We also provide: - a blank [starter template for a custom policy](https://github.com/Polly-Contrib/Polly.Contrib.CustomPolicyTemplates) (see above for more on custom policies) -- a [template repo for any other contrib](https://github.com/Polly-Contrib/Polly.Contrib.BlankTemplate) +- a [template repository for any other contributions](https://github.com/Polly-Contrib/Polly.Contrib.BlankTemplate) Both templates contain a full project structure referencing Polly, Polly's default build targets, and a build to build and test your contrib and make a NuGet package. ## Available via Polly-Contrib -- [Polly.Contrib.WaitAndRetry](https://github.com/Polly-Contrib/Polly.Contrib.WaitAndRetry): a collection of concise helper methods for common wait-and-retry strategies; and a new jitter formula combining exponential backoff with a very even distribution of randomly-jittered retry intervals. +- [Polly.Contrib.WaitAndRetry](https://github.com/Polly-Contrib/Polly.Contrib.WaitAndRetry): a collection of concise helper methods for common wait-and-retry strategies; and a new jitter formula combining exponential back-off with a very even distribution of randomly-jittered retry intervals. - [Polly.Contrib.AzureFunctions.CircuitBreaker](https://github.com/Polly-Contrib/Polly.Contrib.AzureFunctions.CircuitBreaker): a distributed circuit-breaker implemented in Azure Functions; consumable in Azure Functions, or from anywhere over http. - [Simmy](https://github.com/Polly-Contrib/Simmy): our chaos engineering project. - [Polly.Contrib.TimingPolicy](https://github.com/Polly-Contrib/Polly.Contrib.TimingPolicy): a starter policy to publish execution timings of any call executed through Policy. diff --git a/docs/community/resources.md b/docs/community/resources.md index 3b584cc8fd7..e8388e283ee 100644 --- a/docs/community/resources.md +++ b/docs/community/resources.md @@ -7,10 +7,10 @@ This includes Blogs, podcasts, courses, e-books, architecture samples and videos - [Adding a circuit breaker to your ASP.NET 6 application with Polly](https://lachlanbarclay.net/2023/01/adding-a-circuit-breaker-to-asp-net-6-application) - by [Lachlan Barclay](https://lachlanbarclay.net/) - [Try .NET Samples of Polly, the .NET Resilience Framework](https://github.com/bryanjhogan/trydotnet-polly) - by [Bryan Hogan](https://nodogmablog.bryanhogan.net/) - [Create exceptional interactive documentation with Try .NET - The Polly NuGet library did!](https://www.hanselman.com/blog/CreateExceptionalInteractiveDocumentationWithTryNETThePollyNuGetLibraryDid.aspx) - by [Scott Hanselman](https://www.hanselman.com/about/) (writing about the work of Bryan Hogan) -- [Adding resilience and Transient Fault handling to your .NET Core HttpClient with Polly](https://www.hanselman.com/blog/AddingResilienceAndTransientFaultHandlingToYourNETCoreHttpClientWithPolly.aspx) - by [Scott Hanselman](https://www.hanselman.com/about/) +- [Adding resilience and Transient Fault handling to your .NET Core `HttpClient` with Polly](https://www.hanselman.com/blog/AddingResilienceAndTransientFaultHandlingToYourNETCoreHttpClientWithPolly.aspx) - by [Scott Hanselman](https://www.hanselman.com/about/) - [Reliable Event Processing in Azure Functions](https://hackernoon.com/reliable-event-processing-in-azure-functions-37054dc2d0fc) - by [Jeff Hollan](https://hackernoon.com/@jeffhollan) -- [Optimally configuring ASPNET Core HttpClientFactory](https://rehansaeed.com/optimally-configuring-asp-net-core-httpclientfactory/) including with Polly policies - by [Muhammad Rehan Saeed](https://twitter.com/RehanSaeedUK/) -- [Integrating HttpClientFactory with Polly for transient fault handling](https://www.stevejgordon.co.uk/httpclientfactory-using-polly-for-transient-fault-handling) - by [Steve Gordon](https://www.stevejgordon.co.uk/) +- [Optimally configuring ASP.NET Core `HttpClientFactory`](https://rehansaeed.com/optimally-configuring-asp-net-core-httpclientfactory/) including with Polly policies - by [Muhammad Rehan Saeed](https://twitter.com/RehanSaeedUK/) +- [Integrating `HttpClientFactory` with Polly for transient fault handling](https://www.stevejgordon.co.uk/httpclientfactory-using-polly-for-transient-fault-handling) - by [Steve Gordon](https://www.stevejgordon.co.uk/) - [Resilient network connectivity in Xamarin Forms](https://xamarinhelp.com/resilient-network-connectivity-xamarin-forms/) - by [Adam Pedley](http://xamarinhelp.com/contact/) - [Policy recommendations for Azure Cognitive Services](http://www.thepollyproject.org/2018/03/06/policy-recommendations-for-azure-cognitive-services/) - by [Joel Hulen](http://www.thepollyproject.org/author/joel/) - [Using Polly with F# async workflows](http://blog.ploeh.dk/2017/05/30/using-polly-with-f-async-workflows/) - by [Mark Seemann](http://blog.ploeh.dk/about/) @@ -24,28 +24,28 @@ This includes Blogs, podcasts, courses, e-books, architecture samples and videos - [When you use the Polly circuit-breaker, make sure you share your Policy instances!](https://andrewlock.net/when-you-use-the-polly-circuit-breaker-make-sure-you-share-your-policy-instances-2/) - by [Andrew Lock](https://andrewlock.net/about/) - [Polly is Repetitive, and I love it!](http://www.appvnext.com/blog/2015/11/19/polly-is-repetitive-and-i-love-it) - by [Joel Hulen](http://www.thepollyproject.org/author/joel/) - [Using the Context to Obtain the Retry Count for Diagnostics](https://www.stevejgordon.co.uk/polly-using-context-to-obtain-retry-count-diagnostics) - by [Steve Gordon](https://twitter.com/stevejgordon) -- [Passing an ILogger to Polly Policies](https://www.stevejgordon.co.uk/passing-an-ilogger-to-polly-policies) - by [Steve Gordon](https://twitter.com/stevejgordon) +- [Passing an `ILogger` to Polly Policies](https://www.stevejgordon.co.uk/passing-an-ilogger-to-polly-policies) - by [Steve Gordon](https://twitter.com/stevejgordon) - [Using Polly and Flurl to improve your website](https://jeremylindsayni.wordpress.com/2019/01/01/using-polly-and-flurl-to-improve-your-website/) - by Jeremy Lindsay. - [Exploring the Polly.Contrib.WaitAndRetry helpers](https://hyr.mn/Polly-wait-and-retry/) - by [Ben Hyrman](https://twitter.com/hyrmn), who also wrote most of the Polly.Contrib.WaitAndRetry documentation. ## Podcasts -- June 2018: [DotNetRocks features Polly](https://www.dotnetrocks.com/?show=1556) as [Carl Franklin](https://twitter.com/carlfranklin) and [Richard Campbell](https://twitter.com/richcampbell) chat with [Dylan Reisenberger](https://twitter.com/softwarereisen) about policy patterns, and the new ASP NET Core 2.1 integration with IHttpClientFactory. -- April 2017: [Dylan Reisenberger](https://twitter.com/softwarereisen) sits down virtually with [Bryan Hogan](https://twitter.com/bryanjhogan) of [NoDogmaBlog](http://nodogmablog.bryanhogan.net/) for an [Introduction to Polly podcast](http://nodogmapodcast.bryanhogan.net/71-dylan-reisenberger-the-polly-project/). Why do I need Polly? History of the Polly project. What do we mean by resilience and transient faults? How retry and circuit-breaker help. Exponential backoff. Stability patterns. Bulkhead isolation. Future directions (as at April 2017). +- June 2018: [DotNetRocks features Polly](https://www.dotnetrocks.com/?show=1556) as [Carl Franklin](https://twitter.com/carlfranklin) and [Richard Campbell](https://twitter.com/richcampbell) chat with [Dylan Reisenberger](https://twitter.com/softwarereisen) about policy patterns, and the new ASP NET Core 2.1 integration with `IHttpClientFactory`. +- April 2017: [Dylan Reisenberger](https://twitter.com/softwarereisen) sits down virtually with [Bryan Hogan](https://twitter.com/bryanjhogan) of [No Dogma Blog](http://nodogmablog.bryanhogan.net/) for an [Introduction to Polly podcast](http://nodogmapodcast.bryanhogan.net/71-dylan-reisenberger-the-polly-project/). Why do I need Polly? History of the Polly project. What do we mean by resilience and transient faults? How retry and circuit-breaker help. Exponential back-off. Stability patterns. Bulkhead isolation. Future directions (as at April 2017). ## PluralSight course -- [Bryan Hogan](https://twitter.com/bryanjhogan) of the [NoDogmaBlog](http://nodogmablog.bryanhogan.net/) has authored a [PluralSight course on Polly](https://www.pluralsight.com/courses/polly-fault-tolerant-web-service-requests). The course takes you through all the major features of Polly, with an additional module added in the fall of 2018 on Http Client Factory. The course examples are based around using Polly for fault tolerance when calling remote web services, but the principles and techniques are applicable to any context in which Polly may be used. +- [Bryan Hogan](https://twitter.com/bryanjhogan) of the [No Dogma Blog](http://nodogmablog.bryanhogan.net/) has authored a [PluralSight course on Polly](https://www.pluralsight.com/courses/polly-fault-tolerant-web-service-requests). The course takes you through all the major features of Polly, with an additional module added in the fall of 2018 on Http Client Factory. The course examples are based around using Polly for fault tolerance when calling remote web services, but the principles and techniques are applicable to any context in which Polly may be used. -## Sample microservices architecture and e-book +## Sample micro-services architecture and e-book -### Sample microservices architecture +### Sample micro-services architecture -- [Cesar de la Torre](https://github.com/CESARDELATORRE) produced the Microsoft [eShopOnContainers project](https://github.com/dotnet-architecture/eShopOnContainers), a sample project demonstrating a .NET Microservices architecture. The project uses Polly retry and circuit-breaker policies for resilience in calls to microservices, and in establishing connections to transports such as RabbitMQ. +- [Cesar de la Torre](https://github.com/CESARDELATORRE) produced the Microsoft [eShopOnContainers project](https://github.com/dotnet-architecture/eShopOnContainers), a sample project demonstrating a .NET Micro-services architecture. The project uses Polly retry and circuit-breaker policies for resilience in calls to micro-services, and in establishing connections to transports such as RabbitMQ. ### e-book -- Accompanying the project is a [.NET Microservices Architecture ebook](https://www.microsoft.com/net/download/thank-you/microservices-architecture-ebook) with an extensive section (section 8) on using Polly for resilience, to which [Dylan Reisenberger](https://twitter.com/softwarereisen) contributed. The e-book and code is now (June 2018) updated for using the latest ASP NET Core 2.1 features, [Polly with IHttpClientFactory](https://github.com/App-vNext/Polly/wiki/Polly-and-HttpClientFactory). +- Accompanying the project is a [.NET Micro-services Architecture e-book](https://www.microsoft.com/net/download/thank-you/microservices-architecture-ebook) with an extensive section (section 8) on using Polly for resilience, to which [Dylan Reisenberger](https://twitter.com/softwarereisen) contributed. The e-book and code is now (June 2018) updated for using the latest ASP NET Core 2.1 features, [Polly with `IHttpClientFactory`](https://github.com/App-vNext/Polly/wiki/Polly-and-HttpClientFactory). ## Videos @@ -53,4 +53,4 @@ This includes Blogs, podcasts, courses, e-books, architecture samples and videos - From MVP [Houssem Dellai](https://github.com/HoussemDellai), a [YouTube video on How to use Polly with Xamarin Apps](https://www.youtube.com/watch?v=7vsN0RkFN_E), covering wait-and-retry and discussing circuit-breaker policy with a demonstration in Xamarin Forms. Here is the [source code](https://github.com/HoussemDellai/ResilientHttpClient) of the application demonstrated in the video. Draws on the [`ResilientHttpClient`](https://github.com/dotnet-architecture/eShopOnContainers/blob/dev/src/BuildingBlocks/Resilience/Resilience.Http/ResilientHttpClient.cs) from Microsoft's [eShopOnContainers project](https://github.com/dotnet-architecture/eShopOnContainers). - In the video, [.NET Rocks Live with Jon Skeet and Bill Wagner](https://youtu.be/LCj7h7ZoHA8?t=1617), Bill Wagner discusses Polly. - Scott Allen discusses Polly during his [Building for Resiliency and Scale in the Cloud](https://youtu.be/SFLu6jZWXGs?t=1440) presentation at NDC. -- [ASP.NET Community Standup April 24, 2018](https://youtu.be/k0Xy-5zE9to?t=12m22s): Damian Edwards, Jon Galloway and Scott Hanselman discuss Scott Hanselman's blog on [Polly with IHttpClientFactory](https://www.hanselman.com/blog/AddingResilienceAndTransientFaultHandlingToYourNETCoreHttpClientWithPolly.aspx) and the [Polly team documentation on IHttpClientFactory](https://github.com/App-vNext/Polly/wiki/Polly-and-HttpClientFactory). Interesting background discussion also on feature richness and the importance of good documentation. +- [ASP.NET Community Stand-up April 24, 2018](https://youtu.be/k0Xy-5zE9to?t=12m22s): Damian Edwards, Jon Galloway and Scott Hanselman discuss Scott Hanselman's blog on [Polly with `IHttpClientFactory`](https://www.hanselman.com/blog/AddingResilienceAndTransientFaultHandlingToYourNETCoreHttpClientWithPolly.aspx) and the [Polly team documentation on `IHttpClientFactory`](https://github.com/App-vNext/Polly/wiki/Polly-and-HttpClientFactory). Interesting background discussion also on feature richness and the importance of good documentation. diff --git a/docs/index.md b/docs/index.md index c4918a7ee0a..4e90bcb9b2f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -42,6 +42,6 @@ You can also find many resources and community contributions, such as: - [Practical Samples](https://github.com/App-vNext/Polly-Samples): Practical examples for using various implementations of Polly. Please feel free to contribute to the Polly-Samples repository in order to assist others who are either learning Polly for the first time, or are seeking advanced examples and novel approaches provided by our generous community. - [Polly-Contrib](community/polly-contrib.md): Community projects and libraries that extend and enhance Polly's functionality and ecosystem. - [Libraries and contributions](community/libraries-and-contributions.md): Dependencies and contributors that make Polly possible and awesome. -- Microsoft's [eShopOnContainers project](https://github.com/dotnet-architecture/eShopOnContainers): Sample project demonstrating a .NET Microservices architecture and using Polly for resilience. +- Microsoft's [eShopOnContainers project](https://github.com/dotnet-architecture/eShopOnContainers): Sample project demonstrating a .NET Micro-services architecture and using Polly for resilience. You can browse the documentation using the sidebar or visit the [API](api/index.md) section for the reference documentation. diff --git a/docs/migration-v8.md b/docs/migration-v8.md index 43ed6f25131..72a65206080 100644 --- a/docs/migration-v8.md +++ b/docs/migration-v8.md @@ -545,7 +545,7 @@ Migrating is a process similar to the ones described in the previous sections. K `Polly.Context` has been succeeded by `ResilienceContext`. Here are the main changes: -- `ResilienceContext` is pooled for enhanced performance and isn't directly creatable. Instead, use the `ResilienceContextPool` class to get an instance. +- `ResilienceContext` is pooled for enhanced performance and cannot be directly created. Instead, use the `ResilienceContextPool` class to get an instance. - Directly attaching custom data is supported by `Context`, whereas `ResilienceContext` employs the `ResilienceContext.Properties` property. - Both `PolicyKey` and `PolicyWrapKey` are no longer a part of `ResilienceContext`. They've been relocated to `ResiliencePipelineBuilder` and are now used for [telemetry](advanced/telemetry.md#metrics). - The `CorrelationId` property has been removed. For similar functionality, you can either use `System.Diagnostics.Activity.Current.Id` or attach your custom Id using `ResilienceContext.Properties`. diff --git a/docs/strategies/circuit-breaker.md b/docs/strategies/circuit-breaker.md index ceca49497dc..7e31bf926c5 100644 --- a/docs/strategies/circuit-breaker.md +++ b/docs/strategies/circuit-breaker.md @@ -195,7 +195,7 @@ var retry = new ResiliencePipelineBuilder() **Reasoning**: - Both strategies are less coupled in this approach since they rely on the context and the `sleepDurationKey` components. -- The Circuit Breaker shares the `BreakDuration` through the context when it breaks. When it transitions back to Closed, the sharring is revoked. +- The Circuit Breaker shares the `BreakDuration` through the context when it breaks. When it transitions back to Closed, the sharing is revoked. - The Retry strategy fetches the sleep duration dynamically without knowing any specific knowledge about the Circuit Breaker. - If adjustments are needed for the `BreakDuration`, they can be made in one place. @@ -263,7 +263,7 @@ circuitBreaker = new ResiliencePipelineBuilder() ✅ DO -The `CircuitBreakerStartegyOptions` currently do not support defining break durations dynamically. This may be re-evaluted in the future. For now, refer to the first example for a potential workaround. However, please use it with caution. +The `CircuitBreakerStartegyOptions` currently do not support defining break durations dynamically. This may be re-evaluated in the future. For now, refer to the first example for a potential workaround. However, please use it with caution. ### 3 - Wrapping each endpoint with a circuit breaker diff --git a/docs/strategies/retry.md b/docs/strategies/retry.md index d988b9dee7c..ddaa5fabafb 100644 --- a/docs/strategies/retry.md +++ b/docs/strategies/retry.md @@ -192,7 +192,7 @@ var retry = new ResiliencePipelineBuilder() **Reasoning**: -The waiting period can be either blocking or non-blocking, based on the defined strategy/pipeline. Even when used non-blockingly, it unnecessarily consumes memory that can't be reclaimed by the garbage collector. +The waiting period can be either blocking or non-blocking, based on the defined strategy/pipeline. Even when used not used in a blocking manner, it unnecessarily consumes memory that can't be reclaimed by the garbage collector. ✅ DO @@ -479,7 +479,7 @@ var retry = new ResiliencePipelineBuilder() **Reasoning**: -As previously mentioned, always use the designated area to define retry conditions. Reframe your original exit conditions to specify when a retry should be initiated. +As previously mentioned, always use the designated area to define retry conditions. Re-frame your original exit conditions to specify when a retry should be initiated. ### Limiting the maximum delay diff --git a/docs/v7/extensibility.md b/docs/v7/extensibility.md index 7202eaa7a69..146ab7ba75a 100644 --- a/docs/v7/extensibility.md +++ b/docs/v7/extensibility.md @@ -1,6 +1,6 @@ # Custom policies -From Polly v7.0 it is possible to [create your own custom policies](http://www.thepollyproject.org/2019/02/13/introducing-custom-polly-policies-and-polly-contrib-custom-policies-part-i/) outside Polly. These custom policies can integrate in to all the existing goodness from Polly: the `Policy.Handle<>()` syntax; PolicyWrap; all the execution-dispatch overloads. +From Polly v7.0 it is possible to [create your own custom policies](http://www.thepollyproject.org/2019/02/13/introducing-custom-polly-policies-and-polly-contrib-custom-policies-part-i/) outside Polly. These custom policies can integrate in to all the existing goodness from Polly: the `Policy.Handle<>()` syntax; `PolicyWrap`; all the execution-dispatch overloads. For more info see our blog series: diff --git a/src/Polly.Core/Fallback/FallbackStrategyOptions.TResult.cs b/src/Polly.Core/Fallback/FallbackStrategyOptions.TResult.cs index 6a824e65fbc..0db46667c67 100644 --- a/src/Polly.Core/Fallback/FallbackStrategyOptions.TResult.cs +++ b/src/Polly.Core/Fallback/FallbackStrategyOptions.TResult.cs @@ -17,7 +17,7 @@ public class FallbackStrategyOptions : ResilienceStrategyOptions /// Gets or sets a predicate that determines whether the fallback should be executed for a given outcome. /// /// - /// The default value is a predicate that fallbacks on any exception except . This property is required. + /// The default value is a predicate that falls back on any exception except . This property is required. /// [Required] public Func, ValueTask> ShouldHandle { get; set; } = DefaultPredicates, TResult>.HandleOutcome; diff --git a/src/Snippets/README.md b/src/Snippets/README.md index 0e9c79819eb..27458b6cdd3 100644 --- a/src/Snippets/README.md +++ b/src/Snippets/README.md @@ -6,7 +6,7 @@ Various code-snippets used in the Polly documentation. Run the following command dotnet mdsnippets ``` -Visit [SimonCropp/MarkdownSnippets][MarkdownSnippets] for more details. +Visit the [MarkdownSnippets][MarkdownSnippets] GitHub repository for more details. ## How to use snippets in Polly documentation