summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorandreer <andreer@verizonmedia.com>2019-08-12 14:48:46 +0200
committerandreer <andreer@verizonmedia.com>2019-08-12 14:48:46 +0200
commitb4316c9abb30434bf19e0007c7e6cd687f61433f (patch)
treef0c6288353e38be1f2868ccf059bb1d2267d8372 /controller-server
parentf852e52107490b3e966770393150193ac6b0cf02 (diff)
only include rotationIds for rotations assigned to zone
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java2
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java17
2 files changed, 8 insertions, 11 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 677e9e960e8..c7f42a4aff2 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
@@ -353,7 +353,7 @@ public class ApplicationController {
assignedRotation.clusterId().value(),
Stream.concat(
app.endpointsIn(controller.system(), assignedRotation.endpointId()).legacy(false).asList().stream().map(Endpoint::dnsName),
- app.rotations().stream().map(RotationId::asString)
+ Stream.of(assignedRotation.rotationId().asString())
).collect(Collectors.toList())
);
})
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java
index fa32dcba767..f6135cd246c 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java
@@ -367,18 +367,15 @@ public class ControllerTest {
tester.deployCompletely(application, applicationPackage);
Collection<Deployment> deployments = tester.application(application.id()).deployments().values();
assertFalse(deployments.isEmpty());
- for (Deployment deployment : deployments) {
- var notWest = Set.of(
- "rotation-id-01",
- "rotation-id-02",
- "rotation-id-03",
- "app1--tenant1.global.vespa.oath.cloud",
- "foobar--app1--tenant1.global.vespa.oath.cloud",
- "all--app1--tenant1.global.vespa.oath.cloud"
- );
- var west = Sets.union(notWest, Set.of("rotation-id-04", "west--app1--tenant1.global.vespa.oath.cloud"));
+ var notWest = Set.of(
+ "rotation-id-01", "foobar--app1--tenant1.global.vespa.oath.cloud",
+ "rotation-id-02", "app1--tenant1.global.vespa.oath.cloud",
+ "rotation-id-04", "all--app1--tenant1.global.vespa.oath.cloud"
+ );
+ var west = Sets.union(notWest, Set.of("rotation-id-03", "west--app1--tenant1.global.vespa.oath.cloud"));
+ for (Deployment deployment : deployments) {
assertEquals("Rotation names are passed to config server in " + deployment.zone(),
ZoneId.from("prod.us-west-1").equals(deployment.zone()) ? west : notWest,
tester.configServer().rotationNames().get(new DeploymentId(application.id(), deployment.zone())));