Skip to content
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

Polly.Extensions.Http deprecated in favour of Microsoft.Extensions.Http.Resilience #398

Closed
dammitjanet opened this issue Jun 18, 2024 · 3 comments · Fixed by #400
Closed
Assignees
Labels
enhancement New feature, bug fix, or request

Comments

@dammitjanet
Copy link

Is your feature request related to a problem? Please describe.

Generating refitter with ' "usePolly": true,' results in the use of the deprecated package Polly.Extensions.Http

Describe the solution you'd like
Update refitter to use Microsoft.Extensions.Http.Resilience and generate compatible code

Describe alternatives you've considered
n/a

Additional context
n/a

@dammitjanet dammitjanet added the enhancement New feature, bug fix, or request label Jun 18, 2024
@christianhelle
Copy link
Owner

@dammitjanet thanks for taking the time to bring this up

Would you happen to know if the usage differs? I mean, can the generated Polly.Extensions.Http usage work on Microsoft.Extensions.Http.Resilience ?

Maybe we should also rename the option usePolly to httpResilience, or handleTransientErrors, or somethingElse

@dammitjanet
Copy link
Author

dammitjanet commented Jun 18, 2024

@christianhelle

Would you happen to know if the usage differs? I mean, can the generated Polly.Extensions.Http work on Microsoft.Extensions.Http.Resilience ?

No it's not, and the dependencies are obscure and obtuse. I spent about an hour trying to work out the dependencies, and couldn't find any kind of guide to assist in the migration and then decided spending a day updating my code form the API spec manually was the better way to spend my time

Maybe we should also rename the option usePolly to httpResilience, or handleTransientErrors, or somethingElse

if you can work it out, then i'd think perhaps deprecating usePolly to handleTransientErrors with acceptable values of

  • None
  • Polly
  • HttpResilience

@christianhelle
Copy link
Owner

No it's not, and the dependencies are obscure and obtuse. I spent about an hour trying to work out the dependencies, and couldn't find any kind of guide to assist in the migration and then decided spending a day updating my code form the API spec manually was the better way to spend my time

I stumbled upon https://github.com/dotnet/extensions/tree/main/src/Libraries/Microsoft.Extensions.Http.Resilience and it somewhat smells like Polly. I'll give it a shot tonight

if you can work it out, then i'd think perhaps deprecating usePolly to handleTransientErrors with acceptable values of

  • None
  • Polly
  • HttpResilience

I like it. I'll go with that

Thanks for the suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, bug fix, or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants