[Bug 31345] New: Add ability to exit process_message_queue.pl early if any plugin before_send_messages hook fails
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Bug ID: 31345 Summary: Add ability to exit process_message_queue.pl early if any plugin before_send_messages hook fails Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Sometimes it would be better for process_message_queue.pl to stop if a plugin hook fails rather than continue processing. It would be nice if that was a command line option. -- 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=31345 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@bywatersolutions.com |ity.org | -- 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=31345 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 139027 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139027&action=edit Bug 31345 - Add ability to exit process_message_queue.pl early if any plugin before_send_messages hook fails Sometimes it would be better for process_message_queue.pl to stop if a plugin hook fails rather than continue processing. It would be nice if that was a command line option. Test Plan: 1) Install any plugin with a before_send_messages hook 2) Modify the plugin, add a 'die;' statement at the start of the before_send_messages method of the plugin. 3) Run process_message_queue.pl as usual 4) Note the exit code is 0 5) Run it again with the new -e setting 6) Note the exit code is 1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Keywords| |rel_22_11_candidate --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Trivial and handy minor enh. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Status|Needs Signoff |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #139027|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 143381 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=143381&action=edit Bug 31345 - Add ability to exit process_message_queue.pl early if any plugin before_send_messages hook fails Sometimes it would be better for process_message_queue.pl to stop if a plugin hook fails rather than continue processing. It would be nice if that was a command line option. Test Plan: 1) Install any plugin with a before_send_messages hook 2) Modify the plugin, add a 'die;' statement at the start of the before_send_messages method of the plugin. 3) Run process_message_queue.pl as usual 4) Note the exit code is 0 5) Run it again with the new -e setting 6) Note the exit code is 1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #143381|0 |1 is obsolete| | --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 155227 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155227&action=edit Bug 31345 - Add ability to exit process_message_queue.pl early if any plugin before_send_messages hook fails Sometimes it would be better for process_message_queue.pl to stop if a plugin hook fails rather than continue processing. It would be nice if that was a command line option. Test Plan: 1) Install any plugin with a before_send_messages hook 2) Modify the plugin, add a 'die;' statement at the start of the before_send_messages method of the plugin. 3) Run process_message_queue.pl as usual 4) Note the exit code is 0 5) Run it again with the new -e setting 6) Note the exit code is 1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=31345 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org --- Comment #5 from Brendan Lawlor <blawlor@clamsnet.org> --- Tried testing, but not sure if I did it right. Notes: I was able to install the kitchen sink plugin in ktd. I added some lines to the beginning of sub before_send_messages like print "die! " . Data::Dumper::Dumper("dead"); die; Then cd to /koha/misc/cronjobs and run perl process_message_queue.pl Argument "{VERSION}" isn't numeric in int at /kohadevbox/koha/Koha/Plugins/Base.pm line 339. Argument "{VERSION}" isn't numeric in int at /kohadevbox/koha/Koha/Plugins/Base.pm line 339. die!$VAR1 = ' dead'; Died at /kohadevbox/koha_plugin/dev-koha-plugin-kitchen-sink/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm line 605. It doesn't show the exit code but I guess that's what exit code 0 looks like. Applied patch and ran perl -e process_message_queue.pl That didn't output anything, is that what's expected for exit code 1? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> ---
Applied patch and ran perl -e process_message_queue.pl
That didn't output anything, is that what's expected for exit code 1?
After running the command, run: echo $? on the command line and it will give you the exit code of the last command you ran! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Brendan Lawlor <blawlor@clamsnet.org> 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=31345 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155227|0 |1 is obsolete| | --- Comment #7 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 161952 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161952&action=edit Bug 31345 - Add ability to exit process_message_queue.pl early if any plugin before_send_messages hook fails Sometimes it would be better for process_message_queue.pl to stop if a plugin hook fails rather than continue processing. It would be nice if that was a command line option. Test Plan: 1) Install any plugin with a before_send_messages hook 2) Modify the plugin, add a 'die;' statement at the start of the before_send_messages method of the plugin. 3) Run process_message_queue.pl as usual 4) Note the exit code is 0 5) Run it again with the new -e setting 6) Note the exit code is 1 Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 --- Comment #8 from Brendan Lawlor <blawlor@clamsnet.org> --- Cool, that worked. Also found I had the -e option in the wrong place in the command. kohadev-koha@kohadevbox:cronjobs(master)$ perl process_message_queue.pl die! $VAR1 = 'dead'; Died at /kohadevbox/koha_plugin/dev-koha-plugin-kitchen-sink/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm line 211. kohadev-koha@kohadevbox:cronjobs(master)$ echo $? 0 kohadev-koha@kohadevbox:cronjobs(master)$ perl -e process_message_queue.pl kohadev-koha@kohadevbox:cronjobs(master)$ echo $? 0 kohadev-koha@kohadevbox:cronjobs(master)$ perl process_message_queue.pl -e die! $VAR1 = 'dead'; Died at /kohadevbox/koha_plugin/dev-koha-plugin-kitchen-sink/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm line 211. kohadev-koha@kohadevbox:cronjobs(master)$ echo $? 1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 --- Comment #9 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 165712 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165712&action=edit Bug 31345: Add ability to exit process_message_queue.pl early if any plugin before_send_messages hook fails Sometimes it would be better for process_message_queue.pl to stop if a plugin hook fails rather than continue processing. It would be nice if that was a command line option. Test Plan: 1) Install any plugin with a before_send_messages hook 2) Modify the plugin, add a 'die;' statement at the start of the before_send_messages method of the plugin. 3) Run process_message_queue.pl as usual 4) Note the exit code is 0 5) Run it again with the new -e setting 6) Note the exit code is 1 Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Attachment #161952|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |victor@tuxayo.net |y.org | Status|Signed Off |Passed QA --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Works, makes sense, QA script happy, code looks good, passing QA :) --- Fixed commit message format. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|24.05.00 |24.05.00,23.11.06 released in| | Status|Pushed to main |Pushed to stable --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable Version(s)|24.05.00,23.11.06 |24.05.00,23.11.06,23.05.12 released in| | --- Comment #13 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #14 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Could I please get a link to an appropriate plugin and a more detailed test plan if this is required for 22.11? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting --- Comment #15 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31345 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED CC| |david@davidnind.com --- Comment #16 from David Nind <david@davidnind.com> --- No changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org