summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorHarald Musum <musum@oath.com>2018-04-17 14:53:34 +0200
committerHarald Musum <musum@oath.com>2018-04-17 14:53:34 +0200
commit5b43b00e1cd49029f10543a14a8dd022f739a832 (patch)
treeefd3c3af98c9235b0c4d1dcfe711c01c5a5c356c /controller-server
parentb9f6244b3cf0830ad423b41732e0279285bce7b8 (diff)
Remove logic for choosing between deploy and prepare-activate
Logic has been moved to config server client
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java10
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ConfigServerClientMock.java45
2 files changed, 2 insertions, 53 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java
index 800eb447bc7..05bfc2fd2c0 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java
@@ -335,15 +335,9 @@ public class ApplicationController {
// Carry out deployment
options = withVersion(platformVersion, options);
- ConfigServerClient.PreparedApplication preparedApplication;
DeploymentId deploymentId = new DeploymentId(applicationId, zone);
- // TODO: Using deploy() only in CD and in AWS for now
- if (controller.system().equals(SystemName.cd) || deploymentId.zoneId().region().value().equals("aws-us-east-1a")) {
- preparedApplication = configServer.deploy(deploymentId, options, cnames, rotationNames, applicationPackage.zippedContent());
- } else {
- preparedApplication = configServer.prepare(deploymentId, options, cnames, rotationNames, applicationPackage.zippedContent());
- preparedApplication.activate();
- }
+ ConfigServerClient.PreparedApplication preparedApplication =
+ configServer.deploy(deploymentId, options, cnames, rotationNames, applicationPackage.zippedContent());
// TODO: Set new deployment after convergence, rather than after deployment call, succeeds.
application = application.withNewDeployment(zone, applicationVersion, platformVersion, clock.instant());
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ConfigServerClientMock.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ConfigServerClientMock.java
index ba1299cae72..068f7b21933 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ConfigServerClientMock.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ConfigServerClientMock.java
@@ -78,51 +78,6 @@ public class ConfigServerClientMock extends AbstractComponent implements ConfigS
}
@Override
- public PreparedApplication prepare(DeploymentId deployment, DeployOptions deployOptions, Set<String> rotationCnames,
- Set<String> rotationNames, byte[] content) {
- lastPrepareVersion = deployOptions.vespaVersion.map(Version::new).orElse(null);
- if (prepareException != null) {
- RuntimeException prepareException = this.prepareException;
- this.prepareException = null;
- throw prepareException;
- }
- applicationActivated.put(deployment.applicationId(), false);
- applicationInstances.put(deployment.applicationId(), UUID.randomUUID() + ":4080");
-
- return new PreparedApplication() {
- @Override
- public void activate() {
- applicationActivated.put(deployment.applicationId(), true);
- }
-
- @Override
- public List<Log> messages() {
- Log warning = new Log();
- warning.level = "WARNING";
- warning.time = 1;
- warning.message = "The warning";
-
- Log info = new Log();
- info.level = "INFO";
- info.time = 2;
- info.message = "The info";
-
- return Arrays.asList(warning, info);
- }
-
- @Override
- public PrepareResponse prepareResponse() {
- PrepareResponse prepareResponse = new PrepareResponse();
- prepareResponse.message = "foo";
- prepareResponse.configChangeActions = new ConfigChangeActions(Collections.emptyList(),
- Collections.emptyList());
- prepareResponse.tenant = new TenantId("tenant");
- return prepareResponse;
- }
- };
- }
-
- @Override
public PreparedApplication deploy(DeploymentId deployment, DeployOptions deployOptions, Set<String> rotationCnames,
Set<String> rotationNames, byte[] content) {
lastPrepareVersion = deployOptions.vespaVersion.map(Version::new).orElse(null);