matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.88k stars 2.65k forks source link

When a plugin requires a core piwik version that does not exist yet, CI tests start timing out #6941

Closed mattab closed 9 years ago

mattab commented 9 years ago

The goal of this issue is to fix the bug that when a core Piwik version is specified in a plugin and this core version does not exist yet (eg. 4.0.0), then Piwik runs very slow (at least during tests). We expect that Piwik behaves still the same independently of the required core versions.

Explanation

Yesterday our builds started failing due to timing out. See here:

half of them take 50min and before used to take 25min

I wrote email to Travis support as I was sure it was infrastructure problem, but as usual, it was a bug in the code. ;-) at first we got super confused as we looked at the wrong commit (N-1 instead of N). After that with matt we looked again and it was worked around in commit: https://github.com/piwik/plugin-CustomAlerts/commit/0e88064463795093551c9ddbea6ff20c7c1ece80 then the build behaved again.

cc @tsteur @mnapoli

mnapoli commented 9 years ago

For the record in the plugin I required a version that doesn't exist. The reason is that 2.10.0 is not compatible, I needed dev-master (but we don't support such constraint in plugin.json) so I opted for 2.11.0-b1. The commit to fix reverts to 2.10.0 even though that version constraint is not correct.

tsteur commented 9 years ago

You could try to disable the Marketplace in tests and see if it changes anything. Otherwise it is not good to require a Piwik version that is not released yet. Eg Piwik would notice there is a missing dependency and deactivate the plugin which can cause failing tests (at least the UI tests).

mattab commented 9 years ago

Maybe the piwik would have behaved better if the Version.php already contained 2.11.0-b1 (even though the version was not released yet.). I changed the version in: https://github.com/piwik/piwik/commit/52c93bb14223d6f34f8fffd109e74d718641c378 and will now try to revert https://github.com/piwik/plugin-CustomAlerts/commit/0e88064463795093551c9ddbea6ff20c7c1ece80 and see if the build is working.

edit: this build https://travis-ci.org/piwik/piwik-ui-tests/builds/46155835

mnapoli commented 9 years ago

This is not good but what would be the good way?

tsteur commented 9 years ago

Increase Piwik version

mattab commented 9 years ago

I can confirm that it works to require 2.11.0-b1 and then set this version number in core/Version.php

we don't need to create a tag. so maybe this is acceptable solution.

tsteur commented 9 years ago

I think it is not only an acceptable but also the correct solution. If you have changes in Piwik that changes the API then you increase the version number.

mattab commented 9 years ago

:+1:

Conclusion is: when we set a Piwik require version then we must set this version in core/Version.php - makes sense, but it wasn't clear before. Maybe we should write this somewhere...