[Bug 30738] New: Log warnings in forked CGI MARC import
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30738 Bug ID: 30738 Summary: Log warnings in forked CGI MARC import Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: MARC Bibliographic record staging/import Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org While most of Koha can use Plack/PSGI these days, there are still a few CGI scripts like "manage-marc-import.pl". This script forks itself in order to run in the background, and in so doing it closes STDOUT and STDERR to tell Apache not to control it anymore. (One day I hope to make this use the RabbitMQ, but that day is not today.) Unfortunately, this means warnings get suppressed. I've noticed cases (usually with items) where a fatal error causes the import to fail (with the batch stuck in "Importing" with a 0% job progress bar) and there are no warnings in the logs! Very frustrating! But we can use Koha::Logger to save the day... -- 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=30738 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30739 -- 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=30738 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28152 -- 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=30738 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=30738 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 134911 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134911&action=edit Bug 30738: Log warnings for background MARC import This change logs warnings from the CGI background MARC import. Test plan: 0) Apply patch 1) Export a record with an item 2) Update the 952$f subfield to "Circulation" (any value over 10 chars) 3) Import the record and try to add the item 4) The import will stay stuck with "Importing" status and 0% job progress 5) Check the /var/log/koha/kohadev/intranet-error.log file and notice there's an error with the following text: "Data too long for column 'coded_location_qualifier' at row 1" -- 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=30738 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |dcook@prosentient.com.au |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=30738 David Nind <david@davidnind.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=30738 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134911|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 134941 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134941&action=edit Bug 30738: Log warnings for background MARC import This change logs warnings from the CGI background MARC import. Test plan: 0) Apply patch 1) Export a record with an item 2) Update the 952$f subfield to "Circulation" (any value over 10 chars) 3) Import the record and try to add the item 4) The import will stay stuck with "Importing" status and 0% job progress 5) Check the /var/log/koha/kohadev/intranet-error.log file and notice there's an error with the following text: "Data too long for column 'coded_location_qualifier' at row 1" Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30738 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- Thanks David! I feel like this one would be useful to a lot of people... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30738 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=30738 Nick Clemens <nick@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=30738 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134941|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 135266 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135266&action=edit Bug 30738: Log warnings for background MARC import This change logs warnings from the CGI background MARC import. Test plan: 0) Apply patch 1) Export a record with an item 2) Update the 952$f subfield to "Circulation" (any value over 10 chars) 3) Import the record and try to add the item 4) The import will stay stuck with "Importing" status and 0% job progress 5) Check the /var/log/koha/kohadev/intranet-error.log file and notice there's an error with the following text: "Data too long for column 'coded_location_qualifier' at row 1" Signed-off-by: David Nind <david@davidnind.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=30738 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Note, this does what the title says, it logs warnings, errors like on 28152 are not logged -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30738 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Log warnings in forked CGI |Forked CGI MARC import |MARC import |warnings are not logged CC| |tomascohen@gmail.com Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30738 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.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=30738 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org