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

Staged rollouts #1639

Closed
ir-fuel opened this issue Jun 9, 2017 · 16 comments · May be fixed by qcif/data-curator#563
Closed

Staged rollouts #1639

ir-fuel opened this issue Jun 9, 2017 · 16 comments · May be fixed by qcif/data-curator#563

Comments

@ir-fuel
Copy link

ir-fuel commented Jun 9, 2017

More of a question than an issue, but would it be possible to integrate staged rollouts in electron-builder? Is it technically doable?

@develar
Copy link
Member

develar commented Jun 9, 2017

Planned. PR or reasonable donation can increase priority. Please read below details:

develar [8:10 AM]

completely separate/independent side project from electron-builder

This task is going to be implemented as part of electron-updater project. You can add required field to update info (% of userbase) and implement it as in the Squirrel.Windows — https://github.com/Squirrel/Squirrel.Windows/pull/666/files

I am happy to accept PR.
GitHub
Staged rollouts by paulcbetts · Pull Request #666 · Squirrel/Squirrel.Windows
This PR implements staged rollouts, where a certain percentage of your users will get the newest version of your app. We do this by adding a magic comment to the RELEASES file - unfortunately, beca...

simplyahamzing [10:47 PM]
Oh this looks great

[10:50]
But I was also thinking of something that would allow you to specify % of userbase and have that % grow over an interval. Basically I'd want to release in cohorts and allow the user (developer) to control the time between when the next cohort was given the app. So basically if you release to 10% and then 2 hours later, 20%, and then you notice an increased amount of bugs in your error tracker, you can pull the switch on the release.. Like say pause it; address concerns; and attempt to redeploy it...

simplyahamzing [11:11 PM]
I was a thinking a stand alone server and separate npm module that talked to server before the auto-updater started would allow for more control

[11:12]
Unless I'm misunderstanding how the Squirrel PR because it seems the roll out % would have to be hardcoded

----- June 2nd -----
develar [7:34 AM]
How it is implemented in the Squirrel.Windows:

  1. Each user has some unique generated persisted id.
  2. If update info from server contains % of userbase — this id is used to check is user falls into the affirmative bucket.

So — yes, during publishing shoud be a way to specify this % of userbase to put into the update info file. Later you can simply edit this file (e.g. S3/Github releases — edit latest.yml to “then 2 hours later, 20%“).

Of cource — you can use some generic server and return any update info as you want (e.g. to provide easy UI to manage it across OS / arch / country and so on). Or not server, but some Amazon S3 rules.

@ir-fuel
Copy link
Author

ir-fuel commented Jun 9, 2017

Define "reasonable donation"? :)

@develar
Copy link
Member

develar commented Jun 9, 2017

100+ eur/usd will increase priority enough to fix in 1-2 weeks :)

@ir-fuel
Copy link
Author

ir-fuel commented Jun 9, 2017

OK 👍

@develar
Copy link
Member

develar commented Jun 9, 2017

@ir-fuel What publish provider do you use?

@ir-fuel
Copy link
Author

ir-fuel commented Jun 9, 2017

I am still running an old version of electron-builder (I think 11.x) because you guys update faster than your shadow :)
I have an app on Mac and Windows, and on Windows I use NSIS. Everything is self-hosted on Amazon S3 (manual uploads to release builds)

@develar
Copy link
Member

develar commented Jun 9, 2017

Interesting — Squirrel.Windows generates name based guid, but getOrCreateStagedUserId is called only in the one place and only last 4 bytes is used.

@develar
Copy link
Member

develar commented Jun 12, 2017

Next version of electron-updater will add header X-USER-STAGING-ID to some requests, so, someone can write smart solution on server. Client implementation coming soon.

@develar develar changed the title Staged rollouts? Staged rollouts Jun 12, 2017
develar added a commit to develar/electron-builder that referenced this issue Jun 12, 2017
develar added a commit to develar/electron-builder that referenced this issue Jun 12, 2017
@develar
Copy link
Member

develar commented Jun 17, 2017

@ir-fuel Thanks for your reasonable donation :)

electron-updater 2.3.0 published.

Implementation equals to Squirrel.Windows, so, should work quite well. 2 unit tests were added. But please test it manually. Supported on all platforms.

Docs: https://github.com/electron-userland/electron-builder/wiki/Auto-Update#staged-rollouts

In the future maybe electron-builder will allow you to set staging percentage during build.

@ir-fuel
Copy link
Author

ir-fuel commented Jun 17, 2017

When checking the docs it only talks about editing .yml files. Is it still working with latest-mac.json as I am currently using? I think I somehow missed when to use yml and when json.

@develar
Copy link
Member

develar commented Jun 17, 2017

is it still working with latest-mac.json as I am currently using?

Since electron-updater 2.0 all shiny features available not only for Windows, but for macOS also. No more latest-mac.json — in the docs latest-mac.yml mentioned.

@ir-fuel
Copy link
Author

ir-fuel commented Jun 17, 2017

Yes but my currently released software using older versions of electron-builder and updater looks for latest-mac.json I presume?
Anyway I just saw that both the json and yml file are generated, so I will first push a technical update so the updater is up to date and uses the yml file before pushing out a new release with lots of changes which can benefit of staged rollout.

@develar
Copy link
Member

develar commented Jun 17, 2017

Yes, "backward compatibility" — both files are generated. To ensure that old clients will get updates.

@ir-fuel
Copy link
Author

ir-fuel commented Jun 17, 2017

It's hard keeping up to date with this package. Development here is really fast :)

@develar
Copy link
Member

develar commented Jun 17, 2017

It's hard keeping up to date with this package. Development here is really fast :)

electron-updater has only second major releases :)

As for electron-builder — granular releases allows you to safely update according to semver rules, no need to worry that next version will break your app :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants