-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add retries to the fetching of jobs data #1909
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
…c/vip-cli into fix/creating-backup-copy-error
Quality Gate passedIssues Measures |
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.
👍
@@ -0,0 +1,211 @@ | |||
// copied over from our internal lib |
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.
This all looks pretty neat. I wonder if we should GPL it as a separate package 🤔
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.
Fun to think about! It's MIT now 😅 , but copyright is ours indeed if we plan to change the license. I honestly don't see much of a benefit of whichever license - it's a pretty common tool.
Description
We've received a few errors on this endpoint that can be mitigated by simply fetching the data again by retrying. The error is intermittent, and is likely because the endpoint returned a 500 - hence no longer a JSON and we could ignore it.
This PR adds retrying to the job fetch API safely - by limiting the retries only to this specific error. This is so that we don't accidentally retry on other errors such as rate limiting, or valid errors like permission errors!
Pull request checklist
New release checklist
Steps to Test
The unit tests should be fine - changes are pretty minor.