Bug 28110

Summary: YAML::XS minimum version should be 0.67, not 0.41
Product: Koha Reporter: Julian Maurice <julian.maurice>
Component: Architecture, internals, and plumbingAssignee: Julian Maurice <julian.maurice>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, jonathan.druart, mtj, severine.queune
Version: masterKeywords: dependency
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00
Bug Depends on: 27673    
Bug Blocks:    
Attachments: Bug 28110: Require YAML::XS 0.67
Bug 28110: Require YAML::XS 0.67
Bug 28110: Require YAML::XS 0.67

Description Julian Maurice 2021-04-07 14:38:21 UTC
Bug 27673 lowered the required version of YAML::XS from 0.71 to 0.41, but we use $YAML::XS::Boolean which has been introduced in 0.67.

https://metacpan.org/pod/distribution/YAML-LibYAML/lib/YAML/XS.pod#$YAML::XS::Boolean-(since-v0.67)

Having an older version results in errors while saving ES mappings:

An error occurred when updating Elasticsearch index mappings: Unable to update mappings for index "koha_elastic5_biblios". Reason was: "Could not convert [isbn__sort.index] to boolean". Index needs to be recreated and reindexed.
Comment 1 Julian Maurice 2021-04-07 14:42:11 UTC
Created attachment 119307 [details] [review]
Bug 28110: Require YAML::XS 0.67

$YAML::XS::Boolean, which is used in Koha::SearchEngine::Elasticsearch,
was introduced in 0.67
Comment 2 Jonathan Druart 2021-04-08 09:36:38 UTC
This was done for U16 support.

Mason, can you have a look at this patch please?
Comment 3 Séverine Queune 2021-04-08 12:56:26 UTC
Created attachment 119323 [details] [review]
Bug 28110: Require YAML::XS 0.67

$YAML::XS::Boolean, which is used in Koha::SearchEngine::Elasticsearch,
was introduced in 0.67

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 4 Séverine Queune 2021-04-08 12:57:17 UTC
Thanks Julian for the patch !

I had a similar error since a few days when I tried to reindex with ES :
Unable to update mappings for index "koha_robin_biblios".Reason was: "Could not convert [koha-auth-number.ignore_malformed] to boolean".Index needs to be recreated and reindexed

After I updated the lib lib YAML::XS (sudo cpanm install YAML::XS), and install the patch, reindexation finally worked !

I hope not to interfere Jonathan...
Comment 5 Mason James 2021-04-11 02:22:24 UTC
(In reply to Jonathan Druart from comment #2)
> This was done for U16 support.
> 
> Mason, can you have a look at this patch please?

hi Jonathan, this looks ok to me

i have built a new yaml 0.82 package for U16, from cpan

root@u16:~# apt-cache policy libyaml-libyaml-perl
libyaml-libyaml-perl:
  Installed: (none)
  Candidate: 0.82-1+koha2
  Version table:
     0.82-1+koha2 500
        500 http://debian.koha-community.org/koha stable/xenial amd64 Packages
     0.76+repack-1~bpo9+1 500
        500 http://debian.koha-community.org/koha stable/main amd64 Packages
     0.41-6build1 500
        500 http://apt.kohaaloha.com:3142/ftp.nz.debian.org/ubuntu xenial/main amd64 Packages
Comment 6 Jonathan Druart 2021-04-14 08:25:13 UTC
Created attachment 119549 [details] [review]
Bug 28110: Require YAML::XS 0.67

$YAML::XS::Boolean, which is used in Koha::SearchEngine::Elasticsearch,
was introduced in 0.67

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2021-04-14 13:36:36 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 8 Fridolin Somers 2021-04-19 13:04:27 UTC
Depends on Bug 27673 not in 20.11.x