-
Notifications
You must be signed in to change notification settings - Fork 779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update AddTransientHttpErrorPolicy once Polly v7 is released #1058
Comments
No changes to
That does not hold for Polly v7. Polly v7 clears up the weak sync/async split in Polly (inherited from previous maintainers but now being removed). For clarity again: No changes to The only relevant change that could be made on the Microsoft side would be (if desired, at a future release) to change the minimum supported version of Polly, in HttpClientFactory, to Polly v7.0.0. This would prevent users configuring eg The only other breaking change in Polly v7.0.0 is changes to cache provider interfaces. For cache providers which the Polly team maintains (Polly.Caching.Memory, Polly.Caching.Distributed and Polly.Caching.Serialization.Json), we will simultaneously release upgraded cache providers. Thus, if Microsoft chooses to update HttpClientFactory in a future release to specify Polly v7.0.0 as the minimum-supported version, the only users forced to adjust their code for a breaking change would be any that had implemented their own custom cache providers for Polly CachePolicy. Thanks @johnknoop for raising this 👍 ; a good prompt to document here how HttpClientFactory could be updated for Polly v7. |
Thanks @reisenberger I appreciate all the context. I've fallen out of touch with your v7 work. Do you know when you plan to ship it? |
Thanks for the clarification |
@glennc We are planning to ship Polly v7 in the next fortnight: I will advise when it ships. Polly v7 is both a maintenance update:
And major new features:
Thanks! /cc @joelhulen |
@glennc Polly v7 is shipped. If you wish to upgrade HttpClientFactory for .NET Core 3.0 to reference Polly v7, we recommend that HttpClientFactory reference Polly As described in more detail above: Advantages: Improved async syntax enforcement. Let me know if you want to proceed. HttpClientFactory also references to Polly.Extensions.Http, so if we go ahead, the sequence would be:
Thanks /cc @joelhulen |
I'll catch up with @glennc and discuss with him. I can't think of a reason why we wouldn't do this. We want users to get the best version of things. |
Pinging an update: Note that we are planning to publish a Polly v7.1.0 (intended by end of week) which would be the version to reference, if we go for this. Will update, soon as that ships. |
Great! |
Any plans to upgrade HttpClientFactory v2.x to Polly 7? |
Yes, we're currently planning that as part of 3.0 |
@rynowak apologies for the confusion. I understand that |
No, we don't change dependency versions in a patch release. |
Got it. Thanks for the clarification. |
@rynowak @glennc Polly v7.1.0 is now on nuget. Here the procedure to update inter-related components all to reference Polly v7.1.0. Please let me know when you want me to enact this? Thanks! |
@reisenberger we are ready to do this whenever. Ideally we could get it done in the next two weeks for the next preview release. |
@rynowak Thanks! I am in a conference all week but should get to this at the weekend. |
great! |
Here's a draft PR. #1313 I don't expect it to pass now since we're waiting for the new package. |
This is done! |
I'm not sure if you are already aware of this, but Polly v7 will distinguish between
RetryPolicy
andAsyncRetryPolicy
. Since all methods on theHttpClient
are async, it would make sense ifAddTransientHttpErrorPolicy
only acceptedAsyncPolicy
(note: notIAsyncPolicy
since the sync version of RetryPolicy also implements that interface for some weird reason).https://github.com/App-vNext/Polly/wiki/Polly-v7-breaking-changes
The text was updated successfully, but these errors were encountered: