Cleanup

[?]
Apr 3, 2012, 9:28 AM
LMETCA7G76HUDV2ZVOOIH6TI6UG7RJ5VCZNWRAAZVIQOWG6XLX5QC

Dependencies

  • [2] 3Y7AFJSS * Support linking to the latest job in a view for a specific platform, e.g.
  • [3] DE2DNCOI Allow comparing an evaluation with an arbitrary other evaluation
  • [4] UXXFND4U Add a redirect to the latest finished jobset evaluation
  • [5] 3HZY24CX * Make jobsets viewable under
  • [6] U4TD3AIQ Add support for viewing jobset evaluations
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.
  • [*] FPK5LF53 * Put the project-related actions in a separate controller. Put the

Change contents

  • replacement in src/lib/Hydra/Controller/Jobset.pm at line 365
    [4.155][4.155:505]()
    my ($eval) = $c->stash->{jobset}->jobsetevals->search(
    { hasnewbuilds => 1 },
    { order_by => "id DESC", rows => 1
    , where => \ "not exists (select 1 from JobsetEvalMembers m join Builds b on m.build = b.id where m.eval = me.id and b.finished = 0)"
    });
    notFound($c, "No evaluation found.") unless defined $eval;
    [4.155]
    [4.505]
    my $eval = getLatestFinishedEval($c, $c->stash->{jobset})
    or notFound($c, "No evaluation found.");
  • replacement in src/lib/Hydra/Controller/JobsetEval.pm at line 41
    [3.781][3.781:1069]()
    ($eval2) = $j->jobsetevals->search(
    { hasnewbuilds => 1 },
    { order_by => "id DESC", rows => 1
    , where => \ "not exists (select 1 from JobsetEvalMembers m join Builds b on m.build = b.id where m.eval = me.id and b.finished = 0)"
    });
    [3.781]
    [3.1069]
    $eval2 = getLatestFinishedEval($c, $j);
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 15
    [9.9780]
    [2.689]
    getLatestFinishedEval
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 169
    [9.11460]
    [9.11460]
    }
    sub getLatestFinishedEval {
    my ($c, $jobset) = @_;
    my ($eval) = $jobset->jobsetevals->search(
    { hasnewbuilds => 1 },
    { order_by => "id DESC", rows => 1
    , where => \ "not exists (select 1 from JobsetEvalMembers m join Builds b on m.build = b.id where m.eval = me.id and b.finished = 0)"
    });
    return $eval;