-
Notifications
You must be signed in to change notification settings - Fork 4
Add optional maintenance mode retry handler for short downtimes #510
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 optional maintenance mode retry handler for short downtimes #510
Conversation
|
Maintenance windows are often more than 12 seconds, you would be very lucky to hit the end of a maintenance during a retry. 🤔 |
Yeah, guess it could be a bit longer. The goal is to bridge the time for short maintenance outages, e.g. when an admin updates an app. If the instance goes down for longer maintenance it will require different handling. So what could be a good grace period? Wait 1m? If it's too long the user might assume that the app crashed. |
There must be some way (events ?) to help the UI tell the user something like « Server currently unavailable, retrying… (1/X) » |
|
Fair enough but that has no place in the HTTP lib. You would need to debounce and combine the UI notifications because there could be many concurrent requests that run into a retry mode. |
|
Added exponential retry delays and updated the documentation to make the goal of this change more clear. |
This comment was marked as resolved.
This comment was marked as resolved.
|
The type definitions of request must be created to include this new value. |
Done :) |
How can I achieve this? |
It should be possible, but not anymore. I've tried it locally, but the actual axios type definition do not work to customize the config anymore. axios/axios#3672 I've found a package who create a whole new one instance of axios to resolve it. |
|
Regarding typing we are only going to have issues for projects that use typescript, right? The apps I want to make use of this use javascript, so it won't be an issue. It is not ideal if ts will complain about the extraneous property on the config objects but as long as this feature is opt-in I would not see it as big issue. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
c484553 to
94559f6
Compare
|
|
|
Could you file a ticket please @danxuliu? I assume there is no request if the abortion happens before any XHR connection is established |
For nextcloud/mail#5714.
See the readme changes for a description.
This is a bit of an experiment, so I'm making this optional for now. If we find out that this is the way to go by default we can make it default enabled in a major version bump.
Babel-jest added to test the new module.
This only works with nextcloud/server#33173, so Nextcloud 25.