-
Notifications
You must be signed in to change notification settings - Fork 7
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: add retry functionality to the splunk_rest_client #392
Conversation
🎉 This PR is included in version 5.2.0-beta.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 5.3.0-beta.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 5.3.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
retries = Retry( | ||
total=MAX_REQUEST_RETRIES, | ||
backoff_factor=0.3, | ||
status_forcelist=[500, 502, 503, 504], | ||
allowed_methods=["GET", "POST", "PUT", "DELETE"], | ||
raise_on_status=False, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should get config from context and fill with defaults when not present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, that's the plan. We're going to refactor this code soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkvashninsplunk this was done as a temporary solution to unblock other team
we want to get rid of requests
library at all for solnlib
and splunktaucclib
so this code might potentially be deleted once we have a solution
Issue number:ADDON-75327
Summary
Added functionality to retries requests.
Changes
Added "max_retries" to the "HTTPAdapter" and set it to 5.
User experience
No impact / potential reliability improvement
Checklist
If your change doesn't seem to apply, please leave them unchecked.