Bug 32065 - Invalid YAML for some system preferences
Summary: Invalid YAML for some system preferences
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 31886 31952
Blocks:
  Show dependency treegraph
 
Reported: 2022-11-02 01:57 UTC by Victor Grousset/tuxayo
Modified: 2022-11-27 04:18 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Grousset/tuxayo 2022-11-02 01:57:43 UTC
Follow up are needed here after bug 31952 and bug 31886

CI caught this:
(https://jenkins.koha-community.org/view/master/job/Koha_Master_U18/1639/consoleText)

koha_1       | #   Failed test '/kohadevbox/koha/xt/../koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref is YAML'
koha_1       | #   at xt/yaml_valid.t line 41.
koha_1       | 
koha_1       | #   Failed test '/kohadevbox/koha/xt/../koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/local_use.pref is YAML'
koha_1       | #   at xt/yaml_valid.t line 41.
koha_1       | 
koha_1       | #   Failed test '/kohadevbox/koha/xt/../koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref is YAML'
koha_1       | #   at xt/yaml_valid.t line 41.
koha_1       | # Looks like you failed 3 tests of 17.
Comment 1 Katrin Fischer 2022-11-02 13:10:55 UTC
The test isn't failing for me on master. Is this maybe fixed already?
Comment 2 Victor Grousset/tuxayo 2022-11-07 04:08:26 UTC
It's only happening the Ubuntu 18.04 on the CI
Which I also happen to use, let's try.

Confirmed!
Maybe the YAML is valid and the particular version of the OS of the failing build has a bug. Checking against external tools and YAML specs might be needed to be sure what's wrong.

root@kohadevbox:koha((2200b4aa3d...))$ prove xt/yaml_valid.t 
xt/yaml_valid.t .. 1/18 
#   Failed test '/kohadevbox/koha/xt/../koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref is YAML'
#   at xt/yaml_valid.t line 41.

#   Failed test '/kohadevbox/koha/xt/../koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref is YAML'
#   at xt/yaml_valid.t line 41.

#   Failed test '/kohadevbox/koha/xt/../koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/local_use.pref is YAML'
#   at xt/yaml_valid.t line 41.
# Looks like you failed 3 tests of 18.
xt/yaml_valid.t .. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/18 subtests 

Test Summary Report
-------------------
xt/yaml_valid.t (Wstat: 768 Tests: 18 Failed: 3)
  Failed tests:  9, 15, 17
  Non-zero exit status: 3
Files=1, Tests=18,  1 wallclock secs ( 0.03 usr  0.00 sys +  0.62 cusr  0.02 csys =  0.67 CPU)
Result: FAIL
Comment 3 Katrin Fischer 2022-11-17 12:39:53 UTC
(In reply to Victor Grousset/tuxayo from comment #2)
> It's only happening the Ubuntu 18.04 on the CI
> Which I also happen to use, let's try.
> 
> Confirmed!
> Maybe the YAML is valid and the particular version of the OS of the failing
> build has a bug. Checking against external tools and YAML specs might be
> needed to be sure what's wrong.
> 
> root@kohadevbox:koha((2200b4aa3d...))$ prove xt/yaml_valid.t 
> xt/yaml_valid.t .. 1/18 
> #   Failed test
> '/kohadevbox/koha/xt/../koha-tmpl/intranet-tmpl/prog/en/modules/admin/
> preferences/i18n_l10n.pref is YAML'
> #   at xt/yaml_valid.t line 41.
> 
> #   Failed test
> '/kohadevbox/koha/xt/../koha-tmpl/intranet-tmpl/prog/en/modules/admin/
> preferences/serials.pref is YAML'
> #   at xt/yaml_valid.t line 41.
> 
> #   Failed test
> '/kohadevbox/koha/xt/../koha-tmpl/intranet-tmpl/prog/en/modules/admin/
> preferences/local_use.pref is YAML'
> #   at xt/yaml_valid.t line 41.
> # Looks like you failed 3 tests of 18.
> xt/yaml_valid.t .. Dubious, test returned 3 (wstat 768, 0x300)
> Failed 3/18 subtests 
> 
> Test Summary Report
> -------------------
> xt/yaml_valid.t (Wstat: 768 Tests: 18 Failed: 3)
>   Failed tests:  9, 15, 17
>   Non-zero exit status: 3
> Files=1, Tests=18,  1 wallclock secs ( 0.03 usr  0.00 sys +  0.62 cusr  0.02
> csys =  0.67 CPU)
> Result: FAIL

Hm I cannot test that. How should we proceed here and does only the test fail or are there also issues in the GUI?
Comment 4 Victor Grousset/tuxayo 2022-11-27 04:18:02 UTC
> Hm I cannot test that

This should work:
cd stuff/cats/world-domination-plan/koha-testing-docker-directory ; KOHA_IMAGE=master-bionic bin/ktd up


> How should we proceed here and does only the test fail or are there also issues in the GUI?

Good question, I didn't check which UI action access this data. Even if it's a bug in the version of some YAML lib in Ubuntu 18.04 (and so the YAML is valid) it's possible that it causes an issue when Koha on Ubuntu 18.04 tries to access the data with that same lib.