Add a redirect to the latest view result for which the underlying evaluation has finished completely

[?]
Apr 3, 2012, 3:45 PM
ZCTGG25SELGUTOYLG72N2I2OF7YQ6B7CIBPCP5ANMDDD4FIQ3YPQC

Dependencies

  • [2] XBU2ODSP * More renaming.
  • [3] 2BUX775I * More release -> view.
  • [4] IN272KZW * Automatically keep all builds in the latest successful release in
  • [5] P5X4P6VK * Renaming "release sets" to "views" (not finished yet). Having
  • [*] 2GK5DOU7 * Downloading closures.
  • [*] WZ3AEJ67 * hydra_update_gc_roots.pl registers build outputs that should be kept

Change contents

  • replacement in src/lib/Hydra/Controller/View.pm at line 143
    [2.217][3.4425:4500](),[3.4425][3.4425:4500]()
    $c->stash->{project}, $c->stash->{primaryJob}, $c->stash->{jobs});
    [2.217]
    [3.4500]
    $c->stash->{project}, $c->stash->{primaryJob}, $c->stash->{jobs}, 0);
    error($c, "This view set has no successful results yet.") if !defined $latest;
    $c->res->redirect($c->uri_for($self->action_for("view_view"), $c->req->captures, $latest->id, @args));
    }
    sub latest_finished : Chained('view') PathPart('latest-finished') {
    my ($self, $c, @args) = @_;
    # Redirect to the latest result in the view in which every build
    # is successful *and* where the jobset evaluation has finished
    # completely.
    my $latest = getLatestSuccessfulViewResult(
    $c->stash->{project}, $c->stash->{primaryJob}, $c->stash->{jobs}, 1);
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 225
    [2.1181][3.3431:3475](),[3.3431][3.3431:3475]()
    my ($project, $primaryJob, $jobs) = @_;
    [2.1181]
    [3.3475]
    my ($project, $primaryJob, $jobs, $finished) = @_;
  • replacement in src/lib/Hydra/Helper/Nix.pm at line 228
    [2.1255][2.1255:1325]()
    return $build if getViewResult($build, $jobs)->{status} == 0;
    [2.1255]
    [3.3637]
    my $result = getViewResult($build, $jobs);
    next if $result->{status} != 0;
    if ($finished) {
    next unless defined $result->{eval};
    next if $result->{eval}->builds->search({ finished => 0 })->count > 0;
    }
    return $build;
  • replacement in src/script/hydra-update-gc-roots at line 112
    [2.1712][2.1712:1794]()
    my $latest = getLatestSuccessfulViewResult($project, $primaryJob, $jobs);
    [2.1712]
    [3.4409]
    my $latest = getLatestSuccessfulViewResult($project, $primaryJob, $jobs, 0);