diff options
author | Martin Polden <mpolden@mpolden.no> | 2018-02-22 12:43:17 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2018-02-22 12:43:17 +0100 |
commit | ff5ebfb122de44e5efc8eab27b60e8b2368a74ad (patch) | |
tree | dfe63c805db50b41b9dd64db7ed4a29957d96d9d /controller-server | |
parent | 2ab8c7df8064876b92aac73c93c8979916d8db7d (diff) |
Simplify
Diffstat (limited to 'controller-server')
2 files changed, 3 insertions, 12 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Change.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Change.java index 0b50ec36a32..603f16a9ef6 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Change.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Change.java @@ -98,8 +98,4 @@ public final class Change { return new Change(Optional.of(platformChange), Optional.empty()); } - public static Change of(Version platformChange, ApplicationVersion applicationVersion) { - return new Change(Optional.of(platformChange), Optional.of(applicationVersion)); - } - } 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 70c1702d0b5..c768aea8248 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 @@ -86,14 +86,9 @@ public class DeploymentTrigger { if (report.success()) { if (report.jobType() == JobType.component) { if (acceptNewApplicationVersionNow(application)) { - // If there's an ongoing upgrade, we allow the upgrade and new application package to be - // deployed together - if (application.change().platform().isPresent()) { - application = application.withChange(Change.of(application.change().platform().get(), - applicationVersion)); - } else { - application = application.withChange(Change.of(applicationVersion)); - } + // Note that in case of an ongoing upgrade this may result in both the upgrade and application + // change being deployed together + application = application.withChange(application.change().with(applicationVersion)); } else { // postpone applications().store(application.withOutstandingChange(Change.of(applicationVersion))); |