summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2019-12-02 13:19:16 +0100
committerJon Marius Venstad <venstad@gmail.com>2019-12-02 13:19:16 +0100
commit6654a881fc2d2c345ea2362eb3d1634b1f598d95 (patch)
tree578d5fbb44b69be00a67ddfe2e13e847c46cb885 /controller-server
parent31cf8547cf0c67e27331f4a29db41dfe29a79c76 (diff)
Update tests
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/DeploymentJobs.java2
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java38
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentContext.java10
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java70
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/UpgraderTest.java4
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java62
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json16
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json16
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json24
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json32
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json32
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json32
12 files changed, 116 insertions, 222 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/DeploymentJobs.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/DeploymentJobs.java
index 8e07c170b51..20fa923aed3 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/DeploymentJobs.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/DeploymentJobs.java
@@ -34,10 +34,12 @@ public class DeploymentJobs {
/** Return a new instance with the given job update applied. */
public DeploymentJobs withUpdate(JobType jobType, UnaryOperator<JobStatus> update) {
Map<JobType, JobStatus> status = new LinkedHashMap<>(this.status);
+
status.compute(jobType, (type, job) -> {
if (job == null) job = JobStatus.initial(jobType);
return update.apply(job);
});
+
return new DeploymentJobs(status.values());
}
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 52ac9c8088a..d42b0b3b33c 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
@@ -87,22 +87,12 @@ public class ControllerTest {
context.application().change().application().get());
context.runJob(systemTest);
context.runJob(stagingTest);
- assertEquals(2, context.instance().deploymentJobs().jobStatus().size());
ApplicationVersion applicationVersion = context.application().change().application().get();
assertFalse("Application version has been set during deployment", applicationVersion.isUnknown());
- assertStatus(JobStatus.initial(stagingTest)
- .withTriggering(version1, applicationVersion, Optional.empty(),"", tester.clock().instant().truncatedTo(MILLIS))
- .withCompletion(1, Optional.empty(), tester.clock().instant().truncatedTo(MILLIS)),
- context.instanceId(),
- tester.controller());
tester.triggerJobs();
// Causes first deployment job to be triggered
- assertStatus(JobStatus.initial(productionUsWest1)
- .withTriggering(version1, applicationVersion, Optional.empty(), "", tester.clock().instant().truncatedTo(MILLIS)),
- context.instanceId(),
- tester.controller());
tester.clock().advance(Duration.ofSeconds(1));
// production job (failing) after deployment
@@ -110,17 +100,6 @@ public class ControllerTest {
assertEquals(3, context.instance().deploymentJobs().jobStatus().size());
tester.triggerJobs();
- JobStatus expectedJobStatus = JobStatus.initial(productionUsWest1)
- .withTriggering(version1, applicationVersion, Optional.empty(), "", tester.clock().instant().truncatedTo(MILLIS)) // Triggered first without application version info
- .withCompletion(1, Optional.of(JobError.unknown), tester.clock().instant().truncatedTo(MILLIS))
- .withTriggering(version1,
- applicationVersion,
- Optional.of(context.instance().deployments().get(productionUsWest1.zone(main))),
- "",
- tester.clock().instant().truncatedTo(MILLIS)); // Re-triggering (due to failure) has application version info
-
- assertStatus(expectedJobStatus, context.instanceId(), tester.controller());
-
// Simulate restart
tester.controllerTester().createNewController();
@@ -132,27 +111,14 @@ public class ControllerTest {
context.submit(applicationPackage);
applicationVersion = context.application().change().application().get();
context.runJob(systemTest);
- assertStatus(JobStatus.initial(systemTest)
- .withTriggering(version1, applicationVersion, Optional.of(context.deployment(ZoneId.from("prod", "us-west-1"))), "", tester.clock().instant().truncatedTo(MILLIS))
- .withCompletion(2, Optional.empty(), tester.clock().instant().truncatedTo(MILLIS)),
- context.instanceId(),
- tester.controller());
context.runJob(stagingTest);
// production job succeeding now
context.jobAborted(productionUsWest1);
- expectedJobStatus = expectedJobStatus
- .withTriggering(version1, applicationVersion, Optional.of(context.deployment(ZoneId.from("prod", "us-west-1"))), "", tester.clock().instant().truncatedTo(MILLIS))
- .withCompletion(3, Optional.empty(), tester.clock().instant().truncatedTo(MILLIS));
context.runJob(productionUsWest1);
- assertStatus(expectedJobStatus, context.instanceId(), tester.controller());
// causes triggering of next production job
tester.triggerJobs();
- assertStatus(JobStatus.initial(productionUsEast3)
- .withTriggering(version1, applicationVersion, Optional.empty(), "", tester.clock().instant().truncatedTo(MILLIS)),
- context.instanceId(),
- tester.controller());
context.runJob(productionUsEast3);
assertEquals(4, context.instance().deploymentJobs().jobStatus().size());
@@ -187,10 +153,6 @@ public class ControllerTest {
}
assertNotNull("Zone was not removed",
context.instance().deployments().get(productionUsWest1.zone(main)));
- JobStatus jobStatus = context.instance().deploymentJobs().jobStatus().get(productionUsWest1);
- assertNotNull("Deployment job was not removed", jobStatus);
- assertEquals(3, jobStatus.lastCompleted().get().id());
- assertEquals("New change available", jobStatus.lastCompleted().get().reason());
// prod zone removal is allowed with override
applicationPackage = new ApplicationPackageBuilder()
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentContext.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentContext.java
index 6016eed4704..7f646db1935 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentContext.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentContext.java
@@ -27,6 +27,7 @@ import com.yahoo.vespa.hosted.controller.api.integration.routing.RoutingGenerato
import com.yahoo.vespa.hosted.controller.api.integration.stubs.MockTesterCloud;
import com.yahoo.vespa.hosted.controller.application.ApplicationPackage;
import com.yahoo.vespa.hosted.controller.application.Deployment;
+import com.yahoo.vespa.hosted.controller.application.DeploymentJobs;
import com.yahoo.vespa.hosted.controller.application.TenantAndApplicationId;
import com.yahoo.vespa.hosted.controller.integration.ConfigServerMock;
import com.yahoo.vespa.hosted.controller.maintenance.JobRunner;
@@ -42,6 +43,7 @@ import java.time.Instant;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Optional;
import java.util.Set;
@@ -130,6 +132,14 @@ public class DeploymentContext {
return tester.controller().applications().requireInstance(instanceId);
}
+ public DeploymentStatus deploymentStatus() {
+ return tester.controller().jobController().deploymentStatus(application());
+ }
+
+ public Map<JobType, JobStatus> instanceJobs() {
+ return deploymentStatus().instanceJobs(instanceId.instance());
+ }
+
public Deployment deployment(ZoneId zone) {
return instance().deployments().get(zone);
}
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java
index 6b0f74fd8bf..202364aa3ed 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTriggerTest.java
@@ -370,7 +370,7 @@ public class DeploymentTriggerTest {
tester.clock().advance(Duration.ofHours(1));
tester.outstandingChangeDeployer().run();
app.runJob(productionUsWest1);
- assertEquals(1, app.instance().deploymentJobs().jobStatus().get(productionUsWest1).lastSuccess().get().application().buildNumber().getAsLong());
+ assertEquals(1, app.instanceJobs().get(productionUsWest1).lastSuccess().get().versions().targetApplication().buildNumber().getAsLong());
assertEquals(2, app.application().outstandingChange().application().get().buildNumber().getAsLong());
tester.triggerJobs();
@@ -507,7 +507,7 @@ public class DeploymentTriggerTest {
app1.runJob(systemTest).runJob(stagingTest) // tests for previous version — these are "reused" later.
.runJob(systemTest).runJob(stagingTest).timeOutConvergence(productionUsCentral1);
assertEquals(version2, app1.deployment(productionUsCentral1.zone(main)).version());
- Instant triggered = app1.instance().deploymentJobs().jobStatus().get(productionUsCentral1).lastTriggered().get().at();
+ Instant triggered = app1.instanceJobs().get(productionUsCentral1).lastTriggered().get().start();
tester.clock().advance(Duration.ofHours(1));
// version2 becomes broken and upgrade targets latest non-broken
@@ -518,7 +518,7 @@ public class DeploymentTriggerTest {
// version1 proceeds 'til the last job, where it fails; us-central-1 is skipped, as current change is strictly dominated by what's deployed there.
app1.failDeployment(productionEuWest1);
- assertEquals(triggered, app1.instance().deploymentJobs().jobStatus().get(productionUsCentral1).lastTriggered().get().at());
+ assertEquals(triggered, app1.instanceJobs().get(productionUsCentral1).lastTriggered().get().start());
// Roll out a new application version, which gives a dual change -- this should trigger us-central-1, but only as long as it hasn't yet deployed there.
ApplicationVersion revision1 = app1.lastSubmission().get();
@@ -530,7 +530,7 @@ public class DeploymentTriggerTest {
app1.assertRunning(productionUsCentral1);
assertEquals(version2, app1.instance().deployments().get(productionUsCentral1.zone(main)).version());
assertEquals(revision1, app1.deployment(productionUsCentral1.zone(main)).applicationVersion());
- assertTrue(triggered.isBefore(app1.instance().deploymentJobs().jobStatus().get(productionUsCentral1).lastTriggered().get().at()));
+ assertTrue(triggered.isBefore(app1.instanceJobs().get(productionUsCentral1).lastTriggered().get().start()));
// Change has a higher application version than what is deployed -- deployment should trigger.
app1.timeOutUpgrade(productionUsCentral1);
@@ -546,7 +546,7 @@ public class DeploymentTriggerTest {
// Last job has a different deployment target, so tests need to run again.
app1.runJob(systemTest).runJob(stagingTest).runJob(productionEuWest1);
assertFalse(app1.application().change().hasTargets());
- assertFalse(app1.instance().deploymentJobs().jobStatus().get(productionUsCentral1).isSuccess());
+ assertFalse(app1.instanceJobs().get(productionUsCentral1).isSuccess());
}
@Test
@@ -573,15 +573,15 @@ public class DeploymentTriggerTest {
// New application version should run system and staging tests against both 6.1 and 6.2, in no particular order.
app.submit(applicationPackage);
tester.triggerJobs();
- Version firstTested = app.instance().deploymentJobs().jobStatus().get(systemTest).lastTriggered().get().platform();
- assertEquals(firstTested, app.instance().deploymentJobs().jobStatus().get(stagingTest).lastTriggered().get().platform());
+ Version firstTested = app.instanceJobs().get(systemTest).lastTriggered().get().versions().targetPlatform();
+ assertEquals(firstTested, app.instanceJobs().get(stagingTest).lastTriggered().get().versions().targetPlatform());
app.runJob(systemTest).runJob(stagingTest);
// Test jobs for next production zone can start and run immediately.
tester.triggerJobs();
- assertNotEquals(firstTested, app.instance().deploymentJobs().jobStatus().get(systemTest).lastTriggered().get().platform());
- assertNotEquals(firstTested, app.instance().deploymentJobs().jobStatus().get(stagingTest).lastTriggered().get().platform());
+ assertNotEquals(firstTested, app.instanceJobs().get(systemTest).lastTriggered().get().versions().targetPlatform());
+ assertNotEquals(firstTested, app.instanceJobs().get(stagingTest).lastTriggered().get().versions().targetPlatform());
app.runJob(systemTest).runJob(stagingTest);
// Finish old run of the aborted production job.
@@ -589,12 +589,12 @@ public class DeploymentTriggerTest {
// New upgrade is already tested for both jobs.
+ // Both jobs fail again, and must be re-triggered -- this is ok, as they are both already triggered on their current targets.
app.failDeployment(productionEuWest1).failDeployment(productionUsEast3)
.runJob(productionEuWest1).runJob(productionUsEast3);
- // Both jobs fail again, and must be re-triggered -- this is ok, as they are both already triggered on their current targets.
assertFalse(app.application().change().hasTargets());
- assertEquals(2, app.instance().deploymentJobs().jobStatus().get(productionEuWest1).lastSuccess().get().application().buildNumber().getAsLong());
- assertEquals(2, app.instance().deploymentJobs().jobStatus().get(productionUsEast3).lastSuccess().get().application().buildNumber().getAsLong());
+ assertEquals(2, app.instanceJobs().get(productionEuWest1).lastSuccess().get().versions().targetApplication().buildNumber().getAsLong());
+ assertEquals(2, app.instanceJobs().get(productionUsEast3).lastSuccess().get().versions().targetApplication().buildNumber().getAsLong());
}
@Test
@@ -649,52 +649,6 @@ public class DeploymentTriggerTest {
}
@Test
- public void testUpdatesFailingJobStatus() {
- // Setup application
- ApplicationPackage applicationPackage = new ApplicationPackageBuilder()
- .environment(Environment.prod)
- .region("us-west-1")
- .build();
-
- // Initial failure
- Instant initialFailure = tester.clock().instant().truncatedTo(MILLIS);
- var app = tester.newDeploymentContext().submit(applicationPackage);
- app.failDeployment(systemTest);
- assertEquals("Failure age is right at initial failure",
- initialFailure, app.instance().deploymentJobs().jobStatus().get(systemTest).firstFailing().get().at());
-
- // Failure again -- failingSince should remain the same
- tester.clock().advance(Duration.ofMillis(1000));
- app.failDeployment(systemTest);
- assertEquals("Failure age is right at second consecutive failure",
- initialFailure, app.instance().deploymentJobs().jobStatus().get(systemTest).firstFailing().get().at());
-
- // Success resets failingSince
- tester.clock().advance(Duration.ofMillis(1000));
- app.runJob(systemTest);
- assertFalse(app.instance().deploymentJobs().jobStatus().get(systemTest).firstFailing().isPresent());
-
- // Complete deployment
- app.runJob(stagingTest).runJob(productionUsWest1);
-
- // Two repeated failures again.
- // Initial failure
- tester.clock().advance(Duration.ofMillis(1000));
- initialFailure = tester.clock().instant().truncatedTo(MILLIS);
-
- app.submit(applicationPackage);
- app.failDeployment(systemTest);
- assertEquals("Failure age is right at initial failure",
- initialFailure, app.instance().deploymentJobs().jobStatus().get(systemTest).firstFailing().get().at());
-
- // Failure again -- failingSince should remain the same
- tester.clock().advance(Duration.ofMillis(1000));
- app.failDeployment(systemTest);
- assertEquals("Failure age is right at second consecutive failure",
- initialFailure, app.instance().deploymentJobs().jobStatus().get(systemTest).firstFailing().get().at());
- }
-
- @Test
public void testPlatformVersionSelection() {
// Setup system
ApplicationPackage applicationPackage = new ApplicationPackageBuilder()
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/UpgraderTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/UpgraderTest.java
index 880d74b0da6..80b54b154be 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/UpgraderTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/UpgraderTest.java
@@ -1021,8 +1021,8 @@ public class UpgraderTest {
tester.triggerJobs();
application.runJob(stagingTest);
- assertEquals(v1, application.instance().deploymentJobs().jobStatus().get(stagingTest).lastSuccess().get().sourcePlatform().get());
- assertEquals(v3, application.instance().deploymentJobs().jobStatus().get(stagingTest).lastSuccess().get().platform());
+ assertEquals(v1, application.instanceJobs().get(stagingTest).lastSuccess().get().versions().sourcePlatform().get());
+ assertEquals(v3, application.instanceJobs().get(stagingTest).lastSuccess().get().versions().targetPlatform());
// First deployment fails and then successfully upgrades to v3
application.timeOutUpgrade(productionUsCentral1);
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java
index eba619253b9..01b857b752f 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java
@@ -503,6 +503,8 @@ public class ApplicationApiTest extends ControllerContainerTest {
.userIdentity(USER_ID),
"{\"message\":\"production-us-west-1 for tenant1.application1.instance1 paused for " + DeploymentTrigger.maxPause + "\"}");
+ // TODO jonmv: Add test (and support) for triggering a job without running tests first.
+
// POST a triggering to the same production job
tester.assertResponse(request("/application/v4/tenant/tenant1/application/application1/instance/instance1/job/production-us-west-1", POST)
.userIdentity(USER_ID),
@@ -899,37 +901,6 @@ public class ApplicationApiTest extends ControllerContainerTest {
}
@Test
- public void testSortsDeploymentsAndJobs() {
- // Deploy
- ApplicationPackage applicationPackage = new ApplicationPackageBuilder()
- .instances("instance1")
- .region("us-east-3")
- .build();
-
- var app = deploymentTester.newDeploymentContext("tenant1", "application1", "instance1");
- app.submit(applicationPackage).deploy();
-
- // New zone is added before us-east-3
- applicationPackage = new ApplicationPackageBuilder()
- .instances("instance1")
- .globalServiceId("foo")
- // These decides the ordering of deploymentJobs and instances in the response
- .region("us-west-1")
- .region("us-east-3")
- .build();
- app.submit(applicationPackage).runJob(JobType.systemTest).runJob(JobType.stagingTest).runJob(JobType.productionUsWest1);
-
- setZoneInRotation("rotation-fqdn-1", ZoneId.from("prod", "us-west-1"));
-
- app.runJob(JobType.stagingTest).runJob(JobType.productionUsEast3);
-
- setDeploymentMaintainedInfo();
- tester.assertResponse(request("/application/v4/tenant/tenant1/application/application1/instance/instance1", GET)
- .userIdentity(USER_ID),
- new File("instance-without-change-multiple-deployments.json"));
- }
-
- @Test
public void testMeteringResponses() {
MockMeteringClient mockMeteringClient = tester.serviceRegistry().meteringService();
@@ -1393,35 +1364,6 @@ public class ApplicationApiTest extends ControllerContainerTest {
}
@Test
- public void testJobStatusReporting() {
- addUserToHostedOperatorRole(HostedAthenzIdentities.from(HOSTED_VESPA_OPERATOR));
- var app = deploymentTester.newDeploymentContext(createTenantAndApplication());
-
- Version vespaVersion = tester.configServer().initialVersion(); // system version from mock config server client
-
- app.submit(applicationPackageInstance1);
- String data = "{\"jobName\":\"system-test\",\"instance\":\"instance1\"}";
-
- var request = request("/application/v4/tenant/tenant1/application/application1/jobreport", POST)
- .data(data)
- .userIdentity(HOSTED_VESPA_OPERATOR);
-
- // Notifying about non-running job fails
- tester.assertResponse(request, "{\"error-code\":\"BAD_REQUEST\",\"message\":\"Notified of completion " +
- "of system-test for tenant1.application1.instance1, but that has not been triggered; last was never\"}",
- 400);
-
- deploymentTester.triggerJobs();
- // Notifying about running jobs stores success status in DeploymentTrigger
- tester.assertResponse(request, "{\"message\":\"ok\"}");
- JobStatus recordedStatus = app.instance().deploymentJobs().jobStatus().get(JobType.systemTest);
-
- assertNotNull("Status was recorded", recordedStatus);
- assertTrue(recordedStatus.isSuccess());
- assertEquals(vespaVersion, recordedStatus.lastCompleted().get().platform());
- }
-
- @Test
public void applicationWithRoutingPolicy() {
var app = deploymentTester.newDeploymentContext(createTenantAndApplication());
ApplicationPackage applicationPackage = new ApplicationPackageBuilder()
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json
index 195219c691e..f2847a6d051 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2-with-patches.json
@@ -41,7 +41,7 @@
"type": "system-test",
"success": false,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "7.0.0",
"revision": {
"buildNumber": 1,
@@ -52,7 +52,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-west-1 (platform 7, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
}
},
@@ -60,7 +60,7 @@
"type": "staging-test",
"success": false,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "7.0.0",
"revision": {
"buildNumber": 1,
@@ -71,9 +71,17 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-west-1 (platform 7, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
}
+ },
+ {
+ "type": "production-us-west-1",
+ "success": false
+ },
+ {
+ "type": "production-us-east-3",
+ "success": false
}
],
"changeBlockers": [],
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json
index c29944924dc..76702b76e91 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application2.json
@@ -40,7 +40,7 @@
"type": "system-test",
"success": false,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "7.0.0",
"revision": {
"buildNumber": 1,
@@ -51,7 +51,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-west-1 (platform 7, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
}
},
@@ -59,7 +59,7 @@
"type": "staging-test",
"success": false,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "7.0.0",
"revision": {
"buildNumber": 1,
@@ -70,9 +70,17 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-west-1 (platform 7, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
}
+ },
+ {
+ "type": "production-us-west-1",
+ "success": false
+ },
+ {
+ "type": "production-us-east-3",
+ "success": false
}
],
"changeBlockers": [],
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json
index 0f759eaed55..ff3bf084069 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-with-routing-policy.json
@@ -14,7 +14,7 @@
"type": "system-test",
"success": true,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -25,7 +25,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-west-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastCompleted": {
@@ -40,7 +40,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-west-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastSuccess": {
@@ -55,7 +55,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-west-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
}
},
@@ -63,7 +63,7 @@
"type": "staging-test",
"success": true,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -74,7 +74,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-west-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastCompleted": {
@@ -89,7 +89,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-west-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastSuccess": {
@@ -104,7 +104,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-west-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
}
},
@@ -112,7 +112,7 @@
"type": "production-us-west-1",
"success": true,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -123,7 +123,7 @@
"gitCommit": "commit1"
}
},
- "reason": "New change available",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastCompleted": {
@@ -138,7 +138,7 @@
"gitCommit": "commit1"
}
},
- "reason": "New change available",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastSuccess": {
@@ -153,7 +153,7 @@
"gitCommit": "commit1"
}
},
- "reason": "New change available",
+ "reason": "unknown reason",
"at": "(ignore)"
}
}
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json
index e8adfd579d5..79bb0333aa3 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance-without-change-multiple-deployments.json
@@ -14,7 +14,7 @@
"type": "system-test",
"success": true,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -25,7 +25,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-west-1 (platform 6.1, application 1.0.2-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastCompleted": {
@@ -40,7 +40,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-west-1 (platform 6.1, application 1.0.2-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastSuccess": {
@@ -55,7 +55,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-west-1 (platform 6.1, application 1.0.2-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
}
},
@@ -63,7 +63,7 @@
"type": "staging-test",
"success": true,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -74,7 +74,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-east-3 (platform 6.1, application 1.0.1-commit1 -> 1.0.2-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastCompleted": {
@@ -89,7 +89,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-east-3 (platform 6.1, application 1.0.1-commit1 -> 1.0.2-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastSuccess": {
@@ -104,7 +104,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-east-3 (platform 6.1, application 1.0.1-commit1 -> 1.0.2-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
}
},
@@ -112,7 +112,7 @@
"type": "production-us-west-1",
"success": true,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -123,7 +123,7 @@
"gitCommit": "commit1"
}
},
- "reason": "New change available",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastCompleted": {
@@ -138,7 +138,7 @@
"gitCommit": "commit1"
}
},
- "reason": "New change available",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastSuccess": {
@@ -153,7 +153,7 @@
"gitCommit": "commit1"
}
},
- "reason": "New change available",
+ "reason": "unknown reason",
"at": "(ignore)"
}
},
@@ -161,7 +161,7 @@
"type": "production-us-east-3",
"success": true,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -172,7 +172,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Available change in production-us-west-1",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastCompleted": {
@@ -187,7 +187,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Available change in production-us-west-1",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastSuccess": {
@@ -202,7 +202,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Available change in production-us-west-1",
+ "reason": "unknown reason",
"at": "(ignore)"
}
}
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json
index 3664af7116c..e064c9e60de 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance.json
@@ -25,7 +25,7 @@
"type": "system-test",
"success": true,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -36,7 +36,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-central-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastCompleted": {
@@ -51,7 +51,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-central-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastSuccess": {
@@ -66,7 +66,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-central-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
}
},
@@ -74,7 +74,7 @@
"type": "staging-test",
"success": true,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -85,7 +85,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-central-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastCompleted": {
@@ -100,7 +100,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-central-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastSuccess": {
@@ -115,7 +115,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-central-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
}
},
@@ -123,7 +123,7 @@
"type": "production-us-central-1",
"success": true,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -134,7 +134,7 @@
"gitCommit": "commit1"
}
},
- "reason": "New change available",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastCompleted": {
@@ -149,7 +149,7 @@
"gitCommit": "commit1"
}
},
- "reason": "New change available",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastSuccess": {
@@ -164,7 +164,7 @@
"gitCommit": "commit1"
}
},
- "reason": "New change available",
+ "reason": "unknown reason",
"at": "(ignore)"
}
},
@@ -172,7 +172,7 @@
"type": "production-us-east-3",
"success": false,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -183,9 +183,13 @@
"gitCommit": "commit1"
}
},
- "reason": "Available change in production-us-central-1",
+ "reason": "unknown reason",
"at": "(ignore)"
}
+ },
+ {
+ "type": "production-us-west-1",
+ "success": false
}
],
"changeBlockers": [
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json
index ddce3921518..8259bd611ff 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/instance1-recursive.json
@@ -25,7 +25,7 @@
"type": "system-test",
"success": true,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -36,7 +36,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-central-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastCompleted": {
@@ -51,7 +51,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-central-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastSuccess": {
@@ -66,7 +66,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-central-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
}
},
@@ -74,7 +74,7 @@
"type": "staging-test",
"success": true,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -85,7 +85,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-central-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastCompleted": {
@@ -100,7 +100,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-central-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastSuccess": {
@@ -115,7 +115,7 @@
"gitCommit": "commit1"
}
},
- "reason": "Testing deployment for production-us-central-1 (platform 6.1, application 1.0.1-commit1)",
+ "reason": "unknown reason",
"at": "(ignore)"
}
},
@@ -123,7 +123,7 @@
"type": "production-us-central-1",
"success": true,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -134,7 +134,7 @@
"gitCommit": "commit1"
}
},
- "reason": "New change available",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastCompleted": {
@@ -149,7 +149,7 @@
"gitCommit": "commit1"
}
},
- "reason": "New change available",
+ "reason": "unknown reason",
"at": "(ignore)"
},
"lastSuccess": {
@@ -164,7 +164,7 @@
"gitCommit": "commit1"
}
},
- "reason": "New change available",
+ "reason": "unknown reason",
"at": "(ignore)"
}
},
@@ -172,7 +172,7 @@
"type": "production-us-east-3",
"success": false,
"lastTriggered": {
- "id": -1,
+ "id": 1,
"version": "(ignore)",
"revision": {
"buildNumber": "(ignore)",
@@ -183,9 +183,13 @@
"gitCommit": "commit1"
}
},
- "reason": "Available change in production-us-central-1",
+ "reason": "unknown reason",
"at": "(ignore)"
}
+ },
+ {
+ "type": "production-us-west-1",
+ "success": false
}
],
"changeBlockers": [