diff options
Diffstat (limited to 'controller-server/src/test/java/com/yahoo/vespa')
10 files changed, 137 insertions, 12 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentExpirerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentExpirerTest.java index 0c238ea7c9d..f39374a2a89 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentExpirerTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentExpirerTest.java @@ -73,7 +73,7 @@ public class DeploymentExpirerTest { // Dev application expires when enough time has passed since most recent attempt // Redeployments done by DeploymentUpgrader do not affect this tester.clock().advance(Duration.ofDays(12).plus(Duration.ofSeconds(1))); - tester.jobs().start(devApp.instanceId(), DeploymentContext.devUsEast1, lastRun.versions(), true, Optional.of("upgrade")); + tester.jobs().start(devApp.instanceId(), DeploymentContext.devUsEast1, lastRun.versions(), true, Run.Reason.because("upgrade")); expirer.maintain(); assertEquals(0, permanentDeployments(devApp.instance())); assertEquals(1, permanentDeployments(prodApp.instance())); diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/JobRunnerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/JobRunnerTest.java index b0fe2867ab7..3ee6c7aadc3 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/JobRunnerTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/JobRunnerTest.java @@ -14,6 +14,7 @@ import com.yahoo.vespa.hosted.controller.deployment.JobController; import com.yahoo.vespa.hosted.controller.deployment.JobMetrics; import com.yahoo.vespa.hosted.controller.deployment.JobProfile; import com.yahoo.vespa.hosted.controller.deployment.Run; +import com.yahoo.vespa.hosted.controller.deployment.Run.Reason; import com.yahoo.vespa.hosted.controller.deployment.RunStatus; import com.yahoo.vespa.hosted.controller.deployment.Step; import com.yahoo.vespa.hosted.controller.deployment.Step.Status; @@ -423,7 +424,7 @@ public class JobRunnerTest { } private void start(JobController jobs, ApplicationId id, JobType type) { - jobs.start(id, type, versions, false, Optional.empty()); + jobs.start(id, type, versions, false, Reason.empty()); } public static ExecutorService inThreadExecutor() { diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/deployment-overview-2.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/deployment-overview-2.json index 19b3d5dc2d7..8a22a7500d4 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/deployment-overview-2.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/deployment-overview-2.json @@ -167,6 +167,11 @@ "start": 14403000, "end": 14403000, "status": "success", + "dependent": { + "instance": "default", + "region": "us-central-1", + "revision": 3 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -225,6 +230,11 @@ "start": 1000, "end": 1000, "status": "success", + "dependent": { + "instance": "default", + "region": "us-central-1", + "revision": 2 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -283,6 +293,11 @@ "start": 0, "end": 0, "status": "success", + "dependent": { + "instance": "default", + "region": "us-central-1", + "revision": 1 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -376,6 +391,11 @@ "start": 14503000, "end": 14503000, "status": "installationFailed", + "dependent": { + "instance": "default", + "region": "us-east-3", + "revision": 3 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -457,6 +477,11 @@ "start": 14403000, "end": 14403000, "status": "installationFailed", + "dependent": { + "instance": "default", + "region": "us-east-3", + "revision": 3 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -538,6 +563,11 @@ "start": 14403000, "end": 14403000, "status": "success", + "dependent": { + "instance": "default", + "region": "us-central-1", + "revision": 3 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -619,6 +649,11 @@ "start": 1000, "end": 1000, "status": "success", + "dependent": { + "instance": "default", + "region": "us-central-1", + "revision": 2 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -700,6 +735,11 @@ "start": 0, "end": 0, "status": "success", + "dependent": { + "instance": "default", + "region": "us-central-1", + "revision": 1 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/deployment-overview.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/deployment-overview.json index 1d115049b35..aa1ceaae2e8 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/deployment-overview.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/deployment-overview.json @@ -79,6 +79,11 @@ "url": "http://localhost:8080/application/v4/tenant/tenant1/application/application1/instance/instance1/job/system-test/run/2", "start": 1600000000000, "status": "running", + "dependent": { + "instance": "instance1", + "region": "us-central-1", + "revision": 4 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -137,6 +142,11 @@ "start": 1600000000000, "end": 1600000000000, "status": "success", + "dependent": { + "instance": "instance1", + "region": "us-central-1", + "revision": 1 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -209,6 +219,11 @@ "url": "http://localhost:8080/application/v4/tenant/tenant1/application/application1/instance/instance1/job/staging-test/run/2", "start": 1600000000000, "status": "running", + "dependent": { + "instance": "instance1", + "region": "us-central-1", + "revision": 4 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -283,6 +298,11 @@ "start": 1600000000000, "end": 1600000000000, "status": "success", + "dependent": { + "instance": "instance1", + "region": "us-central-1", + "revision": 1 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/overview-enclave.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/overview-enclave.json index 9d82ed97849..733326fc8d1 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/overview-enclave.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/overview-enclave.json @@ -5,11 +5,11 @@ "steps": [ { "type": "instance", - "dependencies": [], + "dependencies": [ ], "declared": true, "instance": "default", "readyAt": 0, - "deploying": {}, + "deploying": { }, "latestVersions": { "platform": { "platform": "6.1.0", @@ -21,7 +21,7 @@ "upgrade": false } ], - "blockers": [] + "blockers": [ ] }, "application": { "application": { @@ -42,21 +42,21 @@ } } ], - "blockers": [] + "blockers": [ ] } }, "delayCause": null }, { "type": "test", - "dependencies": [], + "dependencies": [ ], "declared": true, "instance": "default", "readyAt": 0, "jobName": "staging-test", "url": "https://some.url:43/instance/default/job/staging-test", "environment": "staging", - "toRun": [], + "toRun": [ ], "enclave": { "cloudAccount": "aws:123456789012" }, @@ -67,6 +67,11 @@ "start": 1600000000000, "end": 1600000000000, "status": "success", + "dependent": { + "instance": "default", + "region": "aws-us-east-1c", + "revision": 1 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -140,14 +145,14 @@ }, { "type": "test", - "dependencies": [], + "dependencies": [ ], "declared": true, "instance": "default", "readyAt": 0, "jobName": "system-test", "url": "https://some.url:43/instance/default/job/system-test", "environment": "test", - "toRun": [], + "toRun": [ ], "enclave": { "cloudAccount": "aws:123456789012" }, @@ -158,6 +163,11 @@ "start": 1600000000000, "end": 1600000000000, "status": "success", + "dependent": { + "instance": "default", + "region": "aws-us-east-1c", + "revision": 1 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -215,7 +225,11 @@ }, { "type": "deployment", - "dependencies": [0, 1, 2], + "dependencies": [ + 0, + 1, + 2 + ], "declared": true, "instance": "default", "readyAt": 1600000000000, @@ -230,7 +244,7 @@ "sourceUrl": "repository1/tree/commit1", "commit": "commit1" }, - "toRun": [], + "toRun": [ ], "enclave": { "cloudAccount": "aws:123456789012" }, diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/staging-runs.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/staging-runs.json index 6c966f0de4d..5c6b95c4651 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/staging-runs.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/staging-runs.json @@ -6,6 +6,11 @@ "start": 14503000, "end": 14503000, "status": "installationFailed", + "dependent": { + "instance": "default", + "region": "us-east-3", + "revision": 3 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -87,6 +92,11 @@ "start": 14403000, "end": 14403000, "status": "installationFailed", + "dependent": { + "instance": "default", + "region": "us-east-3", + "revision": 3 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -168,6 +178,11 @@ "start": 14403000, "end": 14403000, "status": "success", + "dependent": { + "instance": "default", + "region": "us-central-1", + "revision": 3 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -249,6 +264,11 @@ "start": 1000, "end": 1000, "status": "success", + "dependent": { + "instance": "default", + "region": "us-central-1", + "revision": 2 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -330,6 +350,11 @@ "start": 0, "end": 0, "status": "success", + "dependent": { + "instance": "default", + "region": "us-central-1", + "revision": 1 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/staging-test-log.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/staging-test-log.json index ae44c851dc0..9a550170ae2 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/staging-test-log.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/staging-test-log.json @@ -1,6 +1,11 @@ { "active": false, "status": "installationFailed", + "dependent": { + "instance": "default", + "region": "us-east-3", + "revision": 3 + }, "log": { "deployTester": [ { diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-details.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-details.json index c79dcc99ecf..ffbbe3cc7b5 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-details.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-details.json @@ -1,6 +1,11 @@ { "active": false, "status": "success", + "dependent": { + "instance": "instance1", + "region": "us-central-1", + "revision": 1 + }, "log": { "deployTester": [ { diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-job.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-job.json index 1ac4658ce10..49f0155340d 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-job.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-job.json @@ -5,6 +5,11 @@ "url": "http://localhost:8080/application/v4/tenant/tenant1/application/application1/instance/instance1/job/system-test/run/2", "start": 1600000000000, "status": "running", + "dependent": { + "instance": "instance1", + "region": "us-central-1", + "revision": 4 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { @@ -63,6 +68,11 @@ "start": 1600000000000, "end": 1600000000000, "status": "success", + "dependent": { + "instance": "instance1", + "region": "us-central-1", + "revision": 1 + }, "versions": { "targetPlatform": "6.1.0", "targetApplication": { diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-log.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-log.json index 830512f2fcd..f284c1fecf2 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-log.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/system-test-log.json @@ -1,6 +1,11 @@ { "active": false, "status": "success", + "dependent": { + "instance": "default", + "region": "us-central-1", + "revision": 1 + }, "log": { "deployTester": [ { |