Skip to content

Ability to run "migration script" on update #971

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

Closed
hohwille opened this issue Nov 8, 2022 · 0 comments · Fixed by #1038
Closed

Ability to run "migration script" on update #971

hohwille opened this issue Nov 8, 2022 · 0 comments · Fixed by #1038
Assignees
Labels
enhancement New feature or request

Comments

@hohwille
Copy link
Member

hohwille commented Nov 8, 2022

When we publish a new release, our users can install it to existing devonfw-ide installations via devon ide update scripts.
Sometimes we do some structural changes, here is a brief history with just some examples:

  • we have changed the eclipse configuration structure in settings/eclipse/workspace
  • we have moved the eclipse plugin configuration from hard-coded settings to settings/eclipse/plugins
  • we are planning to migrate from ide-mirrors to ide-urls

Due to such changes we sometimes "pollute" our scripts/commandlets with legacy handling code (see #904 or see ide commandlet with blocks of cp and mv commands, etc.).

Instead, we should create a bash script scripts/migration where we can place logic that would be executed automatically by devon ide update scripts but at the end on the new release.
To avoid mistakes and make things simple for developers, I would propose that the migration script gets called with the previous version of devonfw-ide that just has been updated. We create a subfolder scripts/migrations where we can create scripts for specific migrations named by the source version. So e.g. when we have version 2022.11.001 installed and call devon ide update scripts then migrate script would find all scripts in migrations subfolder that are named by a version greater or equal to 2022.11.001 so he may find migrations/2022.12.001 and execute it. In case someone knows flyway or liquibase this is the same pattern that we are trying to implement here...

We can still discuss if we need to track the version of devonfw-ide itself for reliability (e.g. in .devon.software.version file in DEVON_IDE_HOME).

@hohwille hohwille added the enhancement New feature or request label Nov 8, 2022
@hohwille hohwille added the draft needs clarification or details, not ready for implementation label Nov 17, 2022
@hohwille hohwille added Team_IDE and removed draft needs clarification or details, not ready for implementation labels Dec 1, 2022
@hohwille hohwille added this to the release:2022.12.001 milestone Dec 1, 2022
@hohwille hohwille removed this from the release:2022.12.001 milestone Dec 15, 2022
@alfeilex alfeilex linked a pull request Jan 16, 2023 that will close this issue
@hohwille hohwille added this to the release:2023.02.001 milestone Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants