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N2WXD4LRGSA74KQMJCCTMHK7HS6JPELVECAC
{ '+select' => ["me.statusChangeId", "me.statusChangeTime", "resultInfo.buildStatus"]
, '+as' => ["statusChangeId", "statusChangeTime", "buildStatus"]
{ '+select' => ["me.statusChangeId", "me.statusChangeTime"]
, '+as' => ["statusChangeId", "statusChangeTime"]
my ($latest) = joinWithResultInfo($c, $c->stash->{allBuilds})
->search({finished => 1, buildstatus => 0}, {order_by => ["isCurrent DESC", "timestamp DESC"]});
my ($latest) = $c->stash->{allBuilds}->search(
{finished => 1, buildstatus => 0}, {order_by => ["isCurrent DESC", "timestamp DESC"]});
my ($latest) = joinWithResultInfo($c, $c->stash->{allBuilds})
->search({finished => 1, buildstatus => 0, system => $system}, {order_by => ["isCurrent DESC", "timestamp DESC"]});
my ($latest) = $c->stash->{allBuilds}->search(
{finished => 1, buildstatus => 0, system => $system}, {order_by => ["isCurrent DESC", "timestamp DESC"]});
my $project = $c->request->params->{project} ;
my $jobset = $c->request->params->{jobset} ;
my $job = $c->request->params->{job} ;
my $system = $c->request->params->{system} ;
my $project = $c->request->params->{project};
my $jobset = $c->request->params->{jobset};
my $job = $c->request->params->{job};
my $system = $c->request->params->{system};
my $project = $c->request->params->{project} ;
my $jobset = $c->request->params->{jobset} ;
my $job = $c->request->params->{job} ;
my $system = $c->request->params->{system} ;
my $project = $c->request->params->{project};
my $jobset = $c->request->params->{jobset};
my $job = $c->request->params->{job};
my $system = $c->request->params->{system};
my @stats = $c->model('DB::Builds')->search($filter, {select => [{ count => "*" }], as => ["nr"], group_by => ["timestamp - timestamp % $base"], order_by => "timestamp - timestamp % $base DESC", rows => $nr}) ;
my @arr ;
foreach my $d (@stats) {
push @arr, int($d->get_column("nr"));
}
my @stats = $c->model('DB::Builds')->search($filter, {select => [{ count => "*" }], as => ["nr"], group_by => ["timestamp - timestamp % $base"], order_by => "timestamp - timestamp % $base DESC", rows => $nr});
my @arr;
push @arr, int($_->get_column("nr")) foreach @stats;
my $uri = $c->request->params->{uri} ;
my $type = $c->request->params->{type} ;
my $rev1 = $c->request->params->{rev1} ;
my $rev2 = $c->request->params->{rev2} ;
my $uri = $c->request->params->{uri};
my $type = $c->request->params->{type};
my $rev1 = $c->request->params->{rev1};
my $rev2 = $c->request->params->{rev2};
$branch = `(cd $clonePath ; hg log --template '{branch}' -r $rev2)`;
$diff .= `(cd $clonePath ; hg log -r $rev1 -r $rev2 -b $branch)`;
$diff .= `(cd $clonePath ; hg diff -r $rev1:$rev2)`;
$branch = `(cd $clonePath; hg log --template '{branch}' -r $rev2)`;
$diff .= `(cd $clonePath; hg log -r $rev1 -r $rev2 -b $branch)`;
$diff .= `(cd $clonePath; hg diff -r $rev1:$rev2)`;
if (-f $build1->resultInfo->logfile && -f $build2->resultInfo->logfile) {
my $logtext1 = readNormalizedLog($build1->resultInfo->logfile);
my $logtext2 = readNormalizedLog($build2->resultInfo->logfile);
if (-f $build1->logfile && -f $build2->logfile) {
my $logtext1 = readNormalizedLog($build1->logfile);
my $logtext2 = readNormalizedLog($build2->logfile);
if (defined $build->resultInfo && ($build->resultInfo->buildstatus == 1 || $build->resultInfo->buildstatus == 6) && !($path eq "") && -f $lastBuildStep->logfile) {
if ($build->finished && ($build->buildstatus == 1 || $build->buildstatus == 6) && !($path eq "") && -f $lastBuildStep->logfile) {
$c->stash->{currentBuilds} = [$c->stash->{job}->builds->search({iscurrent => 1}, { join => 'resultInfo', '+select' => ["resultInfo.releasename", "resultInfo.buildStatus"]
, '+as' => ["releasename", "buildStatus"], order_by => 'system' })];
$c->stash->{currentBuilds} = [$c->stash->{job}->builds->search({finished => 1, iscurrent => 1}, { order_by => 'system' })];
push(@select, "(select buildstatus from BuildResultInfo bri join Builds b using (id) where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))");
push(@select, "(select buildstatus from Builds b where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))");
push(@select, "(select b.id from BuildResultInfo bri join Builds b using (id) where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))");
push(@select, "(select b.id from Builds b where b.id = (select max(id) from Builds t where t.project = me.project and t.jobset = me.jobset and t.job = me.job and t.system = '$system' and t.iscurrent = 1 ))");
[ joinWithResultInfo($c, $tmp)->search({ finished => 1 },
{ order_by => "timestamp DESC", rows => 5
, '+select' => ["resultInfo.buildStatus"]
, '+as' => ["buildStatus"]
}) ];
[ $c->stash->{jobset}->builds->search({ finished => 1 },
{ order_by => "timestamp DESC", rows => 5 }) ];
$c->stash->{builds} = [$c->model('DB::Builds')->search(
{finished => 1, stoptime => { '>' => $pit } }
, { join => 'resultInfo'
, order_by => ["starttime"]
, '+select' => [ 'resultInfo.starttime', 'resultInfo.stoptime', 'resultInfo.buildstatus' ]
, '+as' => [ 'starttime', 'stoptime', 'buildstatus' ]
})];
$c->stash->{builds} = [ $c->model('DB::Builds')->search
( { finished => 1, stoptime => { '>' => $pit } }
, { order_by => ["starttime"] }
) ];
my $primaryBuild = $c->stash->{project}->builds->find($id,
{ join => 'resultInfo',
, '+select' => ["resultInfo.releasename", "resultInfo.buildstatus"]
, '+as' => ["releasename", "buildstatus"] })
my $primaryBuild = $c->stash->{project}->builds->find($id)
$res = $builds->search({},
{join => 'resultInfo', select => {sum => 'stoptime - starttime'}, as => ['sum']})
->first ;
$res = $builds->search({}, {select => {sum => 'stoptime - starttime'}, as => ['sum']})->first;
# Add the releaseName and buildStatus attributes from the
# BuildResultInfo table for each build.
sub joinWithResultInfo {
my ($c, $source) = @_;
return $source->search(
{ },
{ join => 'resultInfo'
, '+select' => ["resultInfo.releasename", "resultInfo.buildstatus"]
, '+as' => ["releasename", "buildStatus"]
});
}
my @builds2 = joinWithResultInfo($c, $builds)
->search_literal("exists (select 1 from buildproducts where build = resultInfo.id and type = 'nix-build')");
my @builds2 = $builds->search_literal("exists (select 1 from buildproducts where build = me.id and type = 'nix-build')");
, "(select count(*) from Builds as a join BuildResultInfo r using (id) where me.project = a.project and me.name = a.jobset and buildstatus <> 0 and a.isCurrent = 1)"
, "(select count(*) from Builds as a join BuildResultInfo r using (id) where me.project = a.project and me.name = a.jobset and buildstatus = 0 and a.isCurrent = 1)"
, "(select count(*) from Builds as a where a.finished = 1 and me.project = a.project and me.name = a.jobset and buildstatus <> 0 and a.isCurrent = 1)"
, "(select count(*) from Builds as a where a.finished = 1 and me.project = a.project and me.name = a.jobset and buildstatus = 0 and a.isCurrent = 1)"
use utf8;
package Hydra::Schema::BuildResultInfo;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
Hydra::Schema::BuildResultInfo
=cut
use strict;
use warnings;
=cut
__PACKAGE__->table("BuildResultInfo");
=head1 ACCESSORS
=head2 id
is_foreign_key: 1
is_nullable: 0
=head2 iscachedbuild
is_nullable: 0
=head2 buildstatus
is_nullable: 1
=head2 errormsg
is_nullable: 1
=head2 starttime
is_nullable: 1
=head2 stoptime
is_nullable: 1
=head2 logfile
is_nullable: 1
=head2 logsize
default_value: 0
is_nullable: 0
=head2 size
default_value: 0
is_nullable: 0
=head2 closuresize
default_value: 0
is_nullable: 0
data_type: 'bigint'
=head2 releasename
is_nullable: 1
=head2 keep
default_value: 0
is_nullable: 0
=head2 faileddepbuild
is_nullable: 1
=head2 faileddepstepnr
is_nullable: 1
=cut
data_type: 'integer'
data_type: 'integer'
data_type: 'integer'
data_type: 'text'
data_type: 'bigint'
data_type: 'bigint'
data_type: 'text'
data_type: 'integer'
data_type: 'integer'
data_type: 'text'
data_type: 'integer'
data_type: 'integer'
data_type: 'integer'
is_auto_increment: 1
__PACKAGE__->add_columns(
"id",
{
},
"iscachedbuild",
"buildstatus",
"errormsg",
"starttime",
"stoptime",
"logfile",
"logsize",
"size",
"closuresize",
"releasename",
"keep",
"faileddepbuild",
"faileddepstepnr",
);
=head1 PRIMARY KEY
=over 4
=item * L</id>
=back
=cut
__PACKAGE__->set_primary_key("id");
=head1 RELATIONS
=head2 id
Type: belongs_to
Related object: L<Hydra::Schema::Builds>
=cut
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }, {});
1;
__PACKAGE__->belongs_to(
"failedDep",
"Hydra::Schema::BuildSteps",
{ build => "faileddepbuild", stepnr => "faileddepstepnr" },
);
# Created by DBIx::Class::Schema::Loader v0.07014 @ 2011-12-05 14:15:43
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hX3+iQYrGslQqY9vKvyw3g
{ data_type => "integer", is_nullable => 1 },
{ data_type => "integer", is_nullable => 1 },
{ data_type => "integer", default_value => 0, is_nullable => 0 },
{ data_type => "text", is_nullable => 1 },
{ data_type => "bigint", default_value => 0, is_nullable => 0 },
{ data_type => "bigint", default_value => 0, is_nullable => 0 },
{ data_type => "bigint", default_value => 0, is_nullable => 0 },
{ data_type => "text", is_nullable => 1 },
{ data_type => "integer", is_nullable => 1 },
{ data_type => "integer", is_nullable => 1 },
{ data_type => "text", is_nullable => 1 },
{ data_type => "integer", is_nullable => 1 },
{ data_type => "integer", is_nullable => 0 },
data_type => "integer",
is_auto_increment => 1,
is_foreign_key => 1,
is_nullable => 0,
=head1 TABLE: C<BuildResultInfo>
use base 'DBIx::Class::Core';
"iscachedbuild",
{ data_type => "integer", is_nullable => 1 },
"buildstatus",
{ data_type => "integer", is_nullable => 1 },
"errormsg",
{ data_type => "text", is_nullable => 1 },
"logsize",
{ data_type => "bigint", is_nullable => 1 },
"size",
{ data_type => "bigint", is_nullable => 1 },
"closuresize",
{ data_type => "bigint", is_nullable => 1 },
"releasename",
{ data_type => "text", is_nullable => 1 },
"keep",
{ data_type => "integer", default_value => 0, is_nullable => 0 },
{},
);
=head2 buildresultinfo
Type: might_have
Related object: L<Hydra::Schema::BuildResultInfo>
=cut
__PACKAGE__->might_have(
"buildresultinfo",
"Hydra::Schema::BuildResultInfo",
{ "foreign.id" => "self.id" },
# Created by DBIx::Class::Schema::Loader v0.07014 @ 2012-02-29 00:47:54
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VnnyFTwnLncGb2Dj2/giiA
# Created by DBIx::Class::Schema::Loader v0.07014 @ 2012-02-29 18:56:22
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:w16c86FRReLPdA8H0yTIRg
my $joinWithStatusChange =
<<QUERY;
join BuildResultInfo r using (id)
left join Builds b on
b.id =
(select max(c.id)
from builds c join buildresultinfo r2 on c.id = r2.id
where
x.project = c.project and x.jobset = c.jobset and x.job = c.job and x.system = c.system and
x.id > c.id and
((r.buildstatus = 0 and r2.buildstatus != 0) or
(r.buildstatus != 0 and r2.buildstatus = 0)))
QUERY
select
x.id, x.finished, x.timestamp, x.project, x.jobset, x.job, x.nixname,
x.description, x.drvpath, x.outpath, x.system, x.longdescription,
x.license, x.homepage, x.maintainers, x.isCurrent, x.nixExprInput,
x.nixExprPath, x.maxsilent, x.timeout, x.priority, x.busy, x.locker,
x.logfile, x.disabled, x.startTime,
b.id as statusChangeId, b.timestamp as statusChangeTime
select x.*, b.id as statusChangeId, b.timestamp as statusChangeTime
$joinWithStatusChange
left join Builds b on
b.id =
(select max(c.id) from Builds c
where
c.finished = 1 and
x.project = c.project and x.jobset = c.jobset and x.job = c.job and x.system = c.system and
x.id > c.id and
((x.buildStatus = 0 and c.buildStatus != 0) or
(x.buildStatus != 0 and c.buildStatus = 0)))
[% INCLUDE renderDuration duration = resultInfo.stoptime - resultInfo.starttime %] <tt>finished at [% INCLUDE renderDateTime timestamp = resultInfo.stoptime %]</tt>
[% INCLUDE renderDuration duration = build.stoptime - build.starttime %] <tt>finished at [% INCLUDE renderDateTime timestamp = build.stoptime %]</tt>
<td>[% IF resultInfo.starttime %][% INCLUDE renderDateTime timestamp = resultInfo.starttime %][% ELSE %]<em>(cached build)</em>[% END %]</td>
<td>[% IF build.starttime %][% INCLUDE renderDateTime timestamp = build.starttime %][% ELSE %]<em>(cached build)</em>[% END %]</td>
<td>[% IF resultInfo.stoptime %][% INCLUDE renderDateTime timestamp = resultInfo.stoptime %][% ELSE %]<em>(cached build)</em>[% END %]</td>
<td>[% IF build.stoptime %][% INCLUDE renderDateTime timestamp = build.stoptime %][% ELSE %]<em>(cached build)</em>[% END %]</td>
[% FOREACH prevbuild IN prevBuilds %][% IF prevbuild.resultInfo.starttime != 0 %]
[% pbResultInfo = prevbuild.resultInfo %]
d.push([[% pbResultInfo.starttime * 1000 %],[% prevbuild.get_column('actualBuildTime') %]]);
ids[[% pbResultInfo.starttime * 1000 %]] = [% prevbuild.id %] ;
[% FOREACH prevbuild IN prevBuilds %][% IF prevbuild.build.starttime != 0 %]
d.push([[% prevbuild.starttime * 1000 %],[% prevbuild.get_column('actualBuildTime') %]]);
ids[[% prevbuild.starttime * 1000 %]] = [% prevbuild.id %] ;
[% FOREACH prevbuild IN prevBuilds %][% IF prevbuild.resultInfo.size != 0 %]
d.push([[% prevbuild.resultInfo.starttime * 1000 %],[% prevbuild.resultInfo.size / (1024*1024.0) %]]);
ids[[% prevbuild.resultInfo.starttime * 1000 %]] = [% prevbuild.id %] ;
[% FOREACH prevbuild IN prevBuilds %][% IF prevbuild.size != 0 %]
d.push([[% prevbuild.starttime * 1000 %],[% prevbuild.size / (1024*1024.0) %]]);
ids[[% prevbuild.starttime * 1000 %]] = [% prevbuild.id %] ;
[ "Build started:", showTime $build->resultInfo->starttime ],
[ "Build finished:", showTime $build->resultInfo->stoptime ],
[ "Duration:", $build->resultInfo->stoptime - $build->resultInfo->starttime . "s" ],
) if $build->resultInfo->starttime;
[ "Build started:", showTime $build->starttime ],
[ "Build finished:", showTime $build->stoptime ],
[ "Duration:", $build->stoptime - $build->starttime . "s" ],
) if $build->starttime;
. " of job " . $jobName . " " . (defined $prevBuild ? "has changed from '" . statusDescription($prevBuild->resultInfo->buildstatus) . "' to '$status'" : "is '$status'" ) .".\n"
. " of job " . $jobName . " " . (defined $prevBuild ? "has changed from '" . statusDescription($prevBuild->buildstatus) . "' to '$status'" : "is '$status'" ) .".\n"
. ($build->resultInfo->buildstatus != 0 ? "\nThe last $loglines lines of the build log are shown at the bottom of this email.\n" : "")
. ($build->buildstatus != 0 ? "\nThe last $loglines lines of the build log are shown at the bottom of this email.\n" : "")
$db->resultset('BuildResultInfo')->create(
{ id => $build->id
$build->update(
{ finished => 1
, busy => 0
, locker => ''
, logfile => ''
, timestamp => time # !!! Why change the timestamp?
foreign key (project) references Projects(name) on update cascade,
foreign key (project, jobset) references Jobsets(project, name) on update cascade,
foreign key (project, jobset, job) references Jobs(project, jobset, name) on update cascade
);
stopTime integer,
-- Info for a finished build.
create table BuildResultInfo (
id integer primary key not null,
isCachedBuild integer not null, -- boolean
-- Information about finished builds.
isCachedBuild integer, -- boolean
startTime integer, -- in Unix time, 0 = used cached build result
stopTime integer,
logfile text, -- the path of the logfile
logsize bigint not null default 0,
size bigint not null default 0,
closuresize bigint not null default 0,
logSize bigint,
size bigint,
closureSize bigint,
failedDepBuild integer, -- obsolete
failedDepStepNr integer, -- obsolete
foreign key (id) references Builds(id) on delete cascade
foreign key (project) references Projects(name) on update cascade,
foreign key (project, jobset) references Jobsets(project, name) on update cascade,
foreign key (project, jobset, job) references Jobs(project, jobset, name) on update cascade
add column startTime integer;
--alter table Builds
-- add column isCachedBuild integer,
-- add column buildStatus integer,
-- add column errorMsg text;
add column startTime integer,
add column stopTime integer,
add column isCachedBuild integer,
add column buildStatus integer,
add column errorMsg text,
add column logSize bigint,
add column size bigint,
add column closureSize bigint,
add column releaseName text,
add column keep integer not null default 0;
-- isCachedBuild = (select isCachedBuild from BuildResultInfo r where r.id = b.id),
-- buildStatus = (select buildStatus from BuildResultInfo r where r.id = b.id),
-- errorMsg = (select errorMsg from BuildResultInfo r where r.id = b.id);
update Builds b set
isCachedBuild = (select isCachedBuild from BuildResultInfo r where r.id = b.id),
buildStatus = (select buildStatus from BuildResultInfo r where r.id = b.id),
errorMsg = (select errorMsg from BuildResultInfo r where r.id = b.id),
startTime = (select startTime from BuildResultInfo r where r.id = b.id),
stopTime = (select stopTime from BuildResultInfo r where r.id = b.id),
logfile = (select logfile from BuildResultInfo r where r.id = b.id),
logSize = (select logsize from BuildResultInfo r where r.id = b.id),
size = (select size from BuildResultInfo r where r.id = b.id),
closureSize = (select closuresize from BuildResultInfo r where r.id = b.id),
releaseName = (select releaseName from BuildResultInfo r where r.id = b.id),
keep = (select keep from BuildResultInfo r where r.id = b.id)
where exists (select 1 from BuildResultInfo r where r.id = b.id);