[Bug 24367] New: With strict enabled, Search.t is too verbose
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24367 Bug ID: 24367 Summary: With strict enabled, Search.t is too verbose Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 24217 There are tons of warnings displayed when running Search.t Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24217 [Bug 24217] use strict for all modules -- 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=24367 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 96911 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96911&action=edit Bug 24367: Remove warning from Search.t Not done yet. -- 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=24367 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96911|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 97096 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97096&action=edit Bug 24367: Remove warning from Search.t Not done yet. -- 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=24367 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 97097 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97097&action=edit Bug 24367: DO NOT PUSH - update MARC records for tests The idea was to set the itemtype to a valid value (BK instead of BOOK) The exported_records was generated like: * add 942$c=MX when no 942$c exist * replace 942$c=BOOK with 942$c=BK But it did not remove remaining warnings -- 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=24367 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl, | |nick@bywatersolutions.com, | |tomascohen@gmail.com --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I need help for this one. -- 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=24367 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 97157 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97157&action=edit Bug 24367: Resolve warn Argument available is not numeric in delete Argument "available" isn't numeric in delete at /usr/share/koha/C4/Search.pm line 1480. The construction delete array[string] simply does not work. -- 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=24367 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 97158 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97158&action=edit Bug 24367: Resolve warn Negative repeat count does nothing Negative repeat count does nothing at /usr/share/koha/Koha/QueryParser/Driver/PQF/query_plan.pm line 53. Negative repeat count does nothing at /usr/share/koha/Koha/QueryParser/Driver/PQF/query_plan/node.pm line 102. I am not sure if this statement actually does what the author intended, but adding the test on node_count/atom_count removes the warn. Repeating this change on query_plan.pm line 62. -- 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=24367 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Had 42 warnings, now 28 left. Still working. -- 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=24367 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 97159 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97159&action=edit Bug 24367: Resolve warn Use of uninitialized value within [arrays] Use of uninitialized value within @operators in string eq at /usr/share/koha/C4/Search.pm line 1362. Use of uninitialized value within @indexes in pattern match (m//) at /usr/share/koha/C4/Search.pm line 1367. Trivial tests added. -- 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=24367 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 97163 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97163&action=edit Bug 24367: Resolve other uninitialized warns in Search.pm Use of uninitialized value in hash element at /usr/share/koha/C4/Search.pm line 2074. Use of uninitialized value in hash element at /usr/share/koha/C4/Search.pm line 2137. Use of uninitialized value in concatenation (.) or string at /usr/share/koha/C4/Search.pm line 2189. Use of uninitialized value in hash element at /usr/share/koha/C4/Search.pm line 2213. Use of uninitialized value in hash element at /usr/share/koha/C4/Search.pm line 2215. Use of uninitialized value in hash element at /usr/share/koha/C4/Search.pm line 2225. Use of uninitialized value in hash element at /usr/share/koha/C4/Search.pm line 2226. -- 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=24367 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- The last path silences them all but contains a few arguable ones. Should we silence ones where an itemtype should be filled? -- 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=24367 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #10)
The last path silences them all but contains a few arguable ones. Should we silence ones where an itemtype should be filled?
Even with the patch from comment 3? -- 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=24367 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #11)
(In reply to Marcel de Rooy from comment #10)
The last path silences them all but contains a few arguable ones. Should we silence ones where an itemtype should be filled?
Even with the patch from comment 3?
Yes on top of the first. I tested a bit with/without the second. -- 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=24367 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- This is ready for testing. Test plan: Confirm that Search.t does not output warnings Eyeball the patch and try to catch possible regressions -- 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=24367 Bug 24367 depends on bug 24217, which changed state. Bug 24217 Summary: use strict for all modules https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24217 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- 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=24367 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.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=24367 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I still see one final warning: Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/C4/Search.pm line 1818. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24367 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Martin Renvoize from comment #14)
I still see one final warning:
Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/C4/Search.pm line 1818.
I don't have this one, how did you get it? kohadev-koha@b2404290bde5:/kohadevbox/koha$ prove t/db_dependent/Search.t t/db_dependent/Search.t .. ok All tests successful. Files=1, Tests=2, 12 wallclock secs ( 0.04 usr 0.01 sys + 7.26 cusr 1.60 csys = 8.91 CPU) Result: PASS -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24367 --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Interesting.. I got it by just running that one test in koha-testing-docker on stretch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24367 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 99113 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99113&action=edit Bug 24367: May fix another warning May fix the following warning: Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/C4/Search.pm line 1818. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24367 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #17)
Created attachment 99113 [details] [review] Bug 24367: May fix another warning
May fix the following warning: Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/C4/Search.pm line 1818.
Martin, this patch may fix the warning you got. But I am not sure we push it if you are the only one to have it. We should confirm with someone else. I tried with ES and Zebra, and both passed without warning without this patch applied. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24367 --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Lets push without that final patch.. hopefully it was just a blip on my system. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24367 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24367 --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24367 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |joy@bywatersolutions.com Status|Pushed to master |RESOLVED --- Comment #21 from Joy Nelson <joy@bywatersolutions.com> --- not backported due to missing dependencies -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org