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

Deleting outdated files may not work during the upgrade and 1) fail silently, 2) not executed during manual updates #7986

Open
mattab opened this issue May 24, 2015 · 5 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.

Comments

@mattab
Copy link
Member

mattab commented May 24, 2015

The goal of this issue is to improve the update mechanism so that when outdated files cannot be deleted, an error or warning should be reported to the user so that the user knows to manually delete those files. This will help prevent bug reports and user frustration.

Imagine a user upgrades from Piwik version A to Piwik version B. Sometimes, a new Piwik version may actually have less files than a previous Piwik. For example when we refactor code and simplify APIs we sometimes delete files and classes. When this happens, the auto updater should notice that those files were deleted and then delete them from the user's server. This should work mostly fine but it's clear that sometimes files are not deleted. For example this caused this bug: #7985

The goal of this issue is to modify the upgrade mechanism and make sure that when files were not deleted, we report to the user the list of files she should delete eg.

Warning: we tried to delete the following files but could not succeed. To make sure Piwik will work as expected, please execute these commands or delete the files manually:
rm /path/outdated-file-1.php
rm /path/outdated-file-2.php
@mattab mattab added Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. labels May 24, 2015
@ghost
Copy link

ghost commented May 25, 2015

Regarding the 3-step process documented at http://piwik.org/docs/update/, what part of that will delete removed files? Is it the run of core::update ?

@mattab
Copy link
Member Author

mattab commented May 25, 2015

Is it the run of core::update ?

yes

@mattab
Copy link
Member Author

mattab commented Jun 5, 2015

Follows up #5936

@mattab mattab added this to the Mid term milestone Jul 15, 2015
@mattab mattab changed the title During Upgrade, deleting outdated files may not work and fail silently Deleting outdated files may not work during the upgrade and 1) fail silently, 2) not executed during manual updates Apr 8, 2016
@mattab
Copy link
Member Author

mattab commented Apr 8, 2016

I renamed this issue to point out at least two reasons the feature of deleting outdated files from the filesystem may not work as we expect:

  1. in some cases, the file deletion fails (ie. missing permission)

  2. the algorithm detecting files that are outdated, only executes when user does an "Auto one click update". When user manually upload files to the server and goes to browser to execute the update, the algorithm does NOT run.

(2) was reported in forum post: https://forum.piwik.org/t/viewdatatable-id-table-is-already-in-use/18837)

@mattab mattab modified the milestones: 3.0.0-rc, Long term, Mid term Apr 8, 2016
@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Apr 8, 2016
@mattab
Copy link
Member Author

mattab commented Apr 12, 2016

FYI: If you get this error ViewDataTable ID ‘table’ is already in use! - delete the file /piwik/plugins/CoreVisualizations/Visualizations/HtmlTable/PivotBy.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

1 participant