camunda-modeler
camunda-modeler copied to clipboard
Add automatic update mechanism for the modeler
Build upon the electron builder auto-update capability to provide automatic updates / update notifications for the App.
Tasks
- [ ] Auto Update on nightly channel
- [ ] Auto Update on release channel (staged, as appropriate)
Things to Consider
Automatic updates, a few things to consider:
- We need to solve #867, #890 before we can allow automatic upgrades at all
- Should we use an update server? YES, it will provide us with basic usage metrics
- Is this data sensitive? Probably. It should probably be opt-in or be possible to disable it via configuration / feature toggle.
- How we deal with breaking changes? Right now, customers have the choice to use Camunda Modeler versions compatible with their used Camunda Engine (flagged as compatible in release notes). We cannot force an automatic DMN 1.2 update upon our users if they still use an old version of Camunda Enterprise that does not support it.
- Do we build our modeler in the recommended way? Automatic updates and how our app is being built are tightly coupled with each other. We should investigate, whether Electron Builder, our current infrastructure, is the recommended way to build Electron apps.
Alternative Approaches
- Instead of automatic updates, could we start with update notification instead? We query if a new version exists and may point users to the download upon application start. This method has opt-in built in and requires us to lock into way less things.
Referenced via SUPPORT-5274
Blocked by https://github.com/camunda/camunda-modeler/issues/867 Blocked by https://github.com/camunda/camunda-modeler/issues/890
Support Case: https://app.camunda.com/jira/browse/SUPPORT-5274
Blocked on Windows by https://github.com/camunda/camunda-modeler/issues/890.
I've added a few questions that we need to consider before implementing automatic updates.
I've also added an alternative solution, update notifications that would support https://github.com/camunda/camunda-modeler/issues/1353 equally well with less hazzle as far as I see.
Some Info I found while slacking on the topic:
- Automatic Updates using the integrated mechanisms only work for Windows and Mac, not on linux
- For windows, you need a installer version for it to work. We currently only build portable apps
As automatic updates should work for Mac OOTB (and I don't have the hardware to test it), I investigated alternatives for linux and windows. As the manual update process boils down to extracting the files on top of the old ones, we can create our own updater with the following mechanism:
- Use our existing update notification mechanism to detect a new version
- download the zip file from the client
- unpack it in a tmp folder
- launch a detached subprocess to copy the files over. This cannot be done from the main process, as the "camunda-modeler" executable would be open an can't be replaced
- close the modeler
- the launched subprocess copies the new version and replaces the old version
- launch modeler again from the subprocess
I was able to test this on linux and it works on my setup. We still need to add normal update support for mac and a customized copy script for windows for it to work cross-platform
Interesting slack topic. Talk in the team call about it, I'm interested to find out more.