Bug 28110 - YAML::XS minimum version should be 0.67, not 0.41
Summary: YAML::XS minimum version should be 0.67, not 0.41
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Julian Maurice
QA Contact: Testopia
URL:
Keywords: dependency
Depends on: 27673
Blocks:
  Show dependency treegraph
 
Reported: 2021-04-07 14:38 UTC by Julian Maurice
Modified: 2021-04-21 13:49 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:
21.05.00


Attachments
Bug 28110: Require YAML::XS 0.67 (817 bytes, patch)
2021-04-07 14:42 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 28110: Require YAML::XS 0.67 (967 bytes, patch)
2021-04-08 12:56 UTC, Séverine Queune
Details | Diff | Splinter Review
Bug 28110: Require YAML::XS 0.67 (1.02 KB, patch)
2021-04-14 08:25 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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