Skip to content

Make installer update logic more resilient to failures during updates by not modifying instance folder #4222

@ramonsmits

Description

@ramonsmits

Describe the suggested improvement

The current installer logic deletes folder content with some exclusions and adds files from the new version into the instance folder.

Various things can happen here like file locks because files are in use due to a hanging instance, a virus scanner, or because a user has a file open in an editor.

The following mitigates the file in uses issue during upgrades:

However, the installer logic itself is flawed and it should not "destroy" the current installation until it completed its update. The installer logic could benefit from the following flow:

  1. Move "current" folder to "old" to minimize file in use / locking issues
  2. Prep "new" folder with "new" version and copy some old files
  3. Move new to current
  4. Delete old

If an error occurs during:

  • 1: old/current version unaffected
  • 2 or 3: old unaffected and we move back "old" to "current"
  • 4: new instance already ready for start

The installer could be a bit smarter and probe "old", "new" folders to suggest cleanup if these paths exists.

Alternatives

  • Do not just remove old instances but keep them on the file system
  • Include version info in file path for installed instances

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions