devonfw / ide

Tool to automate setup and update of development environment (esp. for Java projects).
Apache License 2.0
33 stars 102 forks source link

Run missed out migrations automatically #1308

Closed hohwille closed 9 months ago

hohwille commented 11 months ago

As a devonfw-ide user, I want to be able to update my very old IDE installations without problems so that everything is working.

However, when my very old IDE installations are older than 2023.02.001 the migration scripts are not run as the feature to run them was only added in 2023.02.001. But there is a simple solution to add a "self-healing" feature: If the file $DEVON_IDE_HOME/.devon.software.version is not present, the migration has been missed out and we can simply run $DEVON_IDE_HOME/scripts/migration to heal this. This workaround can simply be added somewhere here. However, it has to be taken into account that this should not happen on initial setup (devon ide setup) that also will trigger the linked code-spot (in that case initially there is no software folder or workspaces and if the ide setup creates the .devon.software.version early enough before invoking devon recursive then all should work fine).

hohwille commented 9 months ago

Suggested test:

jan-vcapgemini commented 9 months ago

Thanks for the test suggestion.

I've run the test as suggested. The migration did not start in setup and migration started after deleting the .devon.software.version file.

I've also added the migration check to the environment-project.bat for windows users.

I have to mention though that the migration only starts when I'm opening a shell through the context menu.

This looks like I have to start the migration from somewhere else (f.e. devon.bat), to ensure that it is only run when devon is being used.