-
Notifications
You must be signed in to change notification settings - Fork 76
Fix/execute with retry wrapper exec #479
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
Conversation
…execute-with-retry-wrapper-exec
packages/misc/src/lib/misc.ts
Outdated
import Ajv, { JSONSchemaType } from 'ajv'; | ||
//@ts-ignore no tyoe df | ||
import fetchRetry from 'fetch-retry'; |
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.
Hmm I'm worried how browser (react, vite, parcel, etc.) would react to this dependency, I'll give it a spin next week
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.
its bundle is 'umd' format and does not attempt to redefine 'fetch' globally. I think it's okay but I'll publish a testing build with it for us to test with more before committing to it.
…execute-with-retry-wrapper-exec
…ry-fetch` has its own unit and integration tests
ad190c1
to
c6a3768
Compare
…-nodejs`. Fix return type on `sendRequest`; it doesn't return a Response. Throw in promise chain instead of creating extra rejected promises
c6a3768
to
f168848
Compare
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.
Looks good. Left one comment. Have we done a browser test? once we do then I think we are good to merge it.
// error: Error | null, | ||
// response: Response | null | ||
) { | ||
return Math.random() * (Math.pow(2, attempt) * interval); |
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.
Is this truly exponential? since we are multiplying by a random value couldn't we end up with a lower interval?
…Protocol/js-sdk into fix/execute-with-retry-wrapper-exec
Closing for #497 |
Description
Removes
executeWithRetry
as we no longer need to retry operations due to network stability fixes. We now will only retry operations which are critical to the standup of the sdk. The included node endpoints which are eligible for retry at this time are:/handshake
Status codes we will retry on:
Introduces a new package fetch-retry which now handles retry logic for single requests. As we no longer need to group requests and retry as single network operation.
Type of change
How Has This Been Tested?
Tested with local testing to force endpoint failure to observe retry.
Checklist: