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

Release Piwik 3.0.3-b2 #11551

Merged
merged 11 commits into from Mar 28, 2017

Conversation

Projects
None yet
5 participants
@mattab
Member

mattab commented Mar 28, 2017

No description provided.

22h and others added some commits Mar 27, 2017

Fix for #11510, Update overlay.css (#11521)
* Update overlay.css

Fix for #11510 – needs testing.

* Update overlay.css

hide overflow for y as well as x
Fix memory leaks in data table / jqplot (#11354)
* Fixes memory leaks in dataTable and jqplot via uncleared resize handlers

Previously, these plugins registered a handler on the `resize` event on window,
but used ad-hoc heuristics to determine when to remove the handler:

* dataTable would only remove the handler the next time the `resize` event fires,
  which is not guaranteed to happen regularly (especially if the user is not
  regularly resizing their browser window, e.g., it is full screened)
  * Fix: I define `_destroy` on `dataTable`, which appropriately cleans up the
    handler (and calls the `_destroy` method of its parent class, `UIControl`)
* jqplot contained code to remove the `resize` listener when `destroyPlot()`
  is called, but a) this function is not called when the plot is removed from
  the DOM (the code called `destroy()` on the `plot` object directly), and
  b) it incorrectly uses `this` instead of `self`, preventing it from working
  in the first place.
  * Fix: I fixed the `this`/`self` confusion, and changed the cleanup code
    such that `$.jqplot.visiblePlots` contains `JqplotGraphDataTable` objects
    rather than `jqplot` objects.

These event handlers prevented previous jqplot and datatable objects from being
garbage collected each time the dashboard is refreshed.

* Prevent leaking data tables via body mouseup handlers.

Adds code to clean up mouseup handlers on the body HTML element when data tables are destroyed.

Previously, these handlers caused data tables to remain in memory forever.
Fix multiple memory leaks in UserCountryMap (#11350)
* Upgrade to Raphael 2.2.7 to fix serious memory leak in UserCountryMap

Kartograph stores data on SVG paths using Raphael:

https://github.com/kartograph/kartograph.js/blob/f70bd295fa8b763d771f923a91b09564040eada3/src/core/maplayerpath.coffee#L30

Raphael stores this data in a *global* map, keyed on the path's ID:

https://github.com/DmitryBaranovskiy/raphael/blob/fe8e591e1c86b5aeb4c252b33c08e647434504c5/raphael.js#L3168

https://github.com/DmitryBaranovskiy/raphael/blob/fe8e591e1c86b5aeb4c252b33c08e647434504c5/raphael.js#L306

UserCountryMap does the right thing and calls clear() on the Kartograph map to reclaim memory...:

https://github.com/piwik/piwik/blob/6fab62e2229f9efadbcf43ff541b46f007fc6323/plugins/UserCountryMap/javascripts/visitor-map.js#L1332

...which eventually calls `remove` on each of these SVG paths:

https://github.com/kartograph/kartograph.js/blob/f70bd295fa8b763d771f923a91b09564040eada3/src/core/maplayerpath.coffee#L70

However, previous versions of Raphael (including 2.1.0) fail to call `removeData` to clear out the data associated with the SVG path in the global map,
leading to a serious memory leak (heap grows by ~10MB each time the map refreshes):

https://github.com/DmitryBaranovskiy/raphael/blob/7ba1a8258be64fdb517bc78fde44ff0e6188ca05/raphael.js#L4475

Later versions, including the latest 2.2.1, properly call `removeData` when `remove` is called:

https://github.com/DmitryBaranovskiy/raphael/blob/master/raphael.js#L6842

* Properly remove window resize event listener for UserCountryMap

The previous version of the code inappropriately tried to remove the event listener;
the `function` object for `onResizeLazy` is different across maps.

* Prevent visitor-map from inserting a new CSS document into DOM every refresh.
Drop temporary table when no longer needed (#11544)
I know the temporary table only exists during session, but problem is a possible error `PDOException: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'tmp_log_actions_to_keep' already exists` when logs are purged twice during a session. 

We could use `if not exists` when creating the table but then we would still have the entries from a previous "delete logs run" in there.

I noticed this error in tests but it may also occur in a regular task schedule that purge logs is called twice if eg implemented by a plugin and by privacy manager etc.
System tests: enable images generation in scheduled reports (#11278)
* System tests: enable images generation in scheduled reports

* prevent error if report does not support multiple periods

* updates expected test files
All icons in own repo and included as a submodule (#11548)
* add icons submodule

* replace path

* change submodule url

* fix JSONTest

* fix integration tests

* update icon submodules

* fix preg_match

* fix remaining system tests

* better match for non dist icon files

* fix .gitmodules

* update icon submodule

* Fixed custom dimension test

* Do not completely fail when GD not enabled

* Fix http test + refactor checklist

* Refactored the code into a method

* Changed icon path refs #11383

* System tests

* Update valid UI tests

* Fix integration test

@mattab mattab added this to the 3.0.3 milestone Mar 28, 2017

@mattab mattab merged commit ce16414 into master Mar 28, 2017

1 check was pending

continuous-integration/travis-ci/push The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment