summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2017-11-15 11:01:25 +0100
committerJon Marius Venstad <venstad@gmail.com>2017-11-15 11:01:25 +0100
commitd40da65d5996cdc27c81ba4fbdb52f6fa83ba206 (patch)
tree78b5e03d1eb5b9dfdfadcdf3e13866b8a211dc9d /controller-server
parent71707bec11f8a9d47986cd6da7b5b739d9f755f9 (diff)
Restore condition to its intention, without the redundant part
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java15
1 files changed, 1 insertions, 14 deletions
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 7166a53071a..1faaa15f054 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
@@ -184,8 +184,7 @@ public class DeploymentTrigger {
if ( ! application.deploying().isPresent()) return false;
Change change = application.deploying().get();
- if ( ! previous.isSuccess() &&
- ! productionUpgradeHasSucceededFor(previous, change)) return false;
+ if ( ! previous.lastSuccess().isPresent()) return false;
if (change instanceof Change.VersionChange) {
Version targetVersion = ((Change.VersionChange)change).version();
@@ -446,18 +445,6 @@ public class DeploymentTrigger {
}
/**
- * When upgrading it is ok to trigger the next job even if the previous failed if the previous has earlier succeeded
- * on the version we are currently upgrading to
- */
- private boolean productionUpgradeHasSucceededFor(JobStatus jobStatus, Change change) {
- if ( ! (change instanceof Change.VersionChange) ) return false;
- if ( ! isProduction(jobStatus.type())) return false;
- Optional<JobStatus.JobRun> lastSuccess = jobStatus.lastSuccess();
- if ( ! lastSuccess.isPresent()) return false;
- return lastSuccess.get().version().equals(((Change.VersionChange)change).version());
- }
-
- /**
* Returns whether the current deployed version in the zone given by the job
* is newer than the given version. This may be the case even if the production job
* in question failed, if the failure happens after deployment.