diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-01-26 17:42:22 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-01-26 17:42:22 +0100 |
commit | 9a80de2c6eb7fe06add018b76b7631b046b9c92b (patch) | |
tree | 6661a74845641a9f11c5f7c0d79fed2932a19840 | |
parent | 49bf23d2adacfb38b826ceb5c86dfeaccf824f5d (diff) |
Improve change completeness logic
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java | 8 |
1 files changed, 3 insertions, 5 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 f3aeeabd3d4..10e0747979d 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 @@ -137,13 +137,11 @@ public class DeploymentTrigger { if (change.platform().isPresent()) { if (change.platform().get().isAfter(deployment.version())) return false; // later is ok } - else if (change.application().isPresent() && change.application().get() != ApplicationVersion.unknown) { // TODO: Should not be "else" + if (change.application().isPresent()) { + // If we don't yet know the application version we are deploying, then we are not complete + if (change.application().get() == ApplicationVersion.unknown) return false; if ( ! change.application().get().equals(deployment.applicationVersion())) return false; } - else { - return false; // If we don't yet know the application version we are deploying, then we are not complete - } - } return true; } |