Skip Menu |

This queue is for tickets about the Tapper-CLI CPAN distribution.

Report information
The Basics
Id: 93985
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: Tapper-CLI

People
Owner: CALDRIN [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 4.1.3
Fixed in: (no value)



Subject: Issues with perl 5.18.0 and newer
Since perl 5.18.0 the test suite fails. See: http://matrix.cpantesters.org/?dist=Tapper-CLI%204.1.3 Regards, Slaven
Am Di 18. Mär 2014, 17:11:32, SREZIC schrieb: Show quoted text
> Since perl 5.18.0 the test suite fails. See: > http://matrix.cpantesters.org/?dist=Tapper-CLI%204.1.3
Current state of the investigation suggests that this is actually a false negative. The given/when warning messes with the output we compare. We are working on this.
On 2014-03-18 17:23:19, CALDRIN wrote: Show quoted text
> Am Di 18. Mär 2014, 17:11:32, SREZIC schrieb:
> > Since perl 5.18.0 the test suite fails. See: > > http://matrix.cpantesters.org/?dist=Tapper-CLI%204.1.3
> > Current state of the investigation suggests that this is actually a > false negative. The given/when warning messes with the output we > compare.
I also thought this, but after adding everywhere "use experimental 'smartmatch'" there are some SQL::Abstract-related errors: # SQL::Abstract::puke(): [SQL::Abstract::__ANON__] Fatal: SQL::Abstract before v1.75 used to generate incorrect SQL when the -IN operator was given an undef-containing list: !!!AUDIT YOUR CODE AND DATA!!! (the upcoming Data::Query-based version of SQL::Abstract will emit the logically correct SQL instead of raising this exception) at lib/Tapper/CLI/Host.pm line 179 t/tapper-cli-queue.t .......... 4/? SQL::Abstract::puke(): [SQL::Abstract::__ANON__] Fatal: SQL::Abstract before v1.75 used to generate incorrect SQL when the -IN operator was given an undef-containing list: !!!AUDIT YOUR CODE AND DATA!!! (the upcoming Data::Query-based version of SQL::Abstract will emit the logically correct SQL instead of raising this exception) at lib/Tapper/CLI/Testrun/Command/listqueue.pm line 128 Regards, Slaven
On 2014-03-19 04:19:07, SREZIC wrote: Show quoted text
> On 2014-03-18 17:23:19, CALDRIN wrote:
> > Am Di 18. Mär 2014, 17:11:32, SREZIC schrieb:
> > > Since perl 5.18.0 the test suite fails. See: > > > http://matrix.cpantesters.org/?dist=Tapper-CLI%204.1.3
> > > > Current state of the investigation suggests that this is actually a > > false negative. The given/when warning messes with the output we > > compare.
> > I also thought this, but after adding everywhere "use experimental > 'smartmatch'" there are some SQL::Abstract-related errors: > > # SQL::Abstract::puke(): [SQL::Abstract::__ANON__] Fatal: > SQL::Abstract before v1.75 used to generate incorrect SQL when the -IN > operator was given an undef-containing list: !!!AUDIT YOUR CODE AND > DATA!!! (the upcoming Data::Query-based version of SQL::Abstract will > emit the logically correct SQL instead of raising this exception) at > lib/Tapper/CLI/Host.pm line 179 > > t/tapper-cli-queue.t .......... 4/? SQL::Abstract::puke(): > [SQL::Abstract::__ANON__] Fatal: SQL::Abstract before v1.75 used to > generate incorrect SQL when the -IN operator was given an undef- > containing list: !!!AUDIT YOUR CODE AND DATA!!! (the upcoming > Data::Query-based version of SQL::Abstract will emit the logically > correct SQL instead of raising this exception) at > lib/Tapper/CLI/Testrun/Command/listqueue.pm line 128
... and the same thing happens also with perl 5.16.3. So maybe it's not an issue with 5.18.x. Regards, Slaven
Subject: Re: [rt.cpan.org #93985] Issues with perl 5.18.0 and newer
Date: Wed, 16 Apr 2014 19:50:33 +0200
To: bug-Tapper-CLI [...] rt.cpan.org
From: Maik Hentsche <caldrin [...] mm-double.de>
Slaven_Rezic via RT wrote: Show quoted text
> > # SQL::Abstract::puke(): [SQL::Abstract::__ANON__] Fatal: > > SQL::Abstract before v1.75 used to generate incorrect SQL when the > > -IN operator was given an undef-containing list: !!!AUDIT YOUR CODE > > AND DATA!!! (the upcoming Data::Query-based version of > > SQL::Abstract will emit the logically correct SQL instead of > > raising this exception) at lib/Tapper/CLI/Host.pm line 179
Got it. SQL::Abstract is (intentionally) broken. So obviously there was a bug in SQL::Abstract. To make people aware of this bug, newer SQL::Abstract versions simply die and ask you to audit code and data. I did the audit - as far as I can tell, we are not affected. Still there is no way to get rid of the die. So the only solution is to install an older SQL::Abstract with cpanm http://search.cpan.org/CPAN/authors/id/R/RI/RIBASUSHI/SQL-Abstract-1.74.tar.gz Yes, we know of the bug in this version. We are not affected by this bug. so long Maik
Hello. I encounter same problem. % git clone https://github.com/tapper/Tapper-CLI.git % cd Tapper-CLI % git tag v4.1.3 % prove -I lib t/ t/00-load.t ................... ok t/tapper-cli-host.t ........... 15/? # Failed test 'Show hosts / queue' # at t/tapper-cli-host.t line 66. # 'SQL::Abstract::puke(): [SQL::Abstract::__ANON__] Fatal: SQL::Abstract before v1.75 used to generate incorrect SQL when the -IN operator was given an undef- containing list: !!!AUDIT YOUR CODE AND DATA!!! (the upcoming Data::Query-based version of SQL::Abstract will emit the logically correct SQL instead of raising this exception) at lib/Tapper/CLI/Host.pm line 220 # ' # doesn't match '(?^:11 *| *host2\n *12 *| *host3\n)' t/tapper-cli-host.t ........... 33/? # Looks like you failed 1 test of 33. t/tapper-cli-host.t ........... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/33 subtests t/tapper-cli-hostfeature.t .... 12/? # Use --really to delete feature for host 'host1': mem = 4096 t/tapper-cli-hostfeature.t .... ok t/tapper-cli-interdep.t ....... ok t/tapper-cli-notification.t ... # 1 t/tapper-cli-notification.t ... ok t/tapper-cli-precondition.t ... ok t/tapper-cli-queue.t .......... 4/? SQL::Abstract::puke(): [SQL::Abstract::__ANON__] Fatal: SQL::Abstract before v1.75 used to generate incorrect SQL when the -IN operator was given an undef-containing list: !!!AUDIT YOUR CODE AND DATA!!! (the upcoming Data::Query-based version of SQL::Abstract will emit the logically correct SQL instead of raising t his exception) at lib/Tapper/CLI/Testrun/Command/listqueue.pm line 121 t/tapper-cli-queue.t .......... 5/? # Failed test 'List queues' # at t/tapper-cli-queue.t line 29. # got: '' # expected: 'Id: 2 # Name: KVM # Priority: 200 # Active: no # Bound hosts: host3 # # ******************************************************************************** # Id: 1 # Name: Xen # Priority: 300 # Active: no # Bound hosts: host3 # # ******************************************************************************** # ' SQL::Abstract::puke(): [SQL::Abstract::__ANON__] Fatal: SQL::Abstract before v1.75 used to generate incorrect SQL when the -IN operator was given an undef-containing list: !!!A UDIT YOUR CODE AND DATA!!! (the upcoming Data::Query-based version of SQL::Abstract will emit the logically correct SQL instead of raising this exception) at lib/Tapper/CLI/Tes trun/Command/listqueue.pm line 121 # Failed test 'Queued testruns in listqueue' # at t/tapper-cli-queue.t line 35. # got: '' # expected: 'Id: 3 # Name: Kernel # Priority: 10 # Active: no # Queued testruns (ids): 3001, 3002 # # ******************************************************************************** # ' t/tapper-cli-queue.t .......... 10/? # Looks like you failed 2 tests of 11. t/tapper-cli-queue.t .......... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/11 subtests t/tapper-cli-testplan.t ....... ok t/tapper-cli-testrun-small.t .. Use of uninitialized value in anonymous hash ({}) at /home/bokutin/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/Object/Enum.pm line 160. t/tapper-cli-testrun-small.t .. ok t/tapper-cli-testrun.t ........ 14/? Use of uninitialized value in anonymous hash ({}) at /home/bokutin/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/Object/Enum.pm line 160. t/tapper-cli-testrun.t ........ ok Test Summary Report ------------------- t/tapper-cli-host.t (Wstat: 256 Tests: 33 Failed: 1) Failed test: 15 Non-zero exit status: 1 t/tapper-cli-queue.t (Wstat: 512 Tests: 11 Failed: 2) Failed tests: 5-6 Non-zero exit status: 2 Files=10, Tests=168, 71 wallclock secs ( 0.09 usr 0.00 sys + 59.36 cusr 5.85 csys = 65.30 CPU) Result: FAIL I found the following. http://cpansearch.perl.org/src/RIBASUSHI/SQL-Abstract-1.77/Changes revision 1.75 2013-12-27 ---------------------------- - *UPCOMING INCOMPATIBLE BUGFIX*: SQLA used to generate incorrect SQL on undef-containing lists fed to -in and -not_in. An exception will be raised for a while before properly fixing this, to avoid quiet but subtle changes to query results in production % vim % git diff diff --git a/lib/Tapper/CLI/Host.pm b/lib/Tapper/CLI/Host.pm index fb7bd3a..4f393b8 100644 --- a/lib/Tapper/CLI/Host.pm +++ b/lib/Tapper/CLI/Host.pm @@ -130,7 +130,7 @@ sub select_hosts my %options= (order_by => 'name'); my %search; $search{active} = 1 if $opt->{active}; - $search{is_deleted} = {-in => [ 0, undef ] } unless $opt->{all}; + $search{is_deleted} = [ 0, undef ] unless $opt->{all}; $search{free} = 1 if $opt->{free}; # ignore all options if host is requested by name diff --git a/lib/Tapper/CLI/Testrun/Command/listqueue.pm b/lib/Tapper/CLI/Testrun/Command/listqueue.pm index af225f7..b9da1b7 100644 --- a/lib/Tapper/CLI/Testrun/Command/listqueue.pm +++ b/lib/Tapper/CLI/Testrun/Command/listqueue.pm @@ -80,7 +80,7 @@ sub execute { my ($self, $opt, $args) = @_; my %options= (order_by => 'name'); my %search; - $search{is_deleted} = {-in => [ 0, undef ] } unless $opt->{all}; + $search{is_deleted} = [ 0, undef ] unless $opt->{all}; if ($opt->{minprio} and $opt->{maxprio}) { $search{"-and"} = [ priority => {'>=' => $opt->{minprio}}, priority => {'<=' => $opt->{maxprio}}]; } else { % prove -I lib t t/00-load.t ................... ok t/tapper-cli-host.t ........... ok t/tapper-cli-hostfeature.t .... 12/? # Use --really to delete feature for host 'host1': mem = 4096 t/tapper-cli-hostfeature.t .... ok t/tapper-cli-interdep.t ....... ok t/tapper-cli-notification.t ... # 1 t/tapper-cli-notification.t ... ok t/tapper-cli-precondition.t ... ok t/tapper-cli-queue.t .......... ok t/tapper-cli-testplan.t ....... ok t/tapper-cli-testrun-small.t .. Use of uninitialized value in anonymous hash ({}) at /home/bokutin/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/Object/Enum.pm line 160. t/tapper-cli-testrun-small.t .. ok t/tapper-cli-testrun.t ........ 14/? Use of uninitialized value in anonymous hash ({}) at /home/bokutin/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/Object/Enum.pm line 160. t/tapper-cli-testrun.t ........ ok All tests successful. Files=10, Tests=168, 71 wallclock secs ( 0.06 usr 0.03 sys + 59.48 cusr 5.88 csys = 65.46 CPU) Result: PASS
Thanks, bokutin@, patch applied and uploaded as v4.1.5. Steffen On Tue May 06 12:56:23 2014, bokutin wrote: Show quoted text
> Hello. > > I encounter same problem. > > % git clone https://github.com/tapper/Tapper-CLI.git > % cd Tapper-CLI > % git tag v4.1.3 > % prove -I lib t/ > t/00-load.t ................... ok > t/tapper-cli-host.t ........... 15/? > # Failed test 'Show hosts / queue' > # at t/tapper-cli-host.t line 66. > # 'SQL::Abstract::puke(): [SQL::Abstract::__ANON__] > Fatal: SQL::Abstract before v1.75 used to generate incorrect SQL when > the -IN operator was given an undef- > containing list: !!!AUDIT YOUR CODE AND DATA!!! (the upcoming > Data::Query-based version of SQL::Abstract will emit the logically > correct SQL instead of raising this exception) > at lib/Tapper/CLI/Host.pm line 220 > # ' > # doesn't match '(?^:11 *| *host2\n *12 *| *host3\n)' > t/tapper-cli-host.t ........... 33/? # Looks like you failed 1 test of > 33. > t/tapper-cli-host.t ........... Dubious, test returned 1 (wstat 256, > 0x100) > Failed 1/33 subtests > t/tapper-cli-hostfeature.t .... 12/? # Use --really to delete feature > for host 'host1': mem = 4096 > t/tapper-cli-hostfeature.t .... ok > t/tapper-cli-interdep.t ....... ok > t/tapper-cli-notification.t ... # 1 > t/tapper-cli-notification.t ... ok > t/tapper-cli-precondition.t ... ok > t/tapper-cli-queue.t .......... 4/? SQL::Abstract::puke(): > [SQL::Abstract::__ANON__] Fatal: SQL::Abstract before v1.75 used to > generate incorrect SQL when the -IN operator was > given an undef-containing list: !!!AUDIT YOUR CODE AND DATA!!! (the > upcoming Data::Query-based version of SQL::Abstract will emit the > logically correct SQL instead of raising t > his exception) at lib/Tapper/CLI/Testrun/Command/listqueue.pm line 121 > t/tapper-cli-queue.t .......... 5/? > # Failed test 'List queues' > # at t/tapper-cli-queue.t line 29. > # got: '' > # expected: 'Id: 2 > # Name: KVM > # Priority: 200 > # Active: no > # Bound hosts: host3 > # > # > ******************************************************************************** > # Id: 1 > # Name: Xen > # Priority: 300 > # Active: no > # Bound hosts: host3 > # > # > ******************************************************************************** > # ' > SQL::Abstract::puke(): [SQL::Abstract::__ANON__] Fatal: SQL::Abstract > before v1.75 used to generate incorrect SQL when the -IN operator was > given an undef-containing list: !!!A > UDIT YOUR CODE AND DATA!!! (the upcoming Data::Query-based version of > SQL::Abstract will emit the logically correct SQL instead of raising > this exception) at lib/Tapper/CLI/Tes > trun/Command/listqueue.pm line 121 > > # Failed test 'Queued testruns in listqueue' > # at t/tapper-cli-queue.t line 35. > # got: '' > # expected: 'Id: 3 > # Name: Kernel > # Priority: 10 > # Active: no > # Queued testruns (ids): 3001, 3002 > # > # > ******************************************************************************** > # ' > t/tapper-cli-queue.t .......... 10/? # Looks like you failed 2 tests > of 11. > t/tapper-cli-queue.t .......... Dubious, test returned 2 (wstat 512, > 0x200) > Failed 2/11 subtests > t/tapper-cli-testplan.t ....... ok > t/tapper-cli-testrun-small.t .. Use of uninitialized value in > anonymous hash ({}) at /home/bokutin/perl5/perlbrew/perls/perl- > 5.16.3/lib/site_perl/5.16.3/Object/Enum.pm line 160. > t/tapper-cli-testrun-small.t .. ok > t/tapper-cli-testrun.t ........ 14/? Use of uninitialized value in > anonymous hash ({}) at /home/bokutin/perl5/perlbrew/perls/perl- > 5.16.3/lib/site_perl/5.16.3/Object/Enum.pm line 160. > t/tapper-cli-testrun.t ........ ok > > Test Summary Report > ------------------- > t/tapper-cli-host.t (Wstat: 256 Tests: 33 Failed: 1) > Failed test: 15 > Non-zero exit status: 1 > t/tapper-cli-queue.t (Wstat: 512 Tests: 11 Failed: 2) > Failed tests: 5-6 > Non-zero exit status: 2 > Files=10, Tests=168, 71 wallclock secs ( 0.09 usr 0.00 sys + 59.36 > cusr 5.85 csys = 65.30 CPU) > Result: FAIL > > I found the following. > http://cpansearch.perl.org/src/RIBASUSHI/SQL-Abstract-1.77/Changes > revision 1.75 2013-12-27 > ---------------------------- > - *UPCOMING INCOMPATIBLE BUGFIX*: SQLA used to generate incorrect SQL > on undef-containing lists fed to -in and -not_in. An exception will > be raised for a while before properly fixing this, to avoid quiet > but subtle changes to query results in production > > % vim > % git diff > diff --git a/lib/Tapper/CLI/Host.pm b/lib/Tapper/CLI/Host.pm > index fb7bd3a..4f393b8 100644 > --- a/lib/Tapper/CLI/Host.pm > +++ b/lib/Tapper/CLI/Host.pm > @@ -130,7 +130,7 @@ sub select_hosts > my %options= (order_by => 'name'); > my %search; > $search{active} = 1 if $opt->{active}; > - $search{is_deleted} = {-in => [ 0, undef ] } unless $opt-
> >{all};
> + $search{is_deleted} = [ 0, undef ] unless $opt->{all}; > $search{free} = 1 if $opt->{free}; > > # ignore all options if host is requested by name > diff --git a/lib/Tapper/CLI/Testrun/Command/listqueue.pm > b/lib/Tapper/CLI/Testrun/Command/listqueue.pm > index af225f7..b9da1b7 100644 > --- a/lib/Tapper/CLI/Testrun/Command/listqueue.pm > +++ b/lib/Tapper/CLI/Testrun/Command/listqueue.pm > @@ -80,7 +80,7 @@ sub execute { > my ($self, $opt, $args) = @_; > my %options= (order_by => 'name'); > my %search; > - $search{is_deleted} = {-in => [ 0, undef ] } unless $opt-
> >{all};
> + $search{is_deleted} = [ 0, undef ] unless $opt->{all}; > if ($opt->{minprio} and $opt->{maxprio}) { > $search{"-and"} = [ priority => {'>=' => $opt->{minprio}}, > priority => {'<=' => $opt->{maxprio}}]; > } else { > > % prove -I lib t > t/00-load.t ................... ok > t/tapper-cli-host.t ........... ok > t/tapper-cli-hostfeature.t .... 12/? # Use --really to delete feature > for host 'host1': mem = 4096 > t/tapper-cli-hostfeature.t .... ok > t/tapper-cli-interdep.t ....... ok > t/tapper-cli-notification.t ... # 1 > t/tapper-cli-notification.t ... ok > t/tapper-cli-precondition.t ... ok > t/tapper-cli-queue.t .......... ok > t/tapper-cli-testplan.t ....... ok > t/tapper-cli-testrun-small.t .. Use of uninitialized value in > anonymous hash ({}) at /home/bokutin/perl5/perlbrew/perls/perl- > 5.16.3/lib/site_perl/5.16.3/Object/Enum.pm line 160. > t/tapper-cli-testrun-small.t .. ok > t/tapper-cli-testrun.t ........ 14/? Use of uninitialized value in > anonymous hash ({}) at /home/bokutin/perl5/perlbrew/perls/perl- > 5.16.3/lib/site_perl/5.16.3/Object/Enum.pm line 160. > t/tapper-cli-testrun.t ........ ok > All tests successful. > Files=10, Tests=168, 71 wallclock secs ( 0.06 usr 0.03 sys + 59.48 > cusr 5.88 csys = 65.46 CPU) > Result: PASS
-- Steffen Schwigon <ss5@renormalist.net> Dresden Perl Mongers <http://dresden-pm.org/>