lantern icon indicating copy to clipboard operation
lantern copied to clipboard

[feature] install updates automatically

Open lanterndev opened this issue 15 years ago • 70 comments

evergreen style (e.g. à la Google Chrome).

Auto-updates using jardiff or something similar to auto-patch deployed jar files.

Sub-tasks:

  • [ ] #898

lanterndev avatar Nov 21 '11 14:11 lanterndev

Just noticed install4j has some auto-update functionality (search http://www.ej-technologies.com/products/install4j/features.html for "auto-update") but haven't explored yet. Maybe that could help.

lanterndev avatar Apr 16 '13 22:04 lanterndev

Just accepted a prompt in JetBrains WebStorm IDE to auto update in place, and after it downloaded the update and closed the currently-running app, a slick little app called "com.intellij.updater" was automatically run which installed the update and launched the new version. Did a little rummaging, and look what I found: https://github.com/JetBrains/intellij-community/tree/master/updater/src/com/intellij/updater

Can we use any of their stuff?

lanterndev avatar Jun 27 '13 22:06 lanterndev

I think it will be just as quick to write our own, because we need to do a few things that it doesn't.

On Thu, Jun 27, 2013 at 6:37 PM, skivvies [email protected] wrote:

Just accepted a prompt in JetBrains WebStorm IDE to auto update in place, and after it downloaded the update and closed the currently-running app, a slick little app called "com.intellij.updater" was automatically run which installed the update and launched the new version. Did a little rummaging, and look what I found: https://github.com/JetBrains/intellij-community/tree/master/updater/src/com/intellij/updater

Can we use any of their stuff?

— Reply to this email directly or view it on GitHubhttps://github.com/getlantern/lantern/issues/21#issuecomment-20159834 .

leahxschmidt avatar Jun 28 '13 03:06 leahxschmidt

If (say) a critical security update to the user's current jre is available, do we have a way of triggering an update to that from our auto-updater too?

lanterndev avatar Aug 26 '13 19:08 lanterndev

No

myleshorton avatar Aug 26 '13 21:08 myleshorton

Maybe #466 could cover that then.

lanterndev avatar Aug 26 '13 22:08 lanterndev

That's a pretty different feature and probably one we won't be able to handle better than Oracle. We could send a global message with a link or something like that though.

On Monday, August 26, 2013, skivvies wrote:

Maybe #466 https://github.com/getlantern/lantern/issues/466 could cover that then.

— Reply to this email directly or view it on GitHubhttps://github.com/getlantern/lantern/issues/21#issuecomment-23300221 .

Adam pgp A998 2B6E EF1C 373E 723F A813 045D A255 901A FD89

myleshorton avatar Aug 26 '13 22:08 myleshorton

+1 on letting Oracle or the system update checker handle this. If we decide we need it we could have clients display messages conditionally based on what version of {Lantern (#845), Java, ...} they're running, but can cross that bridge later.

lanterndev avatar Aug 26 '13 23:08 lanterndev

This certainly isn't close to ready for tomorrow's release -- pushing.

myleshorton avatar Aug 27 '13 22:08 myleshorton

Assigning back to you @myleshorton for re-assignment. Maybe ox could do it?

cholmes avatar Sep 03 '13 14:09 cholmes

@myleshorton Given how frequently we are having to update the client to fix bugs and stay ahead of the censors, I wonder if maybe we should go ahead and do this for 1.3?

oxtoacart avatar Feb 24 '14 14:02 oxtoacart

+1 ain't enough

lanterndev avatar Feb 24 '14 17:02 lanterndev

Yeah I agree this is super important. The only thing is I think doing it well is a pretty significant task, i.e. with binary differencing. We could do a simple implementation to start, though, and iterate from there.

On Mon, Feb 24, 2014 at 9:19 AM, skivvies [email protected] wrote:

+1 ain't enough

Reply to this email directly or view it on GitHubhttps://github.com/getlantern/lantern/issues/21#issuecomment-35910459 .

myleshorton avatar Feb 25 '14 02:02 myleshorton

Glad everyone's on board!

@myleshorton - can you talk a little more about "doing it well", in particular why we would need binary differencing rather than just comparing version numbers?

Incidentally, it occurs to me that for this to be valuable, the notification of new versions should come through the unblocked S3 channel.

Cheers, Ox


"I love people who harness themselves, an ox to a heavy cart, who pull like water buffalo, with massive patience, who strain in the mud and the muck to move things forward, who do what has to be done, again and again."

  • Marge Piercy

On Mon, Feb 24, 2014 at 8:29 PM, myleshorton [email protected]:

Yeah I agree this is super important. The only thing is I think doing it well is a pretty significant task, i.e. with binary differencing. We could do a simple implementation to start, though, and iterate from there.

On Mon, Feb 24, 2014 at 9:19 AM, skivvies [email protected] wrote:

+1 ain't enough

Reply to this email directly or view it on GitHub< https://github.com/getlantern/lantern/issues/21#issuecomment-35910459>

.

Reply to this email directly or view it on GitHubhttps://github.com/getlantern/lantern/issues/21#issuecomment-35968461 .

oxtoacart avatar Feb 25 '14 15:02 oxtoacart

@myleshorton means that when an update is available, rather than downloading an entire installer and doing a full install, it just downloads a binary diff over the current version and applies that. Looks like this is how IntelliJ does it:

https://github.com/JetBrains/intellij-community/blob/master/updater/src/com/intellij/updater/DiffCalculator.java

lanterndev avatar Feb 25 '14 15:02 lanterndev

Ahh, gotcha! Yeah, that definitely sounds like a "phase 2" thing :)

Cheers, Ox


"I love people who harness themselves, an ox to a heavy cart, who pull like water buffalo, with massive patience, who strain in the mud and the muck to move things forward, who do what has to be done, again and again."

  • Marge Piercy

On Tue, Feb 25, 2014 at 9:58 AM, skivvies [email protected] wrote:

@myleshorton https://github.com/myleshorton means that when an update is available, rather than downloading an entire installer and doing a full install, it just downloads a binary diff over the current version and applies that. Looks like this is how IntelliJ does it:

https://github.com/JetBrains/intellij-community/blob/master/updater/src/com/intellij/updater/DiffCalculator.java

Reply to this email directly or view it on GitHubhttps://github.com/getlantern/lantern/issues/21#issuecomment-36022791 .

oxtoacart avatar Feb 25 '14 16:02 oxtoacart

What do we want as the user experience for this? One easy to implement option would be to just have a non-dismissable modal that prompts the user to download the latest lantern by clicking a button. This would download the install wrapper, from which the user would then install Lantern as normal. Once Lantern is up-to-date, the modal would go away.

Other options? ...

Cheers, Ox


"I love people who harness themselves, an ox to a heavy cart, who pull like water buffalo, with massive patience, who strain in the mud and the muck to move things forward, who do what has to be done, again and again."

  • Marge Piercy

On Tue, Feb 25, 2014 at 10:00 AM, Ox Cart [email protected] wrote:

Ahh, gotcha! Yeah, that definitely sounds like a "phase 2" thing :)

Cheers, Ox


"I love people who harness themselves, an ox to a heavy cart, who pull like water buffalo, with massive patience, who strain in the mud and the muck to move things forward, who do what has to be done, again and again."

  • Marge Piercy

On Tue, Feb 25, 2014 at 9:58 AM, skivvies [email protected]:

@myleshorton https://github.com/myleshorton means that when an update is available, rather than downloading an entire installer and doing a full install, it just downloads a binary diff over the current version and applies that. Looks like this is how IntelliJ does it:

https://github.com/JetBrains/intellij-community/blob/master/updater/src/com/intellij/updater/DiffCalculator.java

Reply to this email directly or view it on GitHubhttps://github.com/getlantern/lantern/issues/21#issuecomment-36022791 .

oxtoacart avatar Feb 25 '14 16:02 oxtoacart

Most important is the behavior when there is no user interaction, which should be to automatically apply the downloaded update on quit, so that the next time Lantern starts, it'll already be up-to-date. This is how Chrome, Spotify, and other evergreen apps work.

Other than that, the tray icon should just turn red or something to indicate there's an update available, the tray menu should show an "Update Lantern" menu item (which would actually just quit to trigger applying the update, and then restart the updated version), and within the UI, clicking the red "update available" link in the footer could just trigger apply update+restart.

For users who not only don't apply updates when prompted, but also don't ever restart their computers or quit apps, when Lantern detects it has a critical security update available, we might even want to make it initiate the apply update+restart on its own, displaying a desktop notification to this effect so the user knows what it's doing.

Note the updateAvailable modal can go away with this. We can add a link to the changelog to the About modal for users interested in keeping closer track of changes between versions. Since we also post updates to Twitter, Tumblr, Facebook, etc. with info about new versions, I'm not concerned that taking out the updateAvailable modal will mean users who care won't be able to find changelog info.

lanterndev avatar Feb 25 '14 16:02 lanterndev

That all sounds reasonable. My one concern is that Lantern is really meant never to be shut down and always run in the background, so do we need to tweak the model established by Chrome a little?

oxtoacart avatar Feb 25 '14 17:02 oxtoacart

Nah. The Chrome model is specifically designed to accommodate users that want to keep Chrome running at all times. Notice in my previous comment that any time Lantern quits to apply an update, it should restart itself immediately after, unless the user specifically chooses to just quit.

lanterndev avatar Feb 25 '14 17:02 lanterndev