From 137be3452e9a8140b373ae195ba396fa115576c4 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Sat, 19 Mar 2022 23:24:28 -0400 Subject: [PATCH] Reduce the jobset cols on the remaining two queries --- src/script/hydra-update-gc-roots | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/script/hydra-update-gc-roots b/src/script/hydra-update-gc-roots index 8cf24d5d..315d4ebb 100755 --- a/src/script/hydra-update-gc-roots +++ b/src/script/hydra-update-gc-roots @@ -138,7 +138,14 @@ foreach my $project ($db->resultset('Projects')->search({}, { order_by => ["name { id => { -in => $db->resultset('JobsetEvalMembers')->search({ eval => { -in => [@evals] } }, { select => "build" })->as_query } , finished => 1 }, - { order_by => ["job", "id"], columns => [ @columns ] }); + { + order_by => ["job", "id"], + columns => [ @columns ], + join => 'jobset', + '+select' => ['jobset.project', 'jobset.name'], + '+as' => ['jobset.project', 'jobset.name'], + } + ); print STDERR "*** looking for the most recent successful builds of current jobs in ", $project->name, ":", $jobset->name, "\n"; @@ -158,7 +165,13 @@ foreach my $project ($db->resultset('Projects')->search({}, { order_by => ["name , select => [ { max => 'id', -as => 'm' } ] })->as_query } }, - { columns => [ @columns ] }); + { + columns => [ @columns ] + join => 'jobset', + '+select' => ['jobset.project', 'jobset.name'], + '+as' => ['jobset.project', 'jobset.name'], + } + ); } }