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

When upgrading Piwik, --dry-run should show all SQL queries including Plugins install queries #5806

Closed
mattab opened this issue Jul 10, 2014 · 3 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Jul 10, 2014

When upgrading from Piwik 2.3.0 to 2.4.0 we have noticed that the --dry-run does not show the queries that get executed when the DeviceDetection plugin is installed.

Goal of this ticket is to ensure that the core:update --dry-run always shows queries from the installation of plugins. Currently, when a plugin will be installed/enabled the queries are not displayed in dry-run.

Example of problematic 2.4.0 upgrade: the plugin was enabled in this upgrade file: https://github.com/piwik/piwik/blob/master/core/Updates/2.4.0-b6.php
When the plugin is installed it executes the following SQL queries: https://github.com/piwik/piwik/blob/master/plugins/DevicesDetection/DevicesDetection.php#L208-224 This created a huge load on the Database which Piwik admins could not plan for.

@mattab mattab added this to the 2.5.0 - Piwik 2.5.0 milestone Jul 10, 2014
@mattab mattab changed the title When upgrading Piwik, --dry-run should show all SQL queries including Plugins install and updates When upgrading Piwik, --dry-run should show all SQL queries including Plugins install queries Jul 11, 2014
@tsteur
Copy link
Member

tsteur commented Jul 22, 2014

Not sure how to solve this. Maybe in case of install scripts that create huge load we could use a plugin Update class instead of the install method?

From what I can see those SQL statements in this case were caused by dimensions (log_visit) which are no longer in the install() method of this plugin. During the #5820 refactoring I converted them into dimensions which are now installed via CoreUpdater and therefore the SQL statements are shown when using --dry-run or when using the updater UI. I spent a lot of time on this and even added some hacks just for this. I already thought it would make sense at some time to refactor the updater logic when working on dimensions. It is quite complex logic now. Maybe we could also in general get rid of install in favor of an Update class. Not sure

@mattab
Copy link
Member Author

mattab commented Aug 3, 2014

Maybe in case of install scripts that create huge load we could use a plugin Update class instead of the install method?

+1 - something to keep in mind when reviewing new install() methods committed to core or as submodule.

therefore the SQL statements are shown when using --dry-run or when using the updater UI

fantastic!

@mattab mattab added this to the Piwik 2.5.0 milestone Aug 3, 2014
@mattab
Copy link
Member Author

mattab commented Aug 3, 2014

@tsteur maybe close the issue if you're done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants