diff options
4 files changed, 6 insertions, 54 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServerClient.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServerClient.java index afed92cf732..da3e32df5c9 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServerClient.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServerClient.java @@ -27,7 +27,10 @@ public interface ConfigServerClient { PrepareResponse prepareResponse(); } - PreparedApplication prepare(DeploymentId applicationInstance, DeployOptions deployOptions, Set<String> rotationCnames, Set<String> rotationNames, byte[] content); + // TODO: Deprecated, remove when implementations have been removed + default PreparedApplication prepare(DeploymentId applicationInstance, DeployOptions deployOptions, Set<String> rotationCnames, Set<String> rotationNames, byte[] content) { + return deploy(applicationInstance, deployOptions, rotationCnames, rotationNames, content); + } PreparedApplication deploy(DeploymentId applicationInstance, DeployOptions deployOptions, Set<String> rotationCnames, Set<String> rotationNames, byte[] content); 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); diff --git a/document/src/test/scala/com/yahoo/document/annotation/.gitignore b/document/src/test/scala/com/yahoo/document/annotation/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 --- a/document/src/test/scala/com/yahoo/document/annotation/.gitignore +++ /dev/null |