diff options
author | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2017-11-10 14:57:57 +0100 |
---|---|---|
committer | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2017-11-10 14:57:57 +0100 |
commit | a65586d50fb40ccaf852cc4f1ff7b9597c7a181c (patch) | |
tree | 1d7b53c77e927688fb041157de68797187620163 /controller-server | |
parent | f1bfbeeb69c9825c1790f820558e0de075590675 (diff) |
Fixed condition
Diffstat (limited to 'controller-server')
2 files changed, 4 insertions, 1 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/JobStatus.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/JobStatus.java index a878a6afe61..ceb04d88026 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/JobStatus.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/JobStatus.java @@ -102,7 +102,9 @@ public class JobStatus { public DeploymentJobs.JobType type() { return type; } /** Returns true unless this job last completed with a failure */ - public boolean isSuccess() { return ! jobError.isPresent(); } + public boolean isSuccess() { + return lastCompleted().isPresent() && ! jobError.isPresent(); + } /** Returns true if last triggered is newer than last completed and was started after timeoutLimit */ public boolean isRunning(Instant timeoutLimit) { diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java index adb11f681d1..06b62b6bcee 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java @@ -305,6 +305,7 @@ public class DeploymentTrigger { private boolean isFailing(Change change, JobStatus status) { return status != null && ! status.isSuccess() + && status.lastCompleted().isPresent() && status.lastCompleted().get().lastCompletedWas(change); } |