electron-builder icon indicating copy to clipboard operation
electron-builder copied to clipboard

Is stagingPercentage: 0 supported?

Open aguynamedben opened this issue 2 years ago • 6 comments

We used the "staged rollouts" feature and usually roll out to 10% of our users first.

We recently got bit by the mac port is null bug. In emergency situations I've been setting stagingPercentage: 1 to go to 1%. Is stagingPercentage: 0 supported? What happens if I do that? My guess is all users stay on the version they're currently on, but I'm not sure if it's supported.

aguynamedben avatar Sep 05 '21 04:09 aguynamedben

Someone else on my team assumed that "0" might somehow go to undefined which means "go to 100%" which would be unexpected to me. So please don't guess, haha. :)

aguynamedben avatar Sep 05 '21 04:09 aguynamedben

According to this line, if staging percentage is zero, then it looks like no user will receive an update. This is because the user's staging UUIDv5 will never equal a percentage less than 0, since negative numbers are not possible with unsigned ints.

stagingPercentage = 0
stagingPercentage / 100
// => 0

But then again, without a real test, I guess I'm breaking your 'no guessing' rule. 😅

ezekg avatar Sep 07 '21 19:09 ezekg

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Apr 17 '22 16:04 stale[bot]

What would help resolve this:

  • Authors of the autoUpdater confirm that stagingPercentage = 0 is officially supported (we only have guesses here)
  • Add to documentation that it's officially supported?

aguynamedben avatar Apr 18 '22 22:04 aguynamedben

What would also be helpful is a way to inject a stagingPercentage through the configuration. At least there is no documentation about where you could put that

Nokel81 avatar Jun 21 '22 16:06 Nokel81

I wanted to share that stagingPercentage = 0.1 rounded down to stagingPercentage = 0 and resulted in no users receiving updates, so I think you can assume it will operate as I have found: https://github.com/electron-userland/electron-builder/issues/3891

Also it would be great to have @Nokel81's suggestion addressed; regarding having a way to set stagingPercentage.

Nantris avatar Jul 26 '22 19:07 Nantris