Page MenuHomePhabricator

[desktop] Continue checking for updates even after an exception
AbandonedPublic

Authored by michal on Feb 10 2023, 1:58 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 12:54 PM
Unknown Object (File)
Nov 20 2024, 6:12 PM
Unknown Object (File)
Nov 20 2024, 6:12 PM
Unknown Object (File)
Nov 20 2024, 6:12 PM
Unknown Object (File)
Nov 20 2024, 6:10 PM
Unknown Object (File)
Oct 22 2024, 12:32 PM
Unknown Object (File)
Oct 22 2024, 12:32 PM
Unknown Object (File)
Oct 22 2024, 3:14 AM
Subscribers

Details

Summary

ENG-2923
If checkForUpdates fails because of lack of the internet connection update-not-available won't run and the timer for checking updated won't be restarted. After this diff check for updates will be done continuously and only stopped between update-available and update-downloaded events (so the update won't downloaded multiple times).

Test Plan

Add some logging and check that checkForUpdates is called correctly, even in case of no network connection. Try updating to a new version.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 10 2023, 7:14 AM
Harbormaster failed remote builds in B16322: Diff 22324!
tomek requested changes to this revision.Feb 15 2023, 2:21 AM

How about the case where we detect that an update is available, we stop an interval and then downloading the update fails?

desktop/src/auto-update.js
14

Is it beneficial to introduce a new term schedule? Maybe we can use interval?

20

I'm not sure if I suggested something similar previously, but () => f() could be replaced by just f

This revision now requires changes to proceed.Feb 15 2023, 2:21 AM
desktop/src/auto-update.js
20

Note that this only works if autoUpdater.checkForUpdates is defined as an arrow function instead of a standard class function... otherwise this will be dropped unless you use bind