Skip to content
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

Provide a way to easily perform database migrations #5043

Closed
yhabteab opened this issue Jun 21, 2023 · 0 comments · Fixed by #5046
Closed

Provide a way to easily perform database migrations #5043

yhabteab opened this issue Jun 21, 2023 · 0 comments · Fixed by #5046
Assignees
Labels
area/framework Affects third party integration/development area/modules Affects module support/integration enhancement New feature or improvement
Milestone

Comments

@yhabteab
Copy link
Member

Is your feature request related to a problem? Please describe.

Right now, users have to perform database migration for each individual module manually. Some aren't even aware that database migration is required when they upgrade, but notice it when faced with a nasty stack trace that prevents them from using the module any further. As discussed offline with @lippserd, this should facilitate through a hook implementation. I will describe below how this hook should operate based on my needs, without deep diving into the implementation detail. Nothing is decided yet, if someone has improvements, ideas, then feel free to supplement this.

Describe the solution you'd like

The purpose of this hook is quite straight forward. The user should be able to perform all required database migrations of the respective modules by just pressing a button. While I personally would like to have to confirm the pending DB migrations of all modules only once and Icinga Web 2 would then apply all of them automatically, though, doesn't necessarily have to be this way. Whether a database migration is required and its importance should be left to that module implementing this hook.

  • Icinga Web 2 should be able to scan for pending database migrations of all modules and then inform the user (perhaps by some state badge over the cog icon).
  • There should also be a menubar as subset of the cog icon listing all potential modules that require a DB migration with some brief explanations what the migration is needed for (maybe even providing an option to confirm all the pending migrations right there, or link to the appropriate module).
  • Depending on the pending DB migrations (i.e. whether it is optional or required), Icinga Web 2 should force the user to migrate, when accessing the module views despite the rendered popups.

In order for this to work seamlessly, all modules will need to maintain schema_version table similar to Icinga 2 and Icinga DB. Besides, Icinga Web 2 should also implement the required widgets so that all modules can use them in a consistent way.

Additional context

Add any other context or screenshots about the feature request here.

@yhabteab yhabteab added enhancement New feature or improvement area/framework Affects third party integration/development area/modules Affects module support/integration labels Jun 21, 2023
@yhabteab yhabteab moved this to Todo in Icinga Web 2.12 Jun 21, 2023
@nilmerg nilmerg added the TBD To be defined - We aren't certain about this yet label Jun 21, 2023
@nilmerg nilmerg moved this from Todo to In Progress in Icinga Web 2.12 Sep 7, 2023
@nilmerg nilmerg added this to the 2.12.0 milestone Sep 12, 2023
@nilmerg nilmerg removed the TBD To be defined - We aren't certain about this yet label Sep 15, 2023
nilmerg added a commit that referenced this issue Sep 19, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Icinga Web 2.12 Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/framework Affects third party integration/development area/modules Affects module support/integration enhancement New feature or improvement
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants