Skip to content
This repository has been archived by the owner on Nov 17, 2018. It is now read-only.

Upgrade Polly dependency to Polly v5.9.0 #92

Closed
reisenberger opened this issue Apr 10, 2018 · 6 comments
Closed

Upgrade Polly dependency to Polly v5.9.0 #92

reisenberger opened this issue Apr 10, 2018 · 6 comments

Comments

@reisenberger
Copy link
Contributor

Polly v5.9.0 is published. PR will follow to update HttpClientFactory to reference Polly v5.9.0.

TL;DR Polly v5.9.0 includes some deprecations of APIs we will rationalise/rename in Polly v6.0. None of these changes affect HttpClientFactory at 2.1, but adopting Polly v5.9.0 in HttpClientFactory now, before ASP.NET Core 2.1 RTM, avoids any delta in the wider Polly experience for HttpClientFactory users between ASP.NET Core 2.1 and v-next.

Per semver and ASP.NET Engineering Guidelines, Polly v5.9.0 adds the replacement APIs (where relevant) and uses [Obsolete("with an explanation here of the alternative API to be used, where relevant")] to deprecate the APIs which will be removed at Polly v6.0.


Principal changes with relevance to HttpClientFactory

Polly v5.8.0 -> v5.9.0:

[1] rationalises Execute/Async(,...) overloads by deprecating legacy/little-used and anomalous overloads.

  • No impact for HttpClientFactory or consumers of HttpClientFactory as PolicyHttpMessageHandler abstracts away the policy.ExecuteAsync(...) call in any case.

[2] clarifies naming of Polly telemetry properties in preparation for richer telemetry/logging from Polly executions.

  • No impact for HttpClientFactory as consumption of these properties for logging is not part of ASP.NET Core 2.1 release.

[3] improves syntax for the edge case where users configure a non-generic Policy such as Policy.TimeoutAsync(10); but wish to use it with HttpClientFactory; for HttpClientFactory the decision was to accept generic IAsyncPolicy<HttpResponseMessage> only.


Should further detail be required, every change in Polly v5.9.0 is milestone-tagged here and here.

@reisenberger
Copy link
Contributor Author

@rynowak @glennc /cc @joelhulen

We have rarely made breaking changes in Polly. We are taking the opportunity of a v6.0 to rationalise and clarify two sections of the API. Getting these changes into HttpClientFactory now avoids delta in experience for users after ASP.NET Core 2.1.

@rynowak
Copy link
Member

rynowak commented Apr 10, 2018

@Eilon - can you please do the OSS homework for this?

@Eilon
Copy link
Member

Eilon commented Apr 10, 2018

@rynowak : done: #93 (review)

@rynowak
Copy link
Member

rynowak commented Apr 10, 2018

I've merged #93 - is there any other action we need to take? It wasn't clear if point 3 was addressed yet

@reisenberger
Copy link
Contributor Author

Thanks @rynowak @Eilon (aiming to keep to Engineering Guidelines to keep this all smooth)

@rynowak Yes, the change for [3] was in the PR you merged; change can be seen in dev branch now here. No further action arising from this issue #92

@rynowak
Copy link
Member

rynowak commented Apr 10, 2018

Great, closing this out then. Thanks again for the help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants