From e7655fdcbc75625b7e2af4940e205c79721c808e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 2 Mar 2016 18:06:20 +0100 Subject: [PATCH] Fix latest-finished --- src/lib/Hydra/Base/Controller/NixChannel.pm | 2 ++ src/lib/Hydra/Controller/Job.pm | 1 - src/lib/Hydra/Controller/Jobset.pm | 1 - src/lib/Hydra/Controller/JobsetEval.pm | 1 - src/lib/Hydra/Controller/Project.pm | 1 - src/lib/Hydra/Controller/Root.pm | 1 - 6 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib/Hydra/Base/Controller/NixChannel.pm b/src/lib/Hydra/Base/Controller/NixChannel.pm index 810d0806..508043f2 100644 --- a/src/lib/Hydra/Base/Controller/NixChannel.pm +++ b/src/lib/Hydra/Base/Controller/NixChannel.pm @@ -12,6 +12,8 @@ use Hydra::Helper::CatalystUtils; sub getChannelData { my ($c, $checkValidity) = @_; + requireLocalStore($c); + my @storePaths = (); $c->stash->{nixPkgs} = []; diff --git a/src/lib/Hydra/Controller/Job.pm b/src/lib/Hydra/Controller/Job.pm index 73a3dcbd..475eca37 100644 --- a/src/lib/Hydra/Controller/Job.pm +++ b/src/lib/Hydra/Controller/Job.pm @@ -130,7 +130,6 @@ sub metric : Chained('job') PathPart('metric') Args(1) { # Hydra::Base::Controller::ListBuilds needs this. sub get_builds : Chained('job') PathPart('') CaptureArgs(0) { my ($self, $c) = @_; - requireLocalStore($c); $c->stash->{allBuilds} = $c->stash->{job}->builds; $c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForJob') ->search({}, {bind => [$c->stash->{project}->name, $c->stash->{jobset}->name, $c->stash->{job}->name]}); diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm index d6dda604..f2b801f1 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -148,7 +148,6 @@ sub channels_tab : Chained('jobsetChain') PathPart('channels-tab') Args(0) { # Hydra::Base::Controller::ListBuilds needs this. sub get_builds : Chained('jobsetChain') PathPart('') CaptureArgs(0) { my ($self, $c) = @_; - requireLocalStore($c); $c->stash->{allBuilds} = $c->stash->{jobset}->builds; $c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForJobset') ->search({}, {bind => [$c->stash->{project}->name, $c->stash->{jobset}->name]}); diff --git a/src/lib/Hydra/Controller/JobsetEval.pm b/src/lib/Hydra/Controller/JobsetEval.pm index 36419cb5..eaba6ae2 100644 --- a/src/lib/Hydra/Controller/JobsetEval.pm +++ b/src/lib/Hydra/Controller/JobsetEval.pm @@ -222,7 +222,6 @@ sub bump : Chained('evalChain') PathPart('bump') Args(0) { # Hydra::Base::Controller::NixChannel needs this. sub nix : Chained('evalChain') PathPart('channel') CaptureArgs(0) { my ($self, $c) = @_; - requireLocalStore($c); $c->stash->{channelName} = $c->stash->{project}->name . "-" . $c->stash->{jobset}->name . "-latest"; $c->stash->{channelBuilds} = $c->stash->{eval}->builds ->search_literal("exists (select 1 from buildproducts where build = build.id and type = 'nix-build')") diff --git a/src/lib/Hydra/Controller/Project.pm b/src/lib/Hydra/Controller/Project.pm index 64f5e011..4cd577b1 100644 --- a/src/lib/Hydra/Controller/Project.pm +++ b/src/lib/Hydra/Controller/Project.pm @@ -161,7 +161,6 @@ sub updateProject { # Hydra::Base::Controller::ListBuilds needs this. sub get_builds : Chained('projectChain') PathPart('') CaptureArgs(0) { my ($self, $c) = @_; - requireLocalStore($c); $c->stash->{allBuilds} = $c->stash->{project}->builds; $c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForProject') ->search({}, {bind => [$c->stash->{project}->name]}); diff --git a/src/lib/Hydra/Controller/Root.pm b/src/lib/Hydra/Controller/Root.pm index b03212bc..8827d4f0 100644 --- a/src/lib/Hydra/Controller/Root.pm +++ b/src/lib/Hydra/Controller/Root.pm @@ -166,7 +166,6 @@ sub machines :Local Args(0) { # Hydra::Base::Controller::ListBuilds needs this. sub get_builds : Chained('/') PathPart('') CaptureArgs(0) { my ($self, $c) = @_; - requireLocalStore($c); $c->stash->{allBuilds} = $c->model('DB::Builds'); $c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceeded'); $c->stash->{channelBaseName} = "everything";