[Bug 31883] New: t::lib::QA::TemplateFilters missing built-in TT filter "trim" causes false warnings
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Bug ID: 31883 Summary: t::lib::QA::TemplateFilters missing built-in TT filter "trim" causes false warnings Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: mtj@kohaaloha.com QA Contact: testopia@bugs.koha-community.org info coming... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 --- Comment #1 from Mason James <mtj@kohaaloha.com> --- Created attachment 142218 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142218&action=edit Bug 31883: t::lib::QA::TemplateFilters missing built-in TT filter "trim" causes false warnings to test... 1/ checkout latest master 2/ prove xt/find-missing-filters.t xt/find-missing-filters.t .. 1/1 # Failed test 'Template variables should be correctly escaped' # at xt/find-missing-filters.t line 59. # got: '1' # expected: '0' # $VAR1 = { # 'errors' => [ # { # 'error' => 'missing_filter', # 'line' => ' [% messages = INCLUDE \'patron_messages.inc\' moremember = 1 | trim %]', # 'line_number' => 97 # } # ], # 'file' => 'koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt' # }; # Looks like you failed 1 test of 1. 3/ apply patch 4/ prove xt/find-missing-filters.t xt/find-missing-filters.t .. ok All tests successful. Files=1, Tests=1, 2 wallclock secs ( 0.03 usr 0.01 sys + 2.15 cusr 0.07 csys = 2.26 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=31883 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Priority|P5 - low |P1 - high CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Mason, thanks for the patch! I thought of a similar patch, but kept thinking a variable assignment shouldn't be forced to have a filter, and so was in doubt about it. I'm happy to go with this regardless. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- I followed the test plan and everything works. For some reason I can't sign off like I normally do (git bz attach -e 31883 HEAD). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 --- Comment #4 from David Nind <david@davidnind.com> --- I can sign off other bugs, so maybe something wrong with this one? This is the message I'm getting when I go git bz attach -e 31883 HEAD (after a git so 1): git bz attach -e 31883 HEAD /usr/bin/git-bz:1908: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal obsoleted = (initial_description == patch.description) Traceback (most recent call last): File "/usr/bin/git-bz", line 2722, in <module> do_attach(*args) File "/usr/bin/git-bz", line 2074, in do_attach attach_commits(bug, commits, edit_comments=global_options.edit) File "/usr/bin/git-bz", line 1988, in attach_commits description, body, obsoletes, statuses, patch_complexities, depends = edit_attachment_comment(bug, commit.subject, body) File "/usr/bin/git-bz", line 1940, in edit_attachment_comment lines = edit_template(template.getvalue()) File "/usr/lib/python2.7/StringIO.py", line 271, in getvalue self.buf += ''.join(self.buflist) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3: ordinal not in range(128) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Same here UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3: ordinal not in range(128) Will edit commit message now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |normal --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Lowering severity. Critical is really another category :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Not sure whats going on here. Please resubmit a new version. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- It seems to be another general issue? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #8)
It seems to be another general issue?
No. I refreshed my container. Could git attach again. But after applying this patch, we see our friend again: /usr/local/bin/git-bz:1908: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal obsoleted = (initial_description == patch.description) Traceback (most recent call last): File "/usr/local/bin/git-bz", line 2722, in <module> do_attach(*args) File "/usr/local/bin/git-bz", line 2074, in do_attach attach_commits(bug, commits, edit_comments=global_options.edit) File "/usr/local/bin/git-bz", line 1988, in attach_commits description, body, obsoletes, statuses, patch_complexities, depends = edit_attachment_comment(bug, commit.subject, body) File "/usr/local/bin/git-bz", line 1940, in edit_attachment_comment lines = edit_template(template.getvalue()) File "/usr/lib/python2.7/StringIO.py", line 271, in getvalue self.buf += ''.join(self.buflist) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3: ordinal not in range(128) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|t::lib::QA::TemplateFilters |Filter trim causes false |missing built-in TT filter |warnings |"trim" causes false | |warnings | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142218|0 |1 is obsolete| | --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Comment on attachment 142218 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142218 Bug 31883: t::lib::QA::TemplateFilters missing built-in TT filter "trim" causes false warnings Ttile of bug report and attachment name cause(d) Unicode issues -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 142235 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142235&action=edit Filter trim causes false warnings -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 142236 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142236&action=edit Bug 31883: t::lib::QA::TemplateFilters missing built-in TT filter "trim" causes false warnings to test... 1/ checkout latest master 2/ prove xt/find-missing-filters.t xt/find-missing-filters.t .. 1/1 # Failed test 'Template variables should be correctly escaped' # at xt/find-missing-filters.t line 59. # got: '1' # expected: '0' # $VAR1 = { # 'errors' => [ # { # 'error' => 'missing_filter', # 'line' => ' [% messages = INCLUDE \'patron_messages.inc\' moremember = 1 | trim %]', # 'line_number' => 97 # } # ], # 'file' => 'koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt' # }; # Looks like you failed 1 test of 1. 3/ apply patch 4/ prove xt/find-missing-filters.t xt/find-missing-filters.t .. ok All tests successful. Files=1, Tests=1, 2 wallclock secs ( 0.03 usr 0.01 sys + 2.15 cusr 0.07 csys = 2.26 CPU) Result: PASS <<<<<<<<<<<<<<< Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Attachment #142235|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142236|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 142237 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142237&action=edit Bug 31883: Filter trim causes false warnings Test plan: Run xt/find-missing-filters.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #142237|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 142238 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=142238&action=edit Bug 31883: Filter trim causes false warnings Test plan: Run xt/find-missing-filters.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com Version(s)|22.11.00 |22.11.00, 22.05.08 released in| | --- Comment #16 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com Status|Pushed to stable |Pushed to oldstable Version(s)|22.11.00, 22.05.08 |22.11.00, 22.05.08, released in| |21.11.15 --- Comment #17 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11 for 21.11.15 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31883 wainuiwitikapark@catalyst.net.nz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #18 from wainuiwitikapark@catalyst.net.nz --- Not backported to 21.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org