The script to link biblios to authorities can encounter search errors. Currently the script simply dies on this error. It would be more useful to log the problem and continue the linking process.
Created attachment 157738 [details] [review] Bug 35141: Catch ES search exceptions in link_bibs_to_authorities, warn, and continue This patch simplay adds an eval and a warning to link_bibs_to_authorities to catch any errors while searching and continue linking. To test: 1 - edit /etc/kohia/sites/kohadev/koha-conf.xml and add to elasticsearch stanza <request_timeout>0</request_timeout> 2 - perl misc/link_bibs_to_authorities.pl 3 - It dies immediately 4 - Apply patch 5 - perl misc/link_bibs_to_authorities.pl 6 - Now it tries every record, throwing warnings along the way, but completes
Created attachment 157739 [details] [review] Bug 35141: Prevent link_bibs_to_authorities from dying on invalid metadata When fetching the record we need to eval in case of exception To test: 1 - Apply first patch 2 - perl misc/link_bibs_to_authorities.pl 3 - Note it dies on parser error at record 369 4 - Apply this patch 5 - perl misc/link_bibs_to_authorities.pl 6 - The process completes - with warning thrown on record 369
Created attachment 157766 [details] [review] Bug 35141: Catch ES search exceptions in link_bibs_to_authorities, warn, and continue This patch simplay adds an eval and a warning to link_bibs_to_authorities to catch any errors while searching and continue linking. To test: 1 - edit /etc/kohia/sites/kohadev/koha-conf.xml and add to elasticsearch stanza <request_timeout>0</request_timeout> 2 - perl misc/link_bibs_to_authorities.pl 3 - It dies immediately 4 - Apply patch 5 - perl misc/link_bibs_to_authorities.pl 6 - Now it tries every record, throwing warnings along the way, but completes Signed-off-by: David Nind <david@davidnind.com>
Created attachment 157767 [details] [review] Bug 35141: Prevent link_bibs_to_authorities from dying on invalid metadata When fetching the record we need to eval in case of exception To test: 1 - Apply first patch 2 - perl misc/link_bibs_to_authorities.pl 3 - Note it dies on parser error at record 369 4 - Apply this patch 5 - perl misc/link_bibs_to_authorities.pl 6 - The process completes - with warning thrown on record 369 Signed-off-by: David Nind <david@davidnind.com>
Filled Assignee :)
Looking here
Created attachment 157972 [details] [review] Bug 35141: Catch ES search exceptions in link_bibs_to_authorities, warn, and continue This patch simplay adds an eval and a warning to link_bibs_to_authorities to catch any errors while searching and continue linking. To test: 1 - edit /etc/kohia/sites/kohadev/koha-conf.xml and add to elasticsearch stanza <request_timeout>0</request_timeout> 2 - perl misc/link_bibs_to_authorities.pl 3 - It dies immediately 4 - Apply patch 5 - perl misc/link_bibs_to_authorities.pl 6 - Now it tries every record, throwing warnings along the way, but completes Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 157973 [details] [review] Bug 35141: Prevent link_bibs_to_authorities from dying on invalid metadata When fetching the record we need to eval in case of exception To test: 1 - Apply first patch 2 - perl misc/link_bibs_to_authorities.pl 3 - Note it dies on parser error at record 369 4 - Apply this patch 5 - perl misc/link_bibs_to_authorities.pl 6 - The process completes - with warning thrown on record 369 Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 157974 [details] [review] Bug 35141: (QA follow-up) Increment the bad count Also move earlier print to warn for consistency. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to 23.05.x for 23.05.06
Nice work everyone! Pushed to oldstable for 22.11.x