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

feat: implement retry policy #430

Merged
merged 3 commits into from
Aug 6, 2024
Merged

feat: implement retry policy #430

merged 3 commits into from
Aug 6, 2024

Conversation

jooola
Copy link
Member

@jooola jooola commented Jul 30, 2024

Implement a retry handler to retry requests based on an internal retry policy.

The retry policy will evolve over time to cover more use cases, but for now we want to start simple, and maybe someday allow users to tweak the retry policy.

Related to hetznercloud/hcloud-go#470

BEGIN_COMMIT_OVERRIDE
feat: retry requests when the api gateway errors (#430)
feat: retry requests when the network timed outs (#430)
feat: retry requests when the rate limit was reached (#430)
feat: retry requests when the api returns a conflict error (#430)
END_COMMIT_OVERRIDE

Copy link

codecov bot commented Jul 30, 2024

Codecov Report

Attention: Patch coverage is 77.41935% with 7 lines in your changes missing coverage. Please review.

Project coverage is 92.85%. Comparing base (a73050b) to head (78a242e).
Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
hcloud/_client.py 77.41% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #430      +/-   ##
==========================================
- Coverage   93.10%   92.85%   -0.26%     
==========================================
  Files          64       64              
  Lines        2960     2981      +21     
==========================================
+ Hits         2756     2768      +12     
- Misses        204      213       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jooola jooola marked this pull request as ready for review July 31, 2024 08:21
@jooola jooola requested a review from apricote August 5, 2024 13:46
@jooola
Copy link
Member Author

jooola commented Aug 6, 2024

image

hcloud/_client.py Outdated Show resolved Hide resolved
Co-authored-by: Julian Tölle <[email protected]>
@jooola jooola merged commit f63ac8b into main Aug 6, 2024
10 checks passed
@jooola jooola deleted the retry_policy branch August 6, 2024 12:27
jooola pushed a commit that referenced this pull request Aug 6, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.2.0](v2.1.1...v2.2.0)
(2024-08-06)


### Features

* retry requests when the api gateway errors
([#430](#430))
([f63ac8b](f63ac8b))
* retry requests when the api returns a conflict error
([#430](#430))
([f63ac8b](f63ac8b))
* retry requests when the network timed outs
([#430](#430))
([f63ac8b](f63ac8b))
* retry requests when the rate limit was reached
([#430](#430))
([f63ac8b](f63ac8b))


### Bug Fixes

* update network subnet types
([#431](#431))
([c32a615](c32a615))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants