Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 8.0.0-alpha.7

* Introduce ResilienceStrategyBuilder.Validator by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1412
* Update docs by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1413
* Annotate the library with trimming attributes by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1414
* Update trimming justifications by [@martincostello](https://github.com/martincostello) in https://github.com/App-vNext/Polly/pull/1415
* Fix condition by [@martincostello](https://github.com/martincostello) in https://github.com/App-vNext/Polly/pull/1416
* API Review Feedback (1) by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1420
* Introduce ResilienceContextPool (ApiReview) by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1421
* Convert records to classes by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1422
* Rename ExecuteCoreAsync to ExecuteCore by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1424
* Benchmark for strategy creation by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1426
* Fix README.md example syntax errors by [@Sensational-Code](https://github.com/Sensational-Code) in https://github.com/App-vNext/Polly/pull/1427
* Improve usability of ResilienceStrategy<T> by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1428
* Cleanup OutcomeResilienceStrategy by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1430
* Drop the ResilienceStrategyBuilder.IsGenericBuilder property by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1431
* Allow isolate CircuitBreakerManualControl using constructor by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1432

## 8.0.0-alpha.6

* Update docs by [@martincostello](https://github.com/martincostello) in https://github.com/App-vNext/Polly/pull/1382
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<MicrosoftExtensionsVersion>7.0.0</MicrosoftExtensionsVersion>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<PollyVersion>8.0.0-alpha.6</PollyVersion>
<PollyVersion>8.0.0-alpha.7</PollyVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="coverlet.msbuild" Version="6.0.0" />
Expand Down
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
> Major performance improvements are on the way! Please see our [blog post](https://www.thepollyproject.org/2023/03/03/we-want-your-feedback-introducing-polly-v8/) to learn more and provide feedback in the [related GitHub issue](https://github.com/App-vNext/Polly/issues/1048).
>
> :rotating_light::rotating_light: **Polly v8 feature-complete!** :rotating_light::rotating_light:
> - Polly v8 Alpha 6 is now available on [NuGet.org](https://www.nuget.org/packages/Polly/8.0.0-alpha.6)
> - The Alpha 6 version is considered feature-complete. After an internal review of the API to address unresolved issues, we will move on to a Beta release.
> - Polly v8 Alpha 7 is now available on [NuGet.org](https://www.nuget.org/packages/Polly/8.0.0-alpha.7)
> - The Alpha 7 version is considered feature-complete. After completing [review of the API](https://github.com/App-vNext/Polly/pull/1233) to address unresolved issues, we will move on to a Beta release.
> - The v8 docs are not yet finished, but you can take a look at sample code in these locations:
> - Within the repo's new [Samples folder](https://github.com/App-vNext/Polly/tree/main/samples)
> - By reading `Polly.Core`'s [README](https://github.com/App-vNext/Polly/blob/main/src/Polly.Core/README.md)
Expand All @@ -24,16 +24,35 @@ We are a member of the [.NET Foundation](https://www.dotnetfoundation.org/about)

**Keep up to date with new feature announcements, tips & tricks, and other news through [www.thepollyproject.org](https://www.thepollyproject.org)**

[![NuGet version](https://buildstats.info/nuget/Polly?includePreReleases=false)](https://www.nuget.org/packages/Polly/) [![Build status](https://github.com/App-vNext/Polly/workflows/build/badge.svg?branch=main&event=push)](https://github.com/App-vNext/Polly/actions?query=workflow%3Abuild+branch%3Amain+event%3Apush) [![Code coverage](https://codecov.io/gh/App-vNext/Polly/branch/main/graph/badge.svg)](https://codecov.io/gh/App-vNext/Polly) [![Slack Status](http://www.pollytalk.org/badge.svg)](http://www.pollytalk.org)
[![Build status](https://github.com/App-vNext/Polly/workflows/build/badge.svg?branch=main&event=push)](https://github.com/App-vNext/Polly/actions?query=workflow%3Abuild+branch%3Amain+event%3Apush) [![Code coverage](https://codecov.io/gh/App-vNext/Polly/branch/main/graph/badge.svg)](https://codecov.io/gh/App-vNext/Polly) [![Slack Status](http://www.pollytalk.org/badge.svg)](http://www.pollytalk.org)

![Polly logo](https://raw.github.com/App-vNext/Polly/main/Polly-Logo.png)

## NuGet Packages

### Polly v7

[![NuGet vesion](https://buildstats.info/nuget/Polly?includePreReleases=false)](https://www.nuget.org/packages/Polly/)

### Polly v8 Pre-releases

| **Package** | **Latest Version** |
|:--|:--|
| Polly | [![NuGet](https://buildstats.info/nuget/Polly?includePreReleases=true)](https://www.nuget.org/packages/Polly/ "Download Polly from NuGet.org") |
| Polly.Core | [![NuGet](https://buildstats.info/nuget/Polly.Core?includePreReleases=true)](https://www.nuget.org/packages/Polly.Core/ "Download Polly.Core from NuGet.org") |
| Polly.Extensions | [![NuGet](https://buildstats.info/nuget/Polly.Extensions?includePreReleases=true)](https://www.nuget.org/packages/Polly.Extensions/ "Download Polly.Extensions from NuGet.org") |
| Polly.RateLimiting | [![NuGet](https://buildstats.info/nuget/Polly.RateLimiting?includePreReleases=true)](https://www.nuget.org/packages/Polly.RateLimiting/ "Download Polly.RateLimiting from NuGet.org") |
| Polly.Testing | [![NuGet](https://buildstats.info/nuget/Polly.Testing?includePreReleases=true)](https://www.nuget.org/packages/Polly.Testing/ "Download Polly.Testing from NuGet.org") |

---

<!-- This TOC can be maintained using VS Code's 'Markdown All in One' extension -->
<!-- Just set the Toc: Levels setting to '2..4', open the command palette, -->
<!-- and run 'Markdown All in One: Update Table of Contents' -->
- [Polly](#polly)
- [NuGet Packages](#nuget-packages)
- [Polly v7](#polly-v7)
- [Polly v8 Pre-releases](#polly-v8-pre-releases)
- [Get Started](#get-started)
- [Installing via the .NET SDK](#installing-via-the-net-sdk)
- [Supported targets](#supported-targets)
Expand Down
14 changes: 8 additions & 6 deletions samples/Extensibility/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@

internal class MySimpleStrategy : ResilienceStrategy
{
protected override ValueTask<Outcome<TResult>> ExecuteCoreAsync<TResult, TState>(Func<ResilienceContext, TState, ValueTask<Outcome<TResult>>> callback, ResilienceContext context, TState state)
protected override ValueTask<Outcome<TResult>> ExecuteCore<TResult, TState>(
Func<ResilienceContext, TState, ValueTask<Outcome<TResult>>> callback,
ResilienceContext context,
TState state)
{
Console.WriteLine("MySimpleStrategy executing!");

Expand Down Expand Up @@ -64,8 +67,6 @@ protected override ValueTask<Outcome<TResult>> ExecuteCoreAsync<TResult, TState>
// 1.B Define the options.
public class MyResilienceStrategyOptions : ResilienceStrategyOptions
{
public override string StrategyType => "MyCustomStrategy";

// Use the arguments in the delegates.
// The recommendation is to use asynchronous delegates.
public Func<OnCustomEventArguments, ValueTask>? OnCustomEvent { get; set; }
Expand All @@ -87,7 +88,10 @@ public MyResilienceStrategy(ResilienceStrategyTelemetry telemetry, MyResilienceS
this.onCustomEvent = options.OnCustomEvent;
}

protected override async ValueTask<Outcome<TResult>> ExecuteCoreAsync<TResult, TState>(Func<ResilienceContext, TState, ValueTask<Outcome<TResult>>> callback, ResilienceContext context, TState state)
protected override async ValueTask<Outcome<TResult>> ExecuteCore<TResult, TState>(
Func<ResilienceContext, TState, ValueTask<Outcome<TResult>>> callback,
ResilienceContext context,
TState state)
{
// Here, do something before callback execution
// ...
Expand Down Expand Up @@ -129,5 +133,3 @@ public static TBuilder AddMyResilienceStrategy<TBuilder>(this TBuilder builder,
// Pass the options, note that the options instance is automatically validated by the builder
options);
}