summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/Change.java4
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java11
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)));