Skip to content
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

Check for updates on an interval, add "Later" button back #110

Merged
merged 10 commits into from
Aug 22, 2023

Conversation

sergeichestakov
Copy link
Contributor

@sergeichestakov sergeichestakov commented Aug 17, 2023

Why

We want to check for updates on an interval (up til a certain point) instead of just once at startup in case users have the app open for a long time. Also, we should add the "Later" button back in case users want to defer updates. I only removed it a while back to make sure beta users were consistently updating their stale clients ASAP given how often we were making breaking changes but post-beta we don't want to force people to update every time since it can be disruptive.

Fixes WS-801 and WS-802

What changed

Check for updates on an interval, add "Later" button back

Test plan

Should see auto-update prompt a while after opening. should see "Later" button in resulting dialog

@sergeichestakov sergeichestakov self-assigned this Aug 17, 2023
Copy link
Member

@szymonkaliski szymonkaliski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but I'm curious about the logic of having 10 tries only.
If you keep the app open for 5 hours, we stop checking for updates -- but on macOS for example its normal to keep apps running in the dock, for example I think my chrome has been "on" for over a week now; should we maybe just keep the check interval infinite, and check every hour or something?

@sergeichestakov
Copy link
Contributor Author

yeah I actually wasn't sure what the best way to do this was. we can keep checking forever but at some point I don't want to keep making requests while the app is open. maybe can do an exponential backoff or something

@sergeichestakov
Copy link
Contributor Author

gonna go with exponential backoff from 30mins with a limit of 24 hrs (so 1/2, 1, 2, 4, 8, 16, 24, 24, 24 hrs...) instead. think that makes more sense and handles the case where the app is open forever since we just check once per day

@sergeichestakov sergeichestakov merged commit ce36c0e into main Aug 22, 2023
@sergeichestakov sergeichestakov deleted the @sergeichestakov/check-for-updates-improvements branch August 22, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants