diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8550acc6932..4f11dbaab6e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+## 8.0.0-beta.1
+
+* Updates for alpha.9 by [@martincostello](https://github.com/martincostello) in https://github.com/App-vNext/Polly/pull/1526
+* Finalize the API review by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1528
+* Disposing pipeline should not dispose external inner pipeline by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1529
+* Clean duplications around disposing the pipelines by [@martintmk](https://github.com/martintmk) in https://github.com/App-vNext/Polly/pull/1530
+
## 8.0.0-alpha.9
* Updates for alpha.8 by [@martincostello](https://github.com/martincostello) in https://github.com/App-vNext/Polly/pull/1465
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 972fb254aa8..f86b103c13e 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -2,7 +2,7 @@
7.0.0
true
- 8.0.0-alpha.9
+ 8.0.0-beta.1
diff --git a/README.md b/README.md
index e59e6f9d570..5c27e7b9ec8 100644
--- a/README.md
+++ b/README.md
@@ -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 9 is now available on [NuGet.org](https://www.nuget.org/packages/Polly/8.0.0-alpha.9)
-> - The Alpha 9 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.
+> - Polly v8 Beta 1 is now available on [NuGet.org](https://www.nuget.org/packages/Polly/8.0.0-beta.1)
+> - The Beta 1 version is considered feature-complete and the public API surface is stable.
> - 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)
diff --git a/samples/GenericStrategies/Program.cs b/samples/GenericStrategies/Program.cs
index 1c35402b9a8..b5c12b61a3d 100644
--- a/samples/GenericStrategies/Program.cs
+++ b/samples/GenericStrategies/Program.cs
@@ -17,15 +17,15 @@
FallbackAction = _ =>
{
// Return fallback result
- return Outcome.FromResultAsTask(new HttpResponseMessage(HttpStatusCode.OK));
+ return Outcome.FromResultAsValueTask(new HttpResponseMessage(HttpStatusCode.OK));
},
// You can also use switch expressions for succinct syntax
ShouldHandle = arguments => arguments.Outcome switch
{
// The "PredicateResult.True" is shorthand to "new ValueTask(true)"
- { Exception: HttpRequestException } => PredicateResult.True,
- { Result: HttpResponseMessage response } when response.StatusCode == HttpStatusCode.InternalServerError => PredicateResult.True,
- _ => PredicateResult.False
+ { Exception: HttpRequestException } => PredicateResult.True(),
+ { Result: HttpResponseMessage response } when response.StatusCode == HttpStatusCode.InternalServerError => PredicateResult.True(),
+ _ => PredicateResult.False()
},
OnFallback = _ =>
{
diff --git a/samples/Intro/Program.cs b/samples/Intro/Program.cs
index 889caa3cb76..f86536891ae 100644
--- a/samples/Intro/Program.cs
+++ b/samples/Intro/Program.cs
@@ -44,11 +44,11 @@
// To configure the predicate you can use switch expressions
ShouldHandle = args => args.Outcome.Exception switch
{
- TimeoutRejectedException => PredicateResult.True,
+ TimeoutRejectedException => PredicateResult.True(),
// The "PredicateResult.False" is just shorthand for "new ValueTask(true)"
// You can also use "new PredicateBuilder().Handle()"
- _ => PredicateResult.False
+ _ => PredicateResult.False()
},
// Register user callback called whenever retry occurs
OnRetry = args =>
diff --git a/samples/Retries/Program.cs b/samples/Retries/Program.cs
index 2585456b97d..245336fe916 100644
--- a/samples/Retries/Program.cs
+++ b/samples/Retries/Program.cs
@@ -49,8 +49,8 @@
// Specify what exceptions should be retried using switch expressions
ShouldHandle = args => args.Outcome.Exception switch
{
- InvalidOperationException => PredicateResult.True,
- _ => PredicateResult.False,
+ InvalidOperationException => PredicateResult.True(),
+ _ => PredicateResult.False(),
},
OnRetry = outcome =>
{
@@ -82,11 +82,11 @@
arguments.Outcome.Result.Headers.TryGetValues("Retry-After", out var value))
{
// Return delay based on header
- return new ValueTask(TimeSpan.FromSeconds(int.Parse(value.Single())));
+ return new ValueTask(TimeSpan.FromSeconds(int.Parse(value.Single())));
}
// Return delay hinted by the retry strategy
- return new ValueTask(arguments.DelayHint);
+ return new ValueTask(default(TimeSpan?));
}
})
.Build();