summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2018-03-20 17:27:30 +0100
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2018-03-20 17:27:30 +0100
commit7308fd2e46d98ecc40713d03219f066337679ec4 (patch)
tree72413b91bc6b824a5b12c966301dc394b2c48496 /controller-server
parentab0fe0c4f11627d2072e007a5641221c5daf1172 (diff)
Check for completion on production rather than success
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java10
1 files changed, 4 insertions, 6 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 52d5fda59ff..f6569190a0c 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
@@ -98,7 +98,7 @@ public class DeploymentTrigger {
return;
}
}
- else if (report.success() && deploymentComplete(application)) {
+ else if (report.jobType().isProduction() && deploymentComplete(application)) {
// change completed
application = application.withChange(Change.empty());
}
@@ -395,16 +395,14 @@ public class DeploymentTrigger {
}
/**
- * Returns whether the currently deployed version in the zone for the given production job is newer
- * than the given version, in which case we should avoid an unsupported downgrade, or if it is the
- * same version, and was successfully deployed, in which case it is unnecessary to redeploy it.
+ * Returns whether the currently deployed application in the zone for the given production job already
+ * has the given changes, in which case we should avoid an unsupported downgrade, or an unnecessary redeploy.
*/
private boolean alreadyDeployed(Version version, Application application, JobType job) {
if ( ! job.isProduction())
throw new IllegalArgumentException(job + " is not a production job!");
- return lastSuccessfulIs(version, job, application) ||
- job.zone(controller.system())
+ return job.zone(controller.system())
.map(zone -> application.deployments().get(zone))
.map(deployment -> deployment.version().isAfter(version))
.orElse(false);