diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2020-01-17 11:44:20 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2020-01-17 11:44:20 +0100 |
commit | 17cc18a0fe6a94f086d2d25d04f7d8a7030c85db (patch) | |
tree | 5766a21c796e0191ece642ffeb98420a05b8dc54 | |
parent | bcb8b29b2d6690054f921bb2ebfbefa1fcfec1ec (diff) |
Run staging-setup tagged unit tests on initial staging deployment before upgrade
21 files changed, 742 insertions, 588 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java index f0972643bd5..ef97ef27a72 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java @@ -56,13 +56,15 @@ public interface TesterCloud { system, + staging_setup, + staging, production; - public static Suite of(JobType type) { + public static Suite of(JobType type, boolean isSetup) { if (type == JobType.systemTest) return system; - if (type == JobType.stagingTest) return staging; + if (type == JobType.stagingTest) return isSetup ? staging_setup : staging; if (type.isProduction()) return production; throw new AssertionError("Unknown JobType '" + type + "'!"); } diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java index 470961c0e1a..115b53e36df 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunner.java @@ -73,6 +73,7 @@ import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.installatio import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.outOfCapacity; import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.running; import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.testFailure; +import static com.yahoo.vespa.hosted.controller.deployment.Step.installTester; import static java.nio.charset.StandardCharsets.UTF_8; import static java.util.logging.Level.INFO; import static java.util.logging.Level.WARNING; @@ -123,7 +124,9 @@ public class InternalStepRunner implements StepRunner { case deployReal: return deployReal(id, logger); case installTester: return installTester(id, logger); case installReal: return installReal(id, logger); - case startTests: return startTests(id, logger); + case startStagingSetup: return startTests(id, true, logger); + case endStagingSetup: return endTests(id, logger); + case startTests: return startTests(id, false, logger); case endTests: return endTests(id, logger); case copyVespaLogs: return copyVespaLogs(id, logger); case deactivateReal: return deactivateReal(id, logger); @@ -308,13 +311,8 @@ public class InternalStepRunner implements StepRunner { } private Optional<RunStatus> installTester(RunId id, DualLogger logger) { - Optional<Deployment> deployment = deployment(id.application(), id.type()); - if ( ! deployment.isPresent()) { - logger.log(WARNING, "Deployment expired before installation of tester was successful."); - return Optional.of(error); - } - - Version platform = controller.jobController().run(id).get().versions().targetPlatform(); + Run run = controller.jobController().run(id).get(); + Version platform = run.versions().targetPlatform(); logger.log("Checking installation of tester container ..."); if ( nodesConverged(id.tester().id(), id.type(), platform, logger) && servicesConverged(id.tester().id(), id.type(), platform, logger)) { @@ -324,14 +322,14 @@ public class InternalStepRunner implements StepRunner { return Optional.of(running); } } - else if (timedOut(id, deployment.get(), endpointTimeout)) { + else if (run.stepInfo(installTester).get().startTime().get().plus(endpointTimeout).isBefore(controller.clock().instant())) { logger.log(WARNING, "Tester failed to show up within " + endpointTimeout.toMinutes() + " minutes!"); return Optional.of(error); } } - if (timedOut(id, deployment.get(), testerTimeout)) { - logger.log(WARNING, "Installation of tester failed to complete within " + testerTimeout.toMinutes() + " minutes of real deployment!"); + if (run.stepInfo(installTester).get().startTime().get().plus(endpointTimeout).isBefore(controller.clock().instant())) { + logger.log(WARNING, "Installation of tester failed to complete within " + testerTimeout.toMinutes() + " minutes!"); return Optional.of(error); } @@ -427,11 +425,11 @@ public class InternalStepRunner implements StepRunner { return convergence.get().converged(); } - private Optional<RunStatus> startTests(RunId id, DualLogger logger) { + private Optional<RunStatus> startTests(RunId id, boolean isSetup, DualLogger logger) { Optional<Deployment> deployment = deployment(id.application(), id.type()); if (deployment.isEmpty()) { logger.log(INFO, "Deployment expired before tests could start."); - return Optional.of(aborted); + return Optional.of(error); } var deployments = controller.applications().requireInstance(id.application()) @@ -442,14 +440,14 @@ public class InternalStepRunner implements StepRunner { logger.log("Attempting to find endpoints ..."); var endpoints = controller.applications().clusterEndpoints(deployments); - if ( ! endpoints.containsKey(id.type().zone(controller.system())) && timedOut(id, deployment.get(), endpointTimeout)) { + if ( ! endpoints.containsKey(id.type().zone(controller.system()))) { logger.log(WARNING, "Endpoints for the deployment to test vanished again, while it was still active!"); return Optional.of(error); } logEndpoints(endpoints, logger); Optional<URI> testerEndpoint = controller.jobController().testerEndpoint(id); - if (testerEndpoint.isEmpty() && timedOut(id, deployment.get(), endpointTimeout)) { + if (testerEndpoint.isEmpty()) { logger.log(WARNING, "Endpoints for the tester container vanished again, while it was still active!"); return Optional.of(error); } @@ -461,7 +459,7 @@ public class InternalStepRunner implements StepRunner { logger.log("Starting tests ..."); controller.jobController().cloud().startTests(testerEndpoint.get(), - TesterCloud.Suite.of(id.type()), + TesterCloud.Suite.of(id.type(), isSetup), testConfigSerializer.configJson(id.application(), id.type(), true, @@ -632,7 +630,7 @@ public class InternalStepRunner implements StepRunner { /** * Returns whether the time since deployment is more than the zone deployment expiry, or the given timeout. * - * We time out the job before the deployment expires, for zone where deployments are not persistent, + * We time out the job before the deployment expires, for zones where deployments are not persistent, * to be able to collect the Vespa log from the deployment. Thus, the lower of the zone's deployment expiry, * and the given default installation timeout, minus one minute, is used as a timeout threshold. */ diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobController.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobController.java index ba61e8813e1..e998e4c8ef9 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobController.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobController.java @@ -50,6 +50,7 @@ import java.util.stream.Stream; import static com.google.common.collect.ImmutableList.copyOf; import static com.yahoo.vespa.hosted.controller.deployment.Step.copyVespaLogs; import static com.yahoo.vespa.hosted.controller.deployment.Step.deactivateTester; +import static com.yahoo.vespa.hosted.controller.deployment.Step.endStagingSetup; import static com.yahoo.vespa.hosted.controller.deployment.Step.endTests; import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toUnmodifiableList; @@ -168,21 +169,24 @@ public class JobController { /** Fetches any new test log entries, and records the id of the last of these, for continuation. */ public void updateTestLog(RunId id) { - locked(id, run -> { - if ( ! run.readySteps().contains(endTests)) - return run; + locked(id, run -> { + Optional<Step> step = Stream.of(endStagingSetup, endTests) + .filter(run.readySteps()::contains) + .findAny(); + if (step.isEmpty()) + return run; - Optional<URI> testerEndpoint = testerEndpoint(id); - if ( ! testerEndpoint.isPresent()) - return run; + Optional<URI> testerEndpoint = testerEndpoint(id); + if ( ! testerEndpoint.isPresent()) + return run; - List<LogEntry> entries = cloud.getLog(testerEndpoint.get(), run.lastTestLogEntry()); - if (entries.isEmpty()) - return run; + List<LogEntry> entries = cloud.getLog(testerEndpoint.get(), run.lastTestLogEntry()); + if (entries.isEmpty()) + return run; - logs.append(id.application(), id.type(), endTests, entries); - return run.with(entries.stream().mapToLong(LogEntry::id).max().getAsLong()); - }); + logs.append(id.application(), id.type(), step.get(), entries); + return run.with(entries.stream().mapToLong(LogEntry::id).max().getAsLong()); + }); } /** Stores the given certificate as the tester certificate for this run, or throws if it's already set. */ diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobProfile.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobProfile.java index 0ebdc2aa1d3..4c2b53d6ba2 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobProfile.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobProfile.java @@ -13,11 +13,13 @@ import static com.yahoo.vespa.hosted.controller.deployment.Step.deactivateTester import static com.yahoo.vespa.hosted.controller.deployment.Step.deployInitialReal; import static com.yahoo.vespa.hosted.controller.deployment.Step.deployReal; import static com.yahoo.vespa.hosted.controller.deployment.Step.deployTester; +import static com.yahoo.vespa.hosted.controller.deployment.Step.endStagingSetup; import static com.yahoo.vespa.hosted.controller.deployment.Step.endTests; import static com.yahoo.vespa.hosted.controller.deployment.Step.installInitialReal; import static com.yahoo.vespa.hosted.controller.deployment.Step.installReal; import static com.yahoo.vespa.hosted.controller.deployment.Step.installTester; import static com.yahoo.vespa.hosted.controller.deployment.Step.report; +import static com.yahoo.vespa.hosted.controller.deployment.Step.startStagingSetup; import static com.yahoo.vespa.hosted.controller.deployment.Step.startTests; /** @@ -39,11 +41,13 @@ public enum JobProfile { report)), stagingTest(EnumSet.of(deployInitialReal, + deployTester, + installTester, installInitialReal, + startStagingSetup, + endStagingSetup, deployReal, installReal, - deployTester, - installTester, startTests, endTests), EnumSet.of(copyVespaLogs, diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/Step.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/Step.java index fc0b99ef9aa..44a93a655a8 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/Step.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/Step.java @@ -28,17 +28,23 @@ public enum Step { /** Download test-jar and assemble and deploy tester application. */ deployTester, + /** See that tester is done deploying, and is ready to serve. */ + installTester(deployTester), + /** Download and deploy the initial real application, for staging tests. */ deployInitialReal(deployTester), /** See that the real application has had its nodes converge to the initial state. */ installInitialReal(deployInitialReal), - /** Download and deploy real application, restarting services if required. */ - deployReal(deployTester, installInitialReal), + /** Ask the tester to run its staging setup. */ + startStagingSetup(installInitialReal, installTester), - /** See that tester is done deploying, and is ready to serve. */ - installTester(deployReal, deployTester), + /** See that the staging setup is done. */ + endStagingSetup(startStagingSetup), + + /** Download and deploy real application, restarting services if required. */ + deployReal(endStagingSetup, deployTester), /** See that real application has had its nodes converge to the wanted version and generation. */ installReal(deployReal), diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/persistence/RunSerializer.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/persistence/RunSerializer.java index 8f2b274401c..8ffa6e65a42 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/persistence/RunSerializer.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/persistence/RunSerializer.java @@ -45,11 +45,13 @@ import static com.yahoo.vespa.hosted.controller.deployment.Step.deactivateTester import static com.yahoo.vespa.hosted.controller.deployment.Step.deployInitialReal; import static com.yahoo.vespa.hosted.controller.deployment.Step.deployReal; import static com.yahoo.vespa.hosted.controller.deployment.Step.deployTester; +import static com.yahoo.vespa.hosted.controller.deployment.Step.endStagingSetup; import static com.yahoo.vespa.hosted.controller.deployment.Step.endTests; import static com.yahoo.vespa.hosted.controller.deployment.Step.installInitialReal; import static com.yahoo.vespa.hosted.controller.deployment.Step.installReal; import static com.yahoo.vespa.hosted.controller.deployment.Step.installTester; import static com.yahoo.vespa.hosted.controller.deployment.Step.report; +import static com.yahoo.vespa.hosted.controller.deployment.Step.startStagingSetup; import static com.yahoo.vespa.hosted.controller.deployment.Step.startTests; import static java.util.Comparator.comparing; @@ -239,6 +241,8 @@ class RunSerializer { case installTester : return "installTester"; case deactivateTester : return "deactivateTester"; case copyVespaLogs : return "copyVespaLogs"; + case startStagingSetup : return "startStagingSetup"; + case endStagingSetup : return "endStagingSetup"; case startTests : return "startTests"; case endTests : return "endTests"; case report : return "report"; @@ -258,6 +262,8 @@ class RunSerializer { case "installTester" : return installTester; case "deactivateTester" : return deactivateTester; case "copyVespaLogs" : return copyVespaLogs; + case "startStagingSetup" : return startStagingSetup; + case "endStagingSetup" : return endStagingSetup; case "startTests" : return startTests; case "endTests" : return endTests; case "report" : return report; 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 40674ac0925..cac29cc7612 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 @@ -43,6 +43,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; +import static com.yahoo.vespa.hosted.controller.deployment.Step.Status.succeeded; import static com.yahoo.vespa.hosted.controller.deployment.Step.Status.unfinished; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -299,7 +300,6 @@ public class DeploymentContext { if (job.type().environment().isManuallyDeployed()) return this; } - doInstallTester(job); doTests(job); doTeardown(job); return this; @@ -400,15 +400,18 @@ public class DeploymentContext { jobs.active().stream().anyMatch(run -> run.id().application().equals(instanceId) && run.id().type() == type)); } - /** Deploys tester and real app, and completes initial staging installation first if needed. */ + /** Deploys tester and real app, and completes tester and initial staging installation first if needed. */ private void doDeploy(JobId job) { RunId id = currentRun(job).id(); ZoneId zone = zone(job); DeploymentId deployment = new DeploymentId(job.application(), zone); - // First steps are always deployments. + // First step is always a deployment. runner.advance(currentRun(job)); + if ( ! job.type().environment().isManuallyDeployed()) + doInstallTester(job); + if (job.type() == JobType.stagingTest) { // Do the initial deployment and installation of the real application. assertEquals(unfinished, jobs.run(id).get().stepStatuses().get(Step.installInitialReal)); Versions versions = currentRun(job).versions(); @@ -417,6 +420,17 @@ public class DeploymentContext { setEndpoints(zone); runner.advance(currentRun(job)); assertEquals(Step.Status.succeeded, jobs.run(id).get().stepStatuses().get(Step.installInitialReal)); + + // All installation is complete and endpoints are ready, so setup may begin. + if (job.type().isDeployment()) + assertEquals(Step.Status.succeeded, jobs.run(id).get().stepStatuses().get(Step.installInitialReal)); + assertEquals(Step.Status.succeeded, jobs.run(id).get().stepStatuses().get(Step.installTester)); + assertEquals(Step.Status.succeeded, jobs.run(id).get().stepStatuses().get(Step.startStagingSetup)); + + assertEquals(unfinished, jobs.run(id).get().stepStatuses().get(Step.endStagingSetup)); + tester.cloud().set(TesterCloud.Status.SUCCESS); + runner.advance(currentRun(job)); + assertEquals(succeeded, jobs.run(id).get().stepStatuses().get(Step.endStagingSetup)); } } diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunnerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunnerTest.java index 70bc783a757..51726035cb3 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunnerTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/InternalStepRunnerTest.java @@ -101,14 +101,6 @@ public class InternalStepRunnerTest { @Test public void refeedRequirementBlocksDeployment() { - RunId id = app.newRun(JobType.stagingTest); - - tester.setEndpoints(app.testerId().id(), JobType.stagingTest.zone(system())); - tester.runner().run(); - assertEquals(unfinished, tester.jobs().run(id).get().stepStatuses().get(Step.installInitialReal)); - - tester.setEndpoints(app.instanceId(), JobType.stagingTest.zone(system())); - tester.configServer().convergeServices(app.instanceId(), JobType.stagingTest.zone(system())); tester.configServer().setConfigChangeActions(new ConfigChangeActions(Collections.emptyList(), singletonList(new RefeedAction("Refeed", false, @@ -116,9 +108,8 @@ public class InternalStepRunnerTest { "cluster", Collections.emptyList(), singletonList("Refeed it!"))))); - tester.runner().run(); - - assertEquals(failed, tester.jobs().run(id).get().stepStatuses().get(Step.deployReal)); + tester.jobs().deploy(app.instanceId(), JobType.devUsEast1, Optional.empty(), applicationPackage); + assertEquals(failed, tester.jobs().last(app.instanceId(), JobType.devUsEast1).get().stepStatuses().get(Step.deployReal)); } @Test @@ -179,7 +170,7 @@ public class InternalStepRunnerTest { } @Test - public void installationFailsIfDeploymentExpires() { + public void startingTestsFailsIfDeploymentExpires() { app.newRun(JobType.systemTest); tester.runner().run(); tester.configServer().convergeServices(app.instanceId(), JobType.systemTest.zone(system())); @@ -188,8 +179,10 @@ public class InternalStepRunnerTest { assertEquals(succeeded, tester.jobs().last(app.instanceId(), JobType.systemTest).get().stepStatuses().get(Step.installReal)); tester.applications().deactivate(app.instanceId(), JobType.systemTest.zone(system())); + tester.setEndpoints(app.testerId().id(), JobType.systemTest.zone(system())); + tester.configServer().convergeServices(app.testerId().id(), JobType.systemTest.zone(system())); tester.runner().run(); - assertEquals(failed, tester.jobs().last(app.instanceId(), JobType.systemTest).get().stepStatuses().get(Step.installTester)); + assertEquals(failed, tester.jobs().last(app.instanceId(), JobType.systemTest).get().stepStatuses().get(Step.startTests)); assertTrue(tester.jobs().last(app.instanceId(), JobType.systemTest).get().hasEnded()); assertTrue(tester.jobs().last(app.instanceId(), JobType.systemTest).get().hasFailed()); } 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 bdab81b3948..b2ec7ec5f26 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 @@ -133,8 +133,8 @@ public class JobRunnerTest { outcomes.put(deployTester, running); runner.maintain(); - assertEquals(List.of(deployReal), run.get().readySteps()); - assertStepsWithStartTime(run.get(), deployTester, deployReal); + assertEquals(List.of(installTester, deployReal), run.get().readySteps()); + assertStepsWithStartTime(run.get(), installTester, deployTester, deployReal); outcomes.put(deployReal, running); runner.maintain(); diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/RunSerializerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/RunSerializerTest.java index c1f8e2f0ffb..e1017173fcb 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/RunSerializerTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/RunSerializerTest.java @@ -35,11 +35,13 @@ import static com.yahoo.vespa.hosted.controller.deployment.Step.deactivateTester import static com.yahoo.vespa.hosted.controller.deployment.Step.deployInitialReal; import static com.yahoo.vespa.hosted.controller.deployment.Step.deployReal; import static com.yahoo.vespa.hosted.controller.deployment.Step.deployTester; +import static com.yahoo.vespa.hosted.controller.deployment.Step.endStagingSetup; import static com.yahoo.vespa.hosted.controller.deployment.Step.endTests; import static com.yahoo.vespa.hosted.controller.deployment.Step.installInitialReal; import static com.yahoo.vespa.hosted.controller.deployment.Step.installReal; import static com.yahoo.vespa.hosted.controller.deployment.Step.installTester; import static com.yahoo.vespa.hosted.controller.deployment.Step.report; +import static com.yahoo.vespa.hosted.controller.deployment.Step.startStagingSetup; import static com.yahoo.vespa.hosted.controller.deployment.Step.startTests; import static java.time.temporal.ChronoUnit.MILLIS; import static org.junit.Assert.assertEquals; @@ -115,6 +117,8 @@ public class RunSerializerTest { .put(installTester, new StepInfo(installTester, unfinished, Optional.of(Instant.ofEpochMilli(1196677940000L)))) .put(deactivateTester, new StepInfo(deactivateTester, failed, Optional.empty())) .put(copyVespaLogs, new StepInfo(copyVespaLogs, succeeded, Optional.empty())) + .put(startStagingSetup, new StepInfo(startStagingSetup, succeeded, Optional.empty())) + .put(endStagingSetup, new StepInfo(endStagingSetup, unfinished, Optional.empty())) .put(startTests, new StepInfo(startTests, succeeded, Optional.empty())) .put(endTests, new StepInfo(endTests, unfinished, Optional.empty())) .put(report, new StepInfo(report, failed, Optional.empty())) diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/testdata/run-status.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/testdata/run-status.json index bea13e68d11..201192280fe 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/testdata/run-status.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/persistence/testdata/run-status.json @@ -18,6 +18,8 @@ "installTester": "unfinished", "deactivateTester": "failed", "copyVespaLogs": "succeeded", + "startStagingSetup": "succeeded", + "endStagingSetup": "unfinished", "startTests": "succeeded", "endTests": "unfinished", "report": "failed" 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 62d83ffe8e3..2ab690c9d99 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 @@ -1,52 +1,57 @@ { + "tenant": "tenant", "application": "application", "steps": [ { - "declared": true, - "instance": "default", "type": "instance", - "dependencies": [] + "dependencies": [], + "declared": true, + "instance": "default" }, { + "type": "test", + "dependencies": [], "declared": false, + "instance": "default", "jobName": "system-test", + "url": "https://some.url:43/instance/default/job/system-test", "environment": "test", - "instance": "default", - "toRun": [], - "type": "test", "region": "test.us-east-1", + "toRun": [], "runs": [ { + "id": 3, + "url": "https://some.url:43/instance/default/job/system-test/run/run 3 of system-test for tenant.application", + "start": 2000, + "end": 2000, + "status": "success", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 3, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 2, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } }, - "start": 2000, - "end": 2000, - "id": 3, "steps": [ { "name": "deployTester", "status": "succeeded" }, { - "name": "deployReal", + "name": "installTester", "status": "succeeded" }, { - "name": "installTester", + "name": "deployReal", "status": "succeeded" }, { @@ -77,41 +82,41 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/system-test/run/run 3 of system-test for tenant.application", - "status": "success" + ] }, { + "id": 2, + "url": "https://some.url:43/instance/default/job/system-test/run/run 2 of system-test for tenant.application", + "start": 1000, + "end": 1000, + "status": "success", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 2, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } }, - "start": 1000, - "end": 1000, - "id": 2, "steps": [ { "name": "deployTester", "status": "succeeded" }, { - "name": "deployReal", + "name": "installTester", "status": "succeeded" }, { - "name": "installTester", + "name": "deployReal", "status": "succeeded" }, { @@ -142,34 +147,34 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/system-test/run/run 2 of system-test for tenant.application", - "status": "success" + ] }, { + "id": 1, + "url": "https://some.url:43/instance/default/job/system-test/run/run 1 of system-test for tenant.application", + "start": 0, + "end": 0, + "status": "success", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" - }, - "targetPlatform": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" + } }, - "start": 0, - "end": 0, - "id": 1, "steps": [ { "name": "deployTester", "status": "succeeded" }, { - "name": "deployReal", + "name": "installTester", "status": "succeeded" }, { - "name": "installTester", + "name": "deployReal", "status": "succeeded" }, { @@ -200,71 +205,75 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/system-test/run/run 1 of system-test for tenant.application", - "status": "success" + ] } - ], - "url": "https://some.url:43/instance/default/job/system-test", - "dependencies": [] + ] }, { + "type": "test", + "dependencies": [], "declared": true, + "instance": "default", "jobName": "staging-test", + "url": "https://some.url:43/instance/default/job/staging-test", "environment": "staging", - "instance": "default", + "region": "staging.us-east-3", "toRun": [ { - "readyAt": 752000, - "coolingDownUntil": 752000, "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 3, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } }, - "delayedUntil": 752000 + "readyAt": 752000, + "delayedUntil": 752000, + "coolingDownUntil": 752000 } ], - "type": "test", - "region": "staging.us-east-3", "runs": [ { + "id": 5, + "url": "https://some.url:43/instance/default/job/staging-test/run/run 5 of staging-test for tenant.application", + "start": 102000, + "end": 102000, + "status": "installationFailed", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 3, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } }, - "start": 102000, - "end": 102000, - "id": 5, "steps": [ { "name": "deployTester", "status": "succeeded" }, { + "name": "installTester", + "status": "unfinished" + }, + { "name": "deployInitialReal", "status": "succeeded" }, @@ -273,11 +282,15 @@ "status": "failed" }, { - "name": "deployReal", + "name": "startStagingSetup", "status": "unfinished" }, { - "name": "installTester", + "name": "endStagingSetup", + "status": "unfinished" + }, + { + "name": "deployReal", "status": "unfinished" }, { @@ -308,36 +321,40 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/staging-test/run/run 5 of staging-test for tenant.application", - "status": "installationFailed" + ] }, { + "id": 4, + "url": "https://some.url:43/instance/default/job/staging-test/run/run 4 of staging-test for tenant.application", + "start": 2000, + "end": 2000, + "status": "installationFailed", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 3, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } }, - "start": 2000, - "end": 2000, - "id": 4, "steps": [ { "name": "deployTester", "status": "succeeded" }, { + "name": "installTester", + "status": "unfinished" + }, + { "name": "deployInitialReal", "status": "succeeded" }, @@ -346,11 +363,15 @@ "status": "failed" }, { - "name": "deployReal", + "name": "startStagingSetup", "status": "unfinished" }, { - "name": "installTester", + "name": "endStagingSetup", + "status": "unfinished" + }, + { + "name": "deployReal", "status": "unfinished" }, { @@ -381,36 +402,40 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/staging-test/run/run 4 of staging-test for tenant.application", - "status": "installationFailed" + ] }, { + "id": 3, + "url": "https://some.url:43/instance/default/job/staging-test/run/run 3 of staging-test for tenant.application", + "start": 2000, + "end": 2000, + "status": "success", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 3, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 2, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } }, - "start": 2000, - "end": 2000, - "id": 3, "steps": [ { "name": "deployTester", "status": "succeeded" }, { + "name": "installTester", + "status": "succeeded" + }, + { "name": "deployInitialReal", "status": "succeeded" }, @@ -419,11 +444,15 @@ "status": "succeeded" }, { - "name": "deployReal", + "name": "startStagingSetup", "status": "succeeded" }, { - "name": "installTester", + "name": "endStagingSetup", + "status": "succeeded" + }, + { + "name": "deployReal", "status": "succeeded" }, { @@ -454,36 +483,40 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/staging-test/run/run 3 of staging-test for tenant.application", - "status": "success" + ] }, { + "id": 2, + "url": "https://some.url:43/instance/default/job/staging-test/run/run 2 of staging-test for tenant.application", + "start": 1000, + "end": 1000, + "status": "success", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 2, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } }, - "start": 1000, - "end": 1000, - "id": 2, "steps": [ { "name": "deployTester", "status": "succeeded" }, { + "name": "installTester", + "status": "succeeded" + }, + { "name": "deployInitialReal", "status": "succeeded" }, @@ -492,11 +525,15 @@ "status": "succeeded" }, { - "name": "deployReal", + "name": "startStagingSetup", "status": "succeeded" }, { - "name": "installTester", + "name": "endStagingSetup", + "status": "succeeded" + }, + { + "name": "deployReal", "status": "succeeded" }, { @@ -527,29 +564,33 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/staging-test/run/run 2 of staging-test for tenant.application", - "status": "success" + ] }, { + "id": 1, + "url": "https://some.url:43/instance/default/job/staging-test/run/run 1 of staging-test for tenant.application", + "start": 0, + "end": 0, + "status": "success", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" - }, - "targetPlatform": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" + } }, - "start": 0, - "end": 0, - "id": 1, "steps": [ { "name": "deployTester", "status": "succeeded" }, { + "name": "installTester", + "status": "succeeded" + }, + { "name": "deployInitialReal", "status": "succeeded" }, @@ -558,11 +599,15 @@ "status": "succeeded" }, { - "name": "deployReal", + "name": "startStagingSetup", "status": "succeeded" }, { - "name": "installTester", + "name": "endStagingSetup", + "status": "succeeded" + }, + { + "name": "deployReal", "status": "succeeded" }, { @@ -593,63 +638,66 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/staging-test/run/run 1 of staging-test for tenant.application", - "status": "success" + ] } - ], - "url": "https://some.url:43/instance/default/job/staging-test", - "dependencies": [] + ] }, { + "type": "deployment", + "dependencies": [ + 0, + 2 + ], "declared": true, + "instance": "default", "jobName": "production-us-central-1", + "url": "https://some.url:43/instance/default/job/production-us-central-1", "environment": "prod", - "instance": "default", + "region": "prod.us-central-1", "currentPlatform": "6.1.0", - "toRun": [], "currentApplication": { - "commit": "commit1", "id": 3, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, - "type": "deployment", - "region": "prod.us-central-1", + "toRun": [], "runs": [ { + "id": 3, + "url": "https://some.url:43/instance/default/job/production-us-central-1/run/run 3 of production-us-central-1 for tenant.application", + "start": 2000, + "status": "running", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 3, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 2, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } }, - "start": 2000, - "id": 3, "steps": [ { "name": "deployTester", "status": "succeeded" }, { - "name": "deployReal", - "status": "succeeded" - }, - { "name": "installTester", "status": "unfinished" }, { + "name": "deployReal", + "status": "succeeded" + }, + { "name": "installReal", "status": "unfinished" }, @@ -669,41 +717,41 @@ "name": "report", "status": "unfinished" } - ], - "url": "https://some.url:43/instance/default/job/production-us-central-1/run/run 3 of production-us-central-1 for tenant.application", - "status": "running" + ] }, { + "id": 2, + "url": "https://some.url:43/instance/default/job/production-us-central-1/run/run 2 of production-us-central-1 for tenant.application", + "start": 1000, + "end": 1000, + "status": "success", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 2, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } }, - "start": 1000, - "end": 1000, - "id": 2, "steps": [ { "name": "deployTester", "status": "succeeded" }, { - "name": "deployReal", + "name": "installTester", "status": "succeeded" }, { - "name": "installTester", + "name": "deployReal", "status": "succeeded" }, { @@ -726,34 +774,34 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/production-us-central-1/run/run 2 of production-us-central-1 for tenant.application", - "status": "success" + ] }, { + "id": 1, + "url": "https://some.url:43/instance/default/job/production-us-central-1/run/run 1 of production-us-central-1 for tenant.application", + "start": 0, + "end": 0, + "status": "success", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" - }, - "targetPlatform": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" + } }, - "start": 0, - "end": 0, - "id": 1, "steps": [ { "name": "deployTester", "status": "succeeded" }, { - "name": "deployReal", + "name": "installTester", "status": "succeeded" }, { - "name": "installTester", + "name": "deployReal", "status": "succeeded" }, { @@ -776,65 +824,64 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/production-us-central-1/run/run 1 of production-us-central-1 for tenant.application", - "status": "success" + ] } - ], - "url": "https://some.url:43/instance/default/job/production-us-central-1", - "dependencies": [ - 0, - 2 ] }, { + "type": "test", + "dependencies": [ + 3 + ], "declared": true, + "instance": "default", "jobName": "test-us-central-1", + "url": "https://some.url:43/instance/default/job/test-us-central-1", "environment": "prod", - "instance": "default", + "region": "prod.us-central-1", "toRun": [ { "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 3, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 3, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } } } ], - "type": "test", - "region": "prod.us-central-1", "runs": [ { + "id": 2, + "url": "https://some.url:43/instance/default/job/test-us-central-1/run/run 2 of test-us-central-1 for tenant.application", + "start": 1000, + "end": 1000, + "status": "success", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 2, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 2, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } }, - "start": 1000, - "end": 1000, - "id": 2, "steps": [ { "name": "deployTester", @@ -860,30 +907,30 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/test-us-central-1/run/run 2 of test-us-central-1 for tenant.application", - "status": "success" + ] }, { + "id": 1, + "url": "https://some.url:43/instance/default/job/test-us-central-1/run/run 1 of test-us-central-1 for tenant.application", + "start": 0, + "end": 0, + "status": "success", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } }, - "start": 0, - "end": 0, - "id": 1, "steps": [ { "name": "deployTester", @@ -909,82 +956,82 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/test-us-central-1/run/run 1 of test-us-central-1 for tenant.application", - "status": "success" + ] } - ], - "url": "https://some.url:43/instance/default/job/test-us-central-1", - "dependencies": [ - 3 ] }, { + "type": "deployment", + "dependencies": [ + 4 + ], "declared": true, + "instance": "default", "jobName": "production-us-west-1", + "url": "https://some.url:43/instance/default/job/production-us-west-1", "environment": "prod", - "instance": "default", + "region": "prod.us-west-1", "currentPlatform": "6.1.0", + "currentApplication": { + "id": 2, + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" + }, "toRun": [ { "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 3, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 2, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } } } ], - "currentApplication": { - "commit": "commit1", - "id": 2, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" - }, - "type": "deployment", - "region": "prod.us-west-1", "runs": [ { + "id": 2, + "url": "https://some.url:43/instance/default/job/production-us-west-1/run/run 2 of production-us-west-1 for tenant.application", + "start": 1000, + "end": 1000, + "status": "testFailure", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 2, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } }, - "start": 1000, - "end": 1000, - "id": 2, "steps": [ { "name": "deployTester", "status": "succeeded" }, { - "name": "deployReal", + "name": "installTester", "status": "succeeded" }, { - "name": "installTester", + "name": "deployReal", "status": "succeeded" }, { @@ -1007,34 +1054,34 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/production-us-west-1/run/run 2 of production-us-west-1 for tenant.application", - "status": "testFailure" + ] }, { + "id": 1, + "url": "https://some.url:43/instance/default/job/production-us-west-1/run/run 1 of production-us-west-1 for tenant.application", + "start": 0, + "end": 0, + "status": "success", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" - }, - "targetPlatform": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" + } }, - "start": 0, - "end": 0, - "id": 1, "steps": [ { "name": "deployTester", "status": "succeeded" }, { - "name": "deployReal", + "name": "installTester", "status": "succeeded" }, { - "name": "installTester", + "name": "deployReal", "status": "succeeded" }, { @@ -1057,82 +1104,82 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/production-us-west-1/run/run 1 of production-us-west-1 for tenant.application", - "status": "success" + ] } - ], - "url": "https://some.url:43/instance/default/job/production-us-west-1", - "dependencies": [ - 4 ] }, { + "type": "deployment", + "dependencies": [ + 4 + ], "declared": true, + "instance": "default", "jobName": "production-us-east-3", + "url": "https://some.url:43/instance/default/job/production-us-east-3", "environment": "prod", - "instance": "default", + "region": "prod.us-east-3", "currentPlatform": "6.1.0", + "currentApplication": { + "id": 1, + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" + }, "toRun": [ { "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 3, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } } } ], - "currentApplication": { - "commit": "commit1", - "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" - }, - "type": "deployment", - "region": "prod.us-east-3", "runs": [ { + "id": 2, + "url": "https://some.url:43/instance/default/job/production-us-east-3/run/run 2 of production-us-east-3 for tenant.application", + "start": 1000, + "end": 1000, + "status": "deploymentFailed", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 2, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" }, "sourcePlatform": "6.1.0", - "targetPlatform": "6.1.0", "sourceApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" } }, - "start": 1000, - "end": 1000, - "id": 2, "steps": [ { "name": "deployTester", "status": "failed" }, { - "name": "deployReal", + "name": "installTester", "status": "unfinished" }, { - "name": "installTester", + "name": "deployReal", "status": "unfinished" }, { @@ -1155,34 +1202,34 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/production-us-east-3/run/run 2 of production-us-east-3 for tenant.application", - "status": "deploymentFailed" + ] }, { + "id": 1, + "url": "https://some.url:43/instance/default/job/production-us-east-3/run/run 1 of production-us-east-3 for tenant.application", + "start": 0, + "end": 0, + "status": "success", "versions": { + "targetPlatform": "6.1.0", "targetApplication": { - "commit": "commit1", "id": 1, - "sourceUrl": "repository1/tree/commit1", - "compileVersion": "6.1.0" - }, - "targetPlatform": "6.1.0" + "commit": "commit1", + "compileVersion": "6.1.0", + "sourceUrl": "repository1/tree/commit1" + } }, - "start": 0, - "end": 0, - "id": 1, "steps": [ { "name": "deployTester", "status": "succeeded" }, { - "name": "deployReal", + "name": "installTester", "status": "succeeded" }, { - "name": "installTester", + "name": "deployReal", "status": "succeeded" }, { @@ -1205,17 +1252,9 @@ "name": "report", "status": "succeeded" } - ], - "url": "https://some.url:43/instance/default/job/production-us-east-3/run/run 1 of production-us-east-3 for tenant.application", - "status": "success" + ] } - ], - "url": "https://some.url:43/instance/default/job/production-us-east-3", - "dependencies": [ - 4 ] } - ], - "tenant": "tenant" + ] } - 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 baace75bf6c..e619e66b462 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 @@ -39,11 +39,11 @@ "status": "unfinished" }, { - "name": "deployReal", + "name": "installTester", "status": "unfinished" }, { - "name": "installTester", + "name": "deployReal", "status": "unfinished" }, { @@ -97,11 +97,11 @@ "status": "succeeded" }, { - "name": "deployReal", + "name": "installTester", "status": "succeeded" }, { - "name": "installTester", + "name": "deployReal", "status": "succeeded" }, { @@ -167,6 +167,10 @@ "status": "unfinished" }, { + "name": "installTester", + "status": "unfinished" + }, + { "name": "deployInitialReal", "status": "unfinished" }, @@ -175,11 +179,15 @@ "status": "unfinished" }, { - "name": "deployReal", + "name": "startStagingSetup", "status": "unfinished" }, { - "name": "installTester", + "name": "endStagingSetup", + "status": "unfinished" + }, + { + "name": "deployReal", "status": "unfinished" }, { @@ -233,6 +241,10 @@ "status": "succeeded" }, { + "name": "installTester", + "status": "succeeded" + }, + { "name": "deployInitialReal", "status": "succeeded" }, @@ -241,11 +253,15 @@ "status": "succeeded" }, { - "name": "deployReal", + "name": "startStagingSetup", "status": "succeeded" }, { - "name": "installTester", + "name": "endStagingSetup", + "status": "succeeded" + }, + { + "name": "deployReal", "status": "succeeded" }, { @@ -326,11 +342,11 @@ "status": "succeeded" }, { - "name": "deployReal", + "name": "installTester", "status": "succeeded" }, { - "name": "installTester", + "name": "deployReal", "status": "succeeded" }, { @@ -401,11 +417,11 @@ "status": "unfinished" }, { - "name": "deployReal", + "name": "installTester", "status": "unfinished" }, { - "name": "installTester", + "name": "deployReal", "status": "unfinished" }, { @@ -477,11 +493,11 @@ "status": "unfinished" }, { - "name": "deployReal", + "name": "installTester", "status": "unfinished" }, { - "name": "installTester", + "name": "deployReal", "status": "unfinished" }, { diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/jobs.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/jobs.json index 32031563d89..dc37c3b4bb4 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/jobs.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/jobs.json @@ -17,7 +17,7 @@ "sourceUrl": "repository1/tree/commit1", "commit": "commit1" }, - "at": "(ignore)", + "at": 1000, "deploying": "0 of 3 complete" } }, @@ -59,8 +59,8 @@ }, "steps": { "deployTester": "unfinished", - "deployReal": "unfinished", "installTester": "unfinished", + "deployReal": "unfinished", "installReal": "unfinished", "startTests": "unfinished", "endTests": "unfinished", @@ -91,8 +91,8 @@ }, "steps": { "deployTester": "succeeded", - "deployReal": "succeeded", "installTester": "succeeded", + "deployReal": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -131,10 +131,12 @@ }, "steps": { "deployTester": "unfinished", + "installTester": "unfinished", "deployInitialReal": "unfinished", "installInitialReal": "unfinished", + "startStagingSetup": "unfinished", + "endStagingSetup": "unfinished", "deployReal": "unfinished", - "installTester": "unfinished", "installReal": "unfinished", "startTests": "unfinished", "endTests": "unfinished", @@ -165,10 +167,12 @@ }, "steps": { "deployTester": "succeeded", + "installTester": "succeeded", "deployInitialReal": "succeeded", "installInitialReal": "succeeded", + "startStagingSetup": "succeeded", + "endStagingSetup": "succeeded", "deployReal": "succeeded", - "installTester": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -227,8 +231,8 @@ }, "steps": { "deployTester": "succeeded", - "deployReal": "succeeded", "installTester": "succeeded", + "deployReal": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -265,8 +269,8 @@ }, "steps": { "deployTester": "unfinished", - "deployReal": "unfinished", "installTester": "unfinished", + "deployReal": "unfinished", "installReal": "unfinished", "startTests": "unfinished", "endTests": "unfinished", @@ -299,8 +303,8 @@ }, "steps": { "deployTester": "unfinished", - "deployReal": "unfinished", "installTester": "unfinished", + "deployReal": "unfinished", "installReal": "unfinished", "startTests": "unfinished", "endTests": "unfinished", @@ -342,4 +346,3 @@ } } } - diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/overview.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/overview.json index b6a1bade306..ad00476154c 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/overview.json +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/overview.json @@ -125,8 +125,8 @@ }, "steps": { "deployTester": "succeeded", - "deployReal": "succeeded", "installTester": "succeeded", + "deployReal": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -173,8 +173,8 @@ }, "steps": { "deployTester": "succeeded", - "deployReal": "succeeded", "installTester": "succeeded", + "deployReal": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -209,8 +209,8 @@ }, "steps": { "deployTester": "succeeded", - "deployReal": "succeeded", "installTester": "succeeded", + "deployReal": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -293,10 +293,12 @@ }, "steps": { "deployTester": "succeeded", + "installTester": "unfinished", "deployInitialReal": "succeeded", "installInitialReal": "failed", + "startStagingSetup": "unfinished", + "endStagingSetup": "unfinished", "deployReal": "unfinished", - "installTester": "unfinished", "installReal": "unfinished", "startTests": "unfinished", "endTests": "unfinished", @@ -339,10 +341,12 @@ }, "steps": { "deployTester": "succeeded", + "installTester": "unfinished", "deployInitialReal": "succeeded", "installInitialReal": "failed", + "startStagingSetup": "unfinished", + "endStagingSetup": "unfinished", "deployReal": "unfinished", - "installTester": "unfinished", "installReal": "unfinished", "startTests": "unfinished", "endTests": "unfinished", @@ -385,10 +389,12 @@ }, "steps": { "deployTester": "succeeded", + "installTester": "succeeded", "deployInitialReal": "succeeded", "installInitialReal": "succeeded", + "startStagingSetup": "succeeded", + "endStagingSetup": "succeeded", "deployReal": "succeeded", - "installTester": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -435,10 +441,12 @@ }, "steps": { "deployTester": "succeeded", + "installTester": "succeeded", "deployInitialReal": "succeeded", "installInitialReal": "succeeded", + "startStagingSetup": "succeeded", + "endStagingSetup": "succeeded", "deployReal": "succeeded", - "installTester": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -473,10 +481,12 @@ }, "steps": { "deployTester": "succeeded", + "installTester": "succeeded", "deployInitialReal": "succeeded", "installInitialReal": "succeeded", + "startStagingSetup": "succeeded", + "endStagingSetup": "succeeded", "deployReal": "succeeded", - "installTester": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -527,8 +537,8 @@ }, "steps": { "deployTester": "succeeded", - "deployReal": "succeeded", "installTester": "unfinished", + "deployReal": "succeeded", "installReal": "unfinished", "startTests": "unfinished", "endTests": "unfinished", @@ -572,8 +582,8 @@ }, "steps": { "deployTester": "succeeded", - "deployReal": "succeeded", "installTester": "succeeded", + "deployReal": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -606,8 +616,8 @@ }, "steps": { "deployTester": "succeeded", - "deployReal": "succeeded", "installTester": "succeeded", + "deployReal": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -808,8 +818,8 @@ }, "steps": { "deployTester": "succeeded", - "deployReal": "succeeded", "installTester": "succeeded", + "deployReal": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "failed", @@ -842,8 +852,8 @@ }, "steps": { "deployTester": "succeeded", - "deployReal": "succeeded", "installTester": "succeeded", + "deployReal": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -924,8 +934,8 @@ }, "steps": { "deployTester": "failed", - "deployReal": "unfinished", "installTester": "unfinished", + "deployReal": "unfinished", "installReal": "unfinished", "startTests": "unfinished", "endTests": "unfinished", @@ -954,8 +964,8 @@ }, "steps": { "deployTester": "succeeded", - "deployReal": "succeeded", "installTester": "succeeded", + "deployReal": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -975,4 +985,3 @@ }, "devJobs": {} } - 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 856dff7f9f8..4238ce4b834 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 @@ -1,232 +1,242 @@ { "1": { + "id": 1, + "status": "success", + "start": 0, + "end": 0, "wantedPlatform": "6.1", - "log": "https://some.url:43/root/run/1", "wantedApplication": { - "sourceUrl": "repository1/tree/commit1", + "hash": "1.0.1-commit1", "build": 1, - "commit": "commit1", "source": { "gitRepository": "repository1", - "gitCommit": "commit1", - "gitBranch": "master" + "gitBranch": "master", + "gitCommit": "commit1" }, - "hash": "1.0.1-commit1" + "sourceUrl": "repository1/tree/commit1", + "commit": "commit1" }, - "start": 0, - "end": 0, - "id": 1, "steps": { - "deployInitialReal": "succeeded", - "installInitialReal": "succeeded", - "startTests": "succeeded", "deployTester": "succeeded", - "report": "succeeded", "installTester": "succeeded", + "deployInitialReal": "succeeded", + "installInitialReal": "succeeded", + "startStagingSetup": "succeeded", + "endStagingSetup": "succeeded", "deployReal": "succeeded", "installReal": "succeeded", - "deactivateTester": "succeeded", + "startTests": "succeeded", "endTests": "succeeded", "copyVespaLogs": "succeeded", - "deactivateReal": "succeeded" + "deactivateReal": "succeeded", + "deactivateTester": "succeeded", + "report": "succeeded" }, "tasks": { - "test": "succeeded", + "deploy": "succeeded", "install": "succeeded", - "deploy": "succeeded" + "test": "succeeded" }, - "status": "success" + "log": "https://some.url:43/root/run/1" }, "2": { + "id": 2, + "status": "success", + "start": 1000, + "end": 1000, "wantedPlatform": "6.1", - "currentPlatform": "6.1", - "log": "https://some.url:43/root/run/2", "wantedApplication": { - "sourceUrl": "repository1/tree/commit1", + "hash": "1.0.2-commit1", "build": 2, - "commit": "commit1", "source": { "gitRepository": "repository1", - "gitCommit": "commit1", - "gitBranch": "master" + "gitBranch": "master", + "gitCommit": "commit1" }, - "hash": "1.0.2-commit1" + "sourceUrl": "repository1/tree/commit1", + "commit": "commit1" }, + "currentPlatform": "6.1", "currentApplication": { - "sourceUrl": "repository1/tree/commit1", + "hash": "1.0.1-commit1", "build": 1, - "commit": "commit1", "source": { "gitRepository": "repository1", - "gitCommit": "commit1", - "gitBranch": "master" + "gitBranch": "master", + "gitCommit": "commit1" }, - "hash": "1.0.1-commit1" + "sourceUrl": "repository1/tree/commit1", + "commit": "commit1" }, - "start": 1000, - "end": 1000, - "id": 2, "steps": { - "deployInitialReal": "succeeded", - "installInitialReal": "succeeded", - "startTests": "succeeded", "deployTester": "succeeded", - "report": "succeeded", "installTester": "succeeded", + "deployInitialReal": "succeeded", + "installInitialReal": "succeeded", + "startStagingSetup": "succeeded", + "endStagingSetup": "succeeded", "deployReal": "succeeded", "installReal": "succeeded", - "deactivateTester": "succeeded", + "startTests": "succeeded", "endTests": "succeeded", "copyVespaLogs": "succeeded", - "deactivateReal": "succeeded" + "deactivateReal": "succeeded", + "deactivateTester": "succeeded", + "report": "succeeded" }, "tasks": { - "test": "succeeded", + "deploy": "succeeded", "install": "succeeded", - "deploy": "succeeded" + "test": "succeeded" }, - "status": "success" + "log": "https://some.url:43/root/run/2" }, "3": { + "id": 3, + "status": "success", + "start": 2000, + "end": 2000, "wantedPlatform": "6.1", - "currentPlatform": "6.1", - "log": "https://some.url:43/root/run/3", "wantedApplication": { - "sourceUrl": "repository1/tree/commit1", + "hash": "1.0.3-commit1", "build": 3, - "commit": "commit1", "source": { "gitRepository": "repository1", - "gitCommit": "commit1", - "gitBranch": "master" + "gitBranch": "master", + "gitCommit": "commit1" }, - "hash": "1.0.3-commit1" + "sourceUrl": "repository1/tree/commit1", + "commit": "commit1" }, + "currentPlatform": "6.1", "currentApplication": { - "sourceUrl": "repository1/tree/commit1", + "hash": "1.0.2-commit1", "build": 2, - "commit": "commit1", "source": { "gitRepository": "repository1", - "gitCommit": "commit1", - "gitBranch": "master" + "gitBranch": "master", + "gitCommit": "commit1" }, - "hash": "1.0.2-commit1" + "sourceUrl": "repository1/tree/commit1", + "commit": "commit1" }, - "start": 2000, - "end": 2000, - "id": 3, "steps": { - "deployInitialReal": "succeeded", - "installInitialReal": "succeeded", - "startTests": "succeeded", "deployTester": "succeeded", - "report": "succeeded", "installTester": "succeeded", + "deployInitialReal": "succeeded", + "installInitialReal": "succeeded", + "startStagingSetup": "succeeded", + "endStagingSetup": "succeeded", "deployReal": "succeeded", "installReal": "succeeded", - "deactivateTester": "succeeded", + "startTests": "succeeded", "endTests": "succeeded", "copyVespaLogs": "succeeded", - "deactivateReal": "succeeded" + "deactivateReal": "succeeded", + "deactivateTester": "succeeded", + "report": "succeeded" }, "tasks": { - "test": "succeeded", + "deploy": "succeeded", "install": "succeeded", - "deploy": "succeeded" + "test": "succeeded" }, - "status": "success" + "log": "https://some.url:43/root/run/3" }, "4": { + "id": 4, + "status": "installationFailed", + "start": 2000, + "end": 2000, "wantedPlatform": "6.1", - "currentPlatform": "6.1", - "log": "https://some.url:43/root/run/4", "wantedApplication": { - "sourceUrl": "repository1/tree/commit1", + "hash": "1.0.3-commit1", "build": 3, - "commit": "commit1", "source": { "gitRepository": "repository1", - "gitCommit": "commit1", - "gitBranch": "master" + "gitBranch": "master", + "gitCommit": "commit1" }, - "hash": "1.0.3-commit1" + "sourceUrl": "repository1/tree/commit1", + "commit": "commit1" }, + "currentPlatform": "6.1", "currentApplication": { - "sourceUrl": "repository1/tree/commit1", + "hash": "1.0.1-commit1", "build": 1, - "commit": "commit1", "source": { "gitRepository": "repository1", - "gitCommit": "commit1", - "gitBranch": "master" + "gitBranch": "master", + "gitCommit": "commit1" }, - "hash": "1.0.1-commit1" + "sourceUrl": "repository1/tree/commit1", + "commit": "commit1" }, - "start": 2000, - "end": 2000, - "id": 4, "steps": { - "deployInitialReal": "succeeded", - "installInitialReal": "failed", - "startTests": "unfinished", "deployTester": "succeeded", - "report": "succeeded", "installTester": "unfinished", + "deployInitialReal": "succeeded", + "installInitialReal": "failed", + "startStagingSetup": "unfinished", + "endStagingSetup": "unfinished", "deployReal": "unfinished", "installReal": "unfinished", - "deactivateTester": "succeeded", + "startTests": "unfinished", "endTests": "unfinished", "copyVespaLogs": "succeeded", - "deactivateReal": "succeeded" + "deactivateReal": "succeeded", + "deactivateTester": "succeeded", + "report": "succeeded" }, "tasks": {}, - "status": "installationFailed" + "log": "https://some.url:43/root/run/4" }, "5": { + "id": 5, + "status": "installationFailed", + "start": 102000, + "end": 102000, "wantedPlatform": "6.1", - "currentPlatform": "6.1", - "log": "https://some.url:43/root/run/5", "wantedApplication": { - "sourceUrl": "repository1/tree/commit1", + "hash": "1.0.3-commit1", "build": 3, - "commit": "commit1", "source": { "gitRepository": "repository1", - "gitCommit": "commit1", - "gitBranch": "master" + "gitBranch": "master", + "gitCommit": "commit1" }, - "hash": "1.0.3-commit1" + "sourceUrl": "repository1/tree/commit1", + "commit": "commit1" }, + "currentPlatform": "6.1", "currentApplication": { - "sourceUrl": "repository1/tree/commit1", + "hash": "1.0.1-commit1", "build": 1, - "commit": "commit1", "source": { "gitRepository": "repository1", - "gitCommit": "commit1", - "gitBranch": "master" + "gitBranch": "master", + "gitCommit": "commit1" }, - "hash": "1.0.1-commit1" + "sourceUrl": "repository1/tree/commit1", + "commit": "commit1" }, - "start": 102000, - "end": 102000, - "id": 5, "steps": { - "deployInitialReal": "succeeded", - "installInitialReal": "failed", - "startTests": "unfinished", "deployTester": "succeeded", - "report": "succeeded", "installTester": "unfinished", + "deployInitialReal": "succeeded", + "installInitialReal": "failed", + "startStagingSetup": "unfinished", + "endStagingSetup": "unfinished", "deployReal": "unfinished", "installReal": "unfinished", - "deactivateTester": "succeeded", + "startTests": "unfinished", "endTests": "unfinished", "copyVespaLogs": "succeeded", - "deactivateReal": "succeeded" + "deactivateReal": "succeeded", + "deactivateTester": "succeeded", + "report": "succeeded" }, "tasks": {}, - "status": "installationFailed" + "log": "https://some.url:43/root/run/5" } } 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 986109cd1be..1f12f1e87af 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 @@ -24,29 +24,32 @@ "message": "foo" } ], - "deployReal": [ + "installTester": [ { "at": "(ignore)", "type": "info", - "message": "Deploying platform version 6.1 and application version 1.0.1-commit1 ..." + "message": "Checking installation of tester container ..." }, { "at": "(ignore)", "type": "info", - "message": "No services requiring restart." + "message": " host-tenant1:application1:instance1-t-test.us-east-1: unorchestrated 6.1 " }, { "at": "(ignore)", "type": "info", - "message": "Deployment successful." + "message": "Wanted config generation is 2" }, { "at": "(ignore)", "type": "info", - "message": "foo" - } - ], - "installTester": [ + "message": " host-tenant1:application1:instance1-t-test.us-east-1: container on port 43 has config generation 1" + }, + { + "at": "(ignore)", + "type": "info", + "message": "Installation of tester not yet complete." + }, { "at": "(ignore)", "type": "info", @@ -115,7 +118,17 @@ { "at": "(ignore)", "type": "info", - "message": " host-tenant1:application1:instance1-t-test.us-east-1: container on port 43 has config generation 1" + "message": "All services on wanted config generation." + }, + { + "at": "(ignore)", + "type": "info", + "message": "Attempting to find deployment endpoints ..." + }, + { + "at": "(ignore)", + "type": "info", + "message": "Endpoints not yet ready." }, { "at": "(ignore)", @@ -140,47 +153,66 @@ { "at": "(ignore)", "type": "info", - "message": " host-tenant1:application1:instance1-t-test.us-east-1: container on port 43 has config generation 1" + "message": "All services on wanted config generation." }, { "at": "(ignore)", "type": "info", - "message": "Installation of tester not yet complete." + "message": "Attempting to find deployment endpoints ..." }, { "at": "(ignore)", "type": "info", - "message": "Checking installation of tester container ..." + "message": "Found endpoints:" }, { "at": "(ignore)", "type": "info", - "message": " host-tenant1:application1:instance1-t-test.us-east-1: unorchestrated 6.1 " + "message": "- test.us-east-1" }, { "at": "(ignore)", "type": "info", - "message": "Wanted config generation is 2" + "message": " |-- https://instance1-t--application1--tenant1.us-east-1.test.vespa:43 (cluster 'default')" }, { "at": "(ignore)", "type": "info", - "message": " host-tenant1:application1:instance1-t-test.us-east-1: container on port 43 has config generation 1" + "message": "Tester container successfully installed!" + } + ], + "deployReal": [ + { + "at": "(ignore)", + "type": "info", + "message": "Deploying platform version 6.1 and application version 1.0.1-commit1 ..." }, { "at": "(ignore)", "type": "info", - "message": "Installation of tester not yet complete." + "message": "No services requiring restart." }, { "at": "(ignore)", "type": "info", - "message": "Checking installation of tester container ..." + "message": "Deployment successful." }, { "at": "(ignore)", "type": "info", - "message": " host-tenant1:application1:instance1-t-test.us-east-1: unorchestrated 6.1 " + "message": "foo" + } + ], + "installReal": [ + { + "at": "(ignore)", + "type": "info", + "message": "Checking installation of 6.1 and 1.0.1-commit1 ..." + }, + { + "at": "(ignore)", + "type": "info", + "message": " host-tenant1:application1:instance1-test.us-east-1: unorchestrated 6.1 " }, { "at": "(ignore)", @@ -190,32 +222,47 @@ { "at": "(ignore)", "type": "info", - "message": "All services on wanted config generation." + "message": " host-tenant1:application1:instance1-test.us-east-1: container on port 43 has config generation 1" }, { "at": "(ignore)", "type": "info", - "message": "Attempting to find deployment endpoints ..." + "message": "Installation not yet complete." }, { "at": "(ignore)", "type": "info", - "message": "Endpoints not yet ready." + "message": "Checking installation of 6.1 and 1.0.1-commit1 ..." }, { "at": "(ignore)", "type": "info", - "message": "Installation of tester not yet complete." + "message": " host-tenant1:application1:instance1-test.us-east-1: unorchestrated 6.1 " }, { "at": "(ignore)", "type": "info", - "message": "Checking installation of tester container ..." + "message": "Wanted config generation is 2" }, { "at": "(ignore)", "type": "info", - "message": " host-tenant1:application1:instance1-t-test.us-east-1: unorchestrated 6.1 " + "message": " host-tenant1:application1:instance1-test.us-east-1: container on port 43 has config generation 1" + }, + { + "at": "(ignore)", + "type": "info", + "message": "Installation not yet complete." + }, + { + "at": "(ignore)", + "type": "info", + "message": "Checking installation of 6.1 and 1.0.1-commit1 ..." + }, + { + "at": "(ignore)", + "type": "info", + "message": " host-tenant1:application1:instance1-test.us-east-1: unorchestrated 6.1 " }, { "at": "(ignore)", @@ -225,35 +272,38 @@ { "at": "(ignore)", "type": "info", - "message": "All services on wanted config generation." + "message": " host-tenant1:application1:instance1-test.us-east-1: container on port 43 has config generation 1" }, { "at": "(ignore)", "type": "info", - "message": "Attempting to find deployment endpoints ..." + "message": "Installation not yet complete." }, { "at": "(ignore)", "type": "info", - "message": "Found endpoints:" + "message": "Checking installation of 6.1 and 1.0.1-commit1 ..." }, { "at": "(ignore)", "type": "info", - "message": "- test.us-east-1" + "message": " host-tenant1:application1:instance1-test.us-east-1: unorchestrated 6.1 " }, { "at": "(ignore)", "type": "info", - "message": " |-- https://instance1-t--application1--tenant1.us-east-1.test.vespa:43 (cluster 'default')" + "message": "Wanted config generation is 2" }, { "at": "(ignore)", "type": "info", - "message": "Tester container successfully installed!" - } - ], - "installReal": [ + "message": " host-tenant1:application1:instance1-test.us-east-1: container on port 43 has config generation 1" + }, + { + "at": "(ignore)", + "type": "info", + "message": "Installation not yet complete." + }, { "at": "(ignore)", "type": "info", @@ -399,17 +449,17 @@ } ] }, - "lastId": 75, + "lastId": 85, "steps": { "deployTester": { "status": "succeeded", "startMillis": "(ignore)" }, - "deployReal": { + "installTester": { "status": "succeeded", "startMillis": "(ignore)" }, - "installTester": { + "deployReal": { "status": "succeeded", "startMillis": "(ignore)" }, @@ -443,4 +493,3 @@ } } } - 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 2c12db0036b..3234333c092 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 @@ -18,8 +18,8 @@ }, "steps": { "deployTester": "succeeded", - "deployReal": "succeeded", "installTester": "succeeded", + "deployReal": "succeeded", "installReal": "succeeded", "startTests": "succeeded", "endTests": "succeeded", @@ -53,8 +53,8 @@ }, "steps": { "deployTester": "unfinished", - "deployReal": "unfinished", "installTester": "unfinished", + "deployReal": "unfinished", "installReal": "unfinished", "startTests": "unfinished", "endTests": "unfinished", @@ -67,4 +67,3 @@ "log": "http://localhost:8080/application/v4/tenant/tenant1/application/application1/instance/instance1/job/system-test/run/2" } } - diff --git a/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestProfile.java b/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestProfile.java index e49650e35e3..c62511dc258 100644 --- a/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestProfile.java +++ b/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestProfile.java @@ -8,6 +8,7 @@ package com.yahoo.vespa.hosted.testrunner; enum TestProfile { SYSTEM_TEST("system, com.yahoo.vespa.tenant.systemtest.base.SystemTest", true), + STAGING_SETUP_TEST("staging-setup, com.yahoo.vespa.tenant.systemtest.base.StagingTest", false), STAGING_TEST("staging, com.yahoo.vespa.tenant.systemtest.base.StagingTest", true), PRODUCTION_TEST("production, com.yahoo.vespa.tenant.systemtest.base.ProductionTest", false); diff --git a/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestRunner.java b/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestRunner.java index 9e7b80d2be3..bf95b2ef6c5 100644 --- a/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestRunner.java +++ b/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestRunner.java @@ -134,14 +134,9 @@ public class TestRunner { ProcessBuilder builder = testBuilder.apply(testProfile); { LogRecord record = new LogRecord(Level.INFO, - String.format("Starting %s. Artifacts directory: %s Config file: %s\n" + - "Command to run: %s\n" + - "Environment:\n%s", + String.format("Starting %s. Artifacts directory: %s Config file: %s\nCommand to run: %s\n", testProfile.name(), artifactsPath, configFile, - String.join(" ", builder.command()), - System.getenv().entrySet().stream() - .map(entry -> entry.getKey() + ": " + entry.getValue()) - .collect(Collectors.joining("\n")))); + String.join(" ", builder.command()))); log.put(record.getSequenceNumber(), record); logger.log(record); log.put(record.getSequenceNumber(), record); diff --git a/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestRunnerHandler.java b/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestRunnerHandler.java index b5366a97e86..275d9f97dcf 100644 --- a/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestRunnerHandler.java +++ b/vespa-testrunner-components/src/main/java/com/yahoo/vespa/hosted/testrunner/TestRunnerHandler.java @@ -87,7 +87,7 @@ public class TestRunnerHandler extends LoggingRequestHandler { private static String lastElement(String path) { if (path.endsWith("/")) - path = path.substring(0, path.length()-1); + path = path.substring(0, path.length() - 1); int lastSlash = path.lastIndexOf("/"); if (lastSlash < 0) return path; return path.substring(lastSlash + 1, path.length()); |