[Bug 25549] New: Install plugin script/method should remove broken plugins
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Bug ID: 25549 Summary: Install plugin script/method should remove broken plugins Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org bug 23191 added a script to allow installation of plugins from the command line. There can be an issue when a plugin no longer compiles after an upgrade, Koha will not load, the script will not run either. We should repair the script so that it can remove plugin methods that no longer function or have been deleted. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 105143 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105143&action=edit Bug 25549: Remove plugin methods for broken plugins To test: 1 - Enable plugins in the koha-conf 2 - Install the kitchen sink plugin 3 - Your staff client should be orange now :-) 4 - edit the plugin module /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm 5 - Add a line to break compilation, like: this won't compile 6 - Restart all 7 - Your koha is now broken 8 - kshell 9 - perl misc/devel/install_plugins.pl 10 - Restart all 11 - Koha remains broken 12 - Apply patch 13 - kshell 14 - perl misc/devel/install_plugins.pl 15 - Koha now works! 16 - Koha is not orange because the plugin methods are removed -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com | |, | |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21670 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 --- Comment #2 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Whaoo super, I had this issue when playing with plugins install. All perl is broken if a plugins is broken or its source removed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #105143|0 |1 is obsolete| | --- Comment #3 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 110896 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110896&action=edit Bug 25549: Remove plugin methods for broken plugins To test: 1 - Enable plugins in the koha-conf 2 - Install the kitchen sink plugin 3 - Your staff client should be orange now :-) 4 - edit the plugin module /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm 5 - Add a line to break compilation, like: this won't compile 6 - Restart all 7 - Your koha is now broken 8 - kshell 9 - perl misc/devel/install_plugins.pl 10 - Restart all 11 - Koha remains broken 12 - Apply patch 13 - kshell 14 - perl misc/devel/install_plugins.pl 15 - Koha now works! 16 - Koha is not orange because the plugin methods are removed Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23191 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23191 [Bug 23191] Administrators should be able to install plugins from the command line -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Whilst this is great and resolves the bug mentioned (I've hit this too), it breaks the output of the script as the 'existing_plugins' array used to contain the 'plugins before' call to InstallPlugins but now runs after the call to InstallPlugins and so will not be a comparison. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I think we need to move the call to GetPlugins in install_plugins.pl back up to where it we and add the option to run GetPlugins with 'can_load' in this case. It would be nice to report the deletions too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #110896|0 |1 is obsolete| | --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 111324 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111324&action=edit Bug 25549: Remove plugin methods for broken plugins To test: 1 - Enable plugins in the koha-conf 2 - Install the kitchen sink plugin 3 - Your staff client should be orange now :-) 4 - edit the plugin module /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm 5 - Add a line to break compilation, like: this won't compile 6 - Restart all 7 - Your koha is now broken 8 - kshell 9 - perl misc/devel/install_plugins.pl 10 - Restart all 11 - Koha remains broken 12 - Apply patch 13 - kshell 14 - perl misc/devel/install_plugins.pl 15 - Koha now works! 16 - Koha is not orange because the plugin methods are removed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111324|0 |1 is obsolete| | --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 111335 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111335&action=edit Bug 25549: Remove plugin methods for broken plugins To test: 1 - Enable plugins in the koha-conf 2 - Install the kitchen sink plugin 3 - Your staff client should be orange now :-) 4 - edit the plugin module /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm 5 - Add a line to break compilation, like: this won't compile 6 - Restart all 7 - Your koha is now broken 8 - kshell 9 - perl misc/devel/install_plugins.pl 10 - Restart all 11 - Koha remains broken 12 - Apply patch 13 - kshell 14 - perl misc/devel/install_plugins.pl 15 - Koha now works! 16 - Koha is not orange because the plugin methods are removed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111335|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111345 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111345&action=edit Bug 25549: Remove plugin methods for broken plugins To test: 1 - Enable plugins in the koha-conf 2 - Install the kitchen sink plugin 3 - Your staff client should be orange now :-) 4 - edit the plugin module /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm 5 - Add a line to break compilation, like: this won't compile 6 - Restart all 7 - Your koha is now broken 8 - kshell 9 - perl misc/devel/install_plugins.pl 10 - Restart all 11 - Koha remains broken 12 - Apply patch 13 - kshell 14 - perl misc/devel/install_plugins.pl 15 - Koha now works! 16 - Koha is not orange because the plugin methods are removed Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 111346 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111346&action=edit Bug 25549: Add error reporting to plugins-home This patch adds handling for the newly introduced 'errors' option in GetPlugins and reports erroroneos plugins to the user. To test: 1 - Enable plugins in the koha-conf 2 - Install the kitchen sink plugin 3 - Your staff client should be orange now :-) 4 - The plugin should display as installed in the table at tools/plugins. 5 - edit the plugin module /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm 6 - Add a line to break compilation, like: this won't compile 7 - Restart all 8 - Your Koha is not broken, but is no longer orange (The plugin is not loading). 9 - The plugin should display as unable to load in the table at tools/plugins. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This works really well.. the switch to using can_load in the GetPlugins call has the added benefit that the initial 'broken koha' issue goes away entirely.. just the plugin functionality won't load. I've added a followup that restores the InstallPlugins call such that erroneoes plugins are no longer removed by calling it (as they no longer cause an issue) and now use such occurrences along with the errors flag on GetPlugins to highlight broken plugins from the plugin management page. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Install plugin |Broken plugins should not |script/method should remove |break Koha (Install plugin |broken plugins |script/method should | |highlight broken plugins) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111345|0 |1 is obsolete| | Attachment #111346|0 |1 is obsolete| | --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 111375 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111375&action=edit Bug 25549: Remove plugin methods for broken plugins To test: 1 - Enable plugins in the koha-conf 2 - Install the kitchen sink plugin 3 - Your staff client should be orange now :-) 4 - edit the plugin module /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm 5 - Add a line to break compilation, like: this won't compile 6 - Restart all 7 - Your koha is now broken 8 - kshell 9 - perl misc/devel/install_plugins.pl 10 - Restart all 11 - Koha remains broken 12 - Apply patch 13 - kshell 14 - perl misc/devel/install_plugins.pl 15 - Koha now works! 16 - Koha is not orange because the plugin methods are removed Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 111376 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111376&action=edit Bug 25549: Add error reporting to plugins-home This patch adds handling for the newly introduced 'errors' option in GetPlugins and reports erroroneos plugins to the user. To test: 1 - Enable plugins in the koha-conf 2 - Install the kitchen sink plugin 3 - Your staff client should be orange now :-) 4 - The plugin should display as installed in the table at tools/plugins. 5 - edit the plugin module /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm 6 - Add a line to break compilation, like: this won't compile 7 - Restart all 8 - Your Koha is not broken, but is no longer orange (The plugin is not loading). 9 - The plugin should display as unable to load in the table at tools/plugins. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|Trivial patch |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111375|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111816 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111816&action=edit Bug 25549: Remove plugin methods for broken plugins To test: 1 - Enable plugins in the koha-conf 2 - Install the kitchen sink plugin 3 - Your staff client should be orange now :-) 4 - edit the plugin module /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm 5 - Add a line to break compilation, like: this won't compile 6 - Restart all 7 - Your koha is now broken 8 - kshell 9 - perl misc/devel/install_plugins.pl 10 - Restart all 11 - Koha remains broken 12 - Apply patch 13 - kshell 14 - perl misc/devel/install_plugins.pl 15 - Koha now works! 16 - Koha is not orange because the plugin methods are removed Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #111376|0 |1 is obsolete| | --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 111817 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111817&action=edit Bug 25549: Add error reporting to plugins-home This patch adds handling for the newly introduced 'errors' option in GetPlugins and reports erroroneos plugins to the user. To test: 1 - Enable plugins in the koha-conf 2 - Install the kitchen sink plugin 3 - Your staff client should be orange now :-) 4 - The plugin should display as installed in the table at tools/plugins. 5 - edit the plugin module /var/lib/koha/kohadev/plugins/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm 6 - Add a line to break compilation, like: this won't compile 7 - Restart all 8 - Your Koha is not broken, but is no longer orange (The plugin is not loading). 9 - The plugin should display as unable to load in the table at tools/plugins. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Should the change in Plugins.pm be covered by a regression test? I think it would be nice if we offered the uninstall option for broken plugins. Otherwise you are stuck with them forever until you can get someone on your server to remove them. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Katrin Fischer from comment #15)
Should the change in Plugins.pm be covered by a regression test?
Probably, though I'm not entirely sure how to write one off the top of my head.
I think it would be nice if we offered the uninstall option for broken plugins. Otherwise you are stuck with them forever until you can get someone on your server to remove them.
This is more difficult: The uninstall button actually calls an uninstall method from within the plugins themselves to allow for some cleanup that's plugin specific. If we wanted to expose something for broken plugins we would need to write a specific method for it and it would be more of a 'Partial remove' than an uninstall.. we would likely be left with data in the database as there's no easy way we could tell where the plugin put it's data. I think leave that one for another bug 😉 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> ---
I think it would be nice if we offered the uninstall option for broken plugins. Otherwise you are stuck with them forever until you can get someone on your server to remove them.
This is more difficult: The uninstall button actually calls an uninstall method from within the plugins themselves to allow for some cleanup that's plugin specific. If we wanted to expose something for broken plugins we would need to write a specific method for it and it would be more of a 'Partial remove' than an uninstall.. we would likely be left with data in the database as there's no easy way we could tell where the plugin put it's data. I think leave that one for another bug 😉
It was meant to be - this one is passed :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00 |20.11.00, 20.05.06 released in| | Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #19 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 20.05.x for 20.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|20.11.00, 20.05.06 |20.11.00, 20.05.06, released in| |19.11.12 CC| |aleisha@catalyst.net.nz --- Comment #20 from Aleisha Amohia <aleisha@catalyst.net.nz> --- backported to 19.11.x for 19.11.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25549 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED --- Comment #21 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Missing dependencies for 19.05.x, can't backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org