-
Notifications
You must be signed in to change notification settings - Fork 888
Add retry to frontend API calls #912
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
Comments
We should carefully consider this one. We have a major customer that has been complaining about 5xx spam in their logs. Perhaps we make sure we're using exp backoff for all FE retries. |
I think there's a subset of cases we must have retries for initial release, e.g. build status, which is what I assume the |
I prefer to make retries explicit when possible, and am actively keeping this in mind. These thoughts motivated my comments here: I've added an explicit retry in other work in this codebase, for example see here: and in particular the storybook from that PR here: In #1701 you can see that we need to initially fetch a workspace. If we fail that initial fetch (required to present the form), we are in the error state which will only respond to events asking to refetch the workspace. The user creates those events by clicking a retry button. I think this (or similar) is the pattern we should lean on. |
Could these implementations be unified by waiting until some event happens? Then we wait for a user triggered event when we want the user to click a retry button and some timer event or something when we want to do background retries. |
Absolutely! This is already the case based off of the xstate solution described above: some piece of code sends the model an event, and the model refetches in response to that event. If we want the event to be raised from the background, rather than user action, we could have some process that does something like:
The user action case just looks like
If we want the model to be responsible for computing backoff, that can also be plugged into the model. I'm not sure how the background looks in that case, maybe something like
Either/or can be designed. |
There are cases where we see a failure when fetching the footer.
The text was updated successfully, but these errors were encountered: