aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-06-14 20:00:57 +0200
committerJon Marius Venstad <venstad@gmail.com>2021-06-14 20:00:57 +0200
commiteb4c66482c9887082391cbf48890bd3ec0a9dd3a (patch)
tree195587b49e2d1e891047b3cf923fa33c66627a6b /controller-server
parent8b1315242a2595d0e4868a4f4896cee0ba6abe31 (diff)
Actually add unit test, and verify deployment spec before storing it
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java4
1 files changed, 3 insertions, 1 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 cb3c84f5bd1..c867b97b544 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
@@ -90,7 +90,6 @@ import java.util.function.Consumer;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
-import java.util.stream.Stream;
import static com.yahoo.vespa.hosted.controller.api.integration.configserver.Node.State.active;
import static com.yahoo.vespa.hosted.controller.api.integration.configserver.Node.State.reserved;
@@ -443,6 +442,9 @@ public class ApplicationController {
if (applicationPackage.deploymentSpec().requireInstance(instance).concerns(Environment.prod))
application = controller.routing().assignRotations(application, instance);
+ // Validate new deployment spec thoroughly before storing it.
+ controller.jobController().deploymentStatus(application.get());
+
store(application);
return application;
}