[Bug 39632] New: Failed plugin install gives too little info
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 Bug ID: 39632 Summary: Failed plugin install gives too little info Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org When the `install()` process fails, it throws a `Koha::Exceptions::Plugin::InstallDied` exception. But it only carries the `plugin_class` value. We need to pass the error from the `try/catch` block so it gets returned to the caller as well. -- 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=39632 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com, | |martin.renvoize@openfifth.c | |o.uk, tomascohen@gmail.com Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Status|NEW |ASSIGNED -- 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=39632 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 180930 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180930&action=edit Bug 39632: Extend plugin exceptions with more useful parameters This patch tweaks the `Koha::Exceptions::Plugin` class by adding an extra parameter to the plugin install and upgrade related exceptions so they carry the actuall error (if any). * Koha::Exceptions::Plugin::InstallDied: install_error * Koha::Exceptions::Plugin::UpgradeDied: upgrade_error I didn't pick plain 'error' because it is a reserved word for `Exception::Class` which makes it stringify using its value only. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/Koha/Exceptions.t => SUCCESS: Tests pass! 3. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 180931 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180931&action=edit Bug 39632: Make plugin install and upgrade errors more useful This patch makes the install and upgrade process for plugins to add the newly added extra parameters to the thrown exceptions. This is covered by the tests To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove -r t/Koha/Exceptions.t \ t/db_dependent/Koha/Plugins => SUCCESS: Tests pass! 3. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 Brendan Gallagher <brendan@bywatersolutions.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=39632 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180930|0 |1 is obsolete| | --- Comment #3 from Brendan Gallagher <brendan@bywatersolutions.com> --- Created attachment 180942 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180942&action=edit Bug 39632: Extend plugin exceptions with more useful parameters This patch tweaks the `Koha::Exceptions::Plugin` class by adding an extra parameter to the plugin install and upgrade related exceptions so they carry the actuall error (if any). * Koha::Exceptions::Plugin::InstallDied: install_error * Koha::Exceptions::Plugin::UpgradeDied: upgrade_error I didn't pick plain 'error' because it is a reserved word for `Exception::Class` which makes it stringify using its value only. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/Koha/Exceptions.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180931|0 |1 is obsolete| | --- Comment #4 from Brendan Gallagher <brendan@bywatersolutions.com> --- Created attachment 180943 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180943&action=edit Bug 39632: Make plugin install and upgrade errors more useful This patch makes the install and upgrade process for plugins to add the newly added extra parameters to the thrown exceptions. This is covered by the tests To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove -r t/Koha/Exceptions.t \ t/db_dependent/Koha/Plugins => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180942|0 |1 is obsolete| | --- Comment #5 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 184675 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184675&action=edit Bug 39632: Extend plugin exceptions with more useful parameters This patch tweaks the `Koha::Exceptions::Plugin` class by adding an extra parameter to the plugin install and upgrade related exceptions so they carry the actuall error (if any). * Koha::Exceptions::Plugin::InstallDied: install_error * Koha::Exceptions::Plugin::UpgradeDied: upgrade_error I didn't pick plain 'error' because it is a reserved word for `Exception::Class` which makes it stringify using its value only. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/Koha/Exceptions.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180943|0 |1 is obsolete| | --- Comment #6 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 184676 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184676&action=edit Bug 39632: Make plugin install and upgrade errors more useful This patch makes the install and upgrade process for plugins to add the newly added extra parameters to the thrown exceptions. This is covered by the tests To test: 1. Apply this patch 2. Run: $ ktd --shell k$ prove -r t/Koha/Exceptions.t \ t/db_dependent/Koha/Plugins => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Laura.escamilla@bywatersolu | |tions.com QA Contact|testopia@bugs.koha-communit |Laura.escamilla@bywatersolu |y.org |tions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 |25.11.00,25.05.03 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 --- Comment #8 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39632 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to stable |Needs documenting --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement not pushed to 24.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org