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

Fix auto updater #2875

Merged
merged 1 commit into from
Aug 19, 2019
Merged

Fix auto updater #2875

merged 1 commit into from
Aug 19, 2019

Conversation

thundron
Copy link
Contributor

@thundron thundron commented Aug 2, 2019

No description provided.

@thundron thundron self-assigned this Aug 2, 2019
@thundron thundron force-pushed the fix-auto-updater branch 2 times, most recently from 5703a29 to 155fb8f Compare August 2, 2019 15:00
lib/gui/etcher.js Outdated Show resolved Hide resolved
@thundron thundron force-pushed the fix-auto-updater branch 2 times, most recently from 82746b1 to e549efb Compare August 6, 2019 12:47
@thundron thundron marked this pull request as ready for review August 6, 2019 12:55
@thundron thundron requested review from jviotti and zvin as code owners August 6, 2019 12:56
lib/gui/etcher.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
lib/gui/etcher.js Outdated Show resolved Hide resolved
@lurch
Copy link
Contributor

lurch commented Aug 6, 2019

Is the info at https://github.com/balena-io/etcher/blob/master/docs/USER-DOCUMENTATION.md#simulate-an-update-alert now out of date?

@thundron thundron force-pushed the fix-auto-updater branch 2 times, most recently from a84fa5d to a1c2b7b Compare August 6, 2019 15:10
@thundron thundron requested a review from zvin August 6, 2019 15:10
lib/gui/etcher.js Outdated Show resolved Hide resolved
lib/gui/etcher.js Outdated Show resolved Hide resolved
@thundron thundron requested a review from zvin August 6, 2019 18:05
lib/gui/etcher.js Outdated Show resolved Hide resolved
lib/gui/etcher.js Outdated Show resolved Hide resolved
try {
const release = await autoUpdater.checkForUpdates()
const isOutdated = semver.compare(release.updateInfo.version, version) > 0
const shouldUpdate = parseInt(release.updateInfo.stagingPercentage, 10) > 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure this is necessary? Nothing I can find at https://www.electron.build/auto-update#staged-rollouts suggests you manually need to check the stagingPercentage value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lurch It's because we manually check and then download, so it's an extra safety step before triggering the download for those connected with a data plan. One thing I didn't check is if release.updateInfo.version is unchanged in case no release is available (i.e. a newer release's stagingPercentage is 0), but I will

Change-type: patch
Changelog-entry: Fix auto-updater check for updates
Signed-off-by: Lorenzo Alberto Maria Ambrosi <[email protected]>
@thundron thundron requested a review from zvin August 12, 2019 08:35
@thundron thundron merged commit 5cfb95e into master Aug 19, 2019
@thundron thundron deleted the fix-auto-updater branch August 20, 2019 14:43
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.

3 participants