forked from lix-project/hydra
fixup: make id non-ambiguous
This commit is contained in:
parent
137be3452e
commit
e5393c2cf8
|
@ -135,11 +135,11 @@ foreach my $project ($db->resultset('Projects')->search({}, { order_by => ["name
|
||||||
# Note: we also keep the derivations of failed builds so that
|
# Note: we also keep the derivations of failed builds so that
|
||||||
# they can be restarted.
|
# they can be restarted.
|
||||||
keepBuild($_, 1) foreach $jobset->builds->search(
|
keepBuild($_, 1) foreach $jobset->builds->search(
|
||||||
{ id => { -in => $db->resultset('JobsetEvalMembers')->search({ eval => { -in => [@evals] } }, { select => "build" })->as_query }
|
{ "me.id" => { -in => $db->resultset('JobsetEvalMembers')->search({ eval => { -in => [@evals] } }, { select => "build" })->as_query }
|
||||||
, finished => 1
|
, finished => 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
order_by => ["job", "id"],
|
order_by => ["job", "me.id"],
|
||||||
columns => [ @columns ],
|
columns => [ @columns ],
|
||||||
join => 'jobset',
|
join => 'jobset',
|
||||||
'+select' => ['jobset.project', 'jobset.name'],
|
'+select' => ['jobset.project', 'jobset.name'],
|
||||||
|
@ -153,7 +153,7 @@ foreach my $project ($db->resultset('Projects')->search({}, { order_by => ["name
|
||||||
# Keep the most recently succeeded build of a current job. Oh
|
# Keep the most recently succeeded build of a current job. Oh
|
||||||
# I really need to stop using DBIx::Class.
|
# I really need to stop using DBIx::Class.
|
||||||
keepBuild($_, 1) foreach $jobset->builds->search(
|
keepBuild($_, 1) foreach $jobset->builds->search(
|
||||||
{ id => { -in => $jobset->builds->search(
|
{ "me.id" => { -in => $jobset->builds->search(
|
||||||
{ finished => 1
|
{ finished => 1
|
||||||
, buildstatus => [0, 6]
|
, buildstatus => [0, 6]
|
||||||
, job => { -in => $jobset->builds->search(
|
, job => { -in => $jobset->builds->search(
|
||||||
|
@ -162,11 +162,11 @@ foreach my $project ($db->resultset('Projects')->search({}, { order_by => ["name
|
||||||
)->as_query }
|
)->as_query }
|
||||||
},
|
},
|
||||||
{ group_by => 'job'
|
{ group_by => 'job'
|
||||||
, select => [ { max => 'id', -as => 'm' } ]
|
, select => [ { max => 'me.id', -as => 'm' } ]
|
||||||
})->as_query }
|
})->as_query }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
columns => [ @columns ]
|
columns => [ @columns ],
|
||||||
join => 'jobset',
|
join => 'jobset',
|
||||||
'+select' => ['jobset.project', 'jobset.name'],
|
'+select' => ['jobset.project', 'jobset.name'],
|
||||||
'+as' => ['jobset.project', 'jobset.name'],
|
'+as' => ['jobset.project', 'jobset.name'],
|
||||||
|
|
|
@ -16,7 +16,7 @@ subtest "Updating GC roots" => sub {
|
||||||
is($res, 0, "hydra-update-gc-roots should exit zero");
|
is($res, 0, "hydra-update-gc-roots should exit zero");
|
||||||
if ($res != 0) {
|
if ($res != 0) {
|
||||||
print "gc roots stdout: $stdout\n";
|
print "gc roots stdout: $stdout\n";
|
||||||
print "gc roots stderr: $stderr";
|
print "gc roots stderr: $stderr\n";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue