-
Notifications
You must be signed in to change notification settings - Fork 463
chore(ci_visibility): retry Test Optimization API calls on server errors #14950
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
base: main
Are you sure you want to change the base?
chore(ci_visibility): retry Test Optimization API calls on server errors #14950
Conversation
|
Bootstrap import analysisComparison of import times between this PR and base. SummaryThe average import time from this PR is: 221 ± 4 ms. The average import time from base is: 221 ± 2 ms. The import time difference between this PR and base is: 0.1 ± 0.1 ms. The difference is not statistically significant (z = 0.84). Import time breakdownThe following import paths have shrunk:
|
…raujo/SDTEST-2814/retry-civis-api-errors
_get_setting_api_response(status_code=500), | ||
_get_setting_api_response(status_code=500), | ||
_get_setting_api_response(status_code=500), | ||
_get_setting_api_response(status_code=500), | ||
_get_setting_api_response(status_code=500), |
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.
nit: since the code allows for >500, why not add 504 or other status codes here?
Description
Currently, if a request to the Test Optimization settings API fails with a 500 or other server error, we do not try again, and run the test session with Test Optimization features disabled. This PR adds retries to the Test Optimization API requests, for server errors (status >= 500; it does not make sense to retry 4xx errors as they are unlikely to succeed if called again with the same parameters) and network errors (such as timeout).
Testing
Unit tests added.
Risks
None.
Additional Notes
None.