-
Notifications
You must be signed in to change notification settings - Fork 1
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
DCMAW-10829: Enhances http request retry strategy #344
base: main
Are you sure you want to change the base?
Conversation
7a11773
to
cb1e74c
Compare
Quality Gate failedFailed conditions |
const exponentialDelayWithoutJitter = | ||
Math.pow(2, attempt - 1) * baseDelayMillis; | ||
const exponentialDelayWithFullJitter = Math.floor( | ||
Math.random() * exponentialDelayWithoutJitter, |
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.
Security hotspot using this 'weak' cryptographic function.
"Make sure that using this pseudorandom number generator is safe here."
Lifted from STS backend so assume this is fine, we're just using it to calc a httpRequest delay, nothing sensitive.
DCMAW-10829
What changed
cb1e74c2c47ae5847b9ca6db848c01bebd040a33
Why did it change
Exponential backoff is the preferred strategy when retrying httpRequests
Sonar security hotspot
Link to hotspot
I have commented on the relevant line of code this is regarding. This was lifted directly from STS's backend so I assume it's okay but will ask a for a review
Evidence
Deployed stack and ran
api
tests - all passingChecklists