diff options
author | Jon Bratseth <jonbratseth@yahoo.com> | 2018-02-22 13:41:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-22 13:41:17 +0100 |
commit | 3dcd634419265771a6989e53d13119761651e89d (patch) | |
tree | dfe63c805db50b41b9dd64db7ed4a29957d96d9d | |
parent | 49f310b5545eaac8aa8567f7d0a5b1944505e011 (diff) | |
parent | ff5ebfb122de44e5efc8eab27b60e8b2368a74ad (diff) |
Merge pull request #5116 from vespa-engine/mpolden/cleanup
Cleanup
3 files changed, 4 insertions, 13 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))); diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/Authorizer.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/Authorizer.java index 24ecd430d70..8ea26d053e3 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/Authorizer.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/v2/Authorizer.java @@ -65,7 +65,7 @@ public class Authorizer implements BiPredicate<Principal, URI> { .orElse(false); } - /** Returns whehter principal can access all nodes identified by given hostnames */ + /** Returns whether principal can access all nodes identified by given hostnames */ private boolean canAccess(List<String> hostnames, Principal principal) { return !hostnames.isEmpty() && hostnames.stream().allMatch(hostname -> canAccess(hostname, principal)); } |