summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValerij Fredriksen <freva@users.noreply.github.com>2020-02-07 18:19:37 +0100
committerGitHub <noreply@github.com>2020-02-07 18:19:37 +0100
commit8745da60f66c7fa98fd33bbecc48dc10267079ea (patch)
treed0eb703b8293c2cea07b9503e2d73a3734ee85b9
parente4776069cfdf95b8483474e2ca564398653007ce (diff)
parent569a511ae4c391e37c4801b0b54654dad43a27bc (diff)
Merge pull request #12123 from vespa-engine/revert-12114-jvenstad/reapply-deployment-graph-API-additions
Revert "Jvenstad/reapply deployment graph api additions"
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentStatus.java3
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java2
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelper.java82
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/ApplicationPackageBuilder.java2
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelperTest.java11
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/deployment-overview-2.json356
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/deployment-overview.json138
7 files changed, 192 insertions, 402 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentStatus.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentStatus.java
index 35ec6c8d769..3a60c480100 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentStatus.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentStatus.java
@@ -52,8 +52,7 @@ import static java.util.stream.Collectors.toUnmodifiableMap;
public class DeploymentStatus {
public static List<JobId> jobsFor(Application application, SystemName system) {
- if ( DeploymentSpec.empty.equals(application.deploymentSpec())
- || application.projectId().isEmpty())
+ if (DeploymentSpec.empty.equals(application.deploymentSpec()))
return List.of();
return application.deploymentSpec().instances().stream()
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java
index 5bdc3533f65..c06194fcd73 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java
@@ -2034,7 +2034,7 @@ public class ApplicationApiHandler extends LoggingRequestHandler {
private HttpResponse submit(String tenant, String application, HttpRequest request) {
Map<String, byte[]> dataParts = parseDataParts(request);
Inspector submitOptions = SlimeUtils.jsonToSlime(dataParts.get(EnvironmentResource.SUBMIT_OPTIONS)).get();
- long projectId = Math.max(1, submitOptions.field("projectId").asLong()); // Absence of this means it's not a prod app :/
+ long projectId = Math.max(1, submitOptions.field("projectId").asLong());
Optional<String> repository = optional("repository", submitOptions);
Optional<String> branch = optional("branch", submitOptions);
Optional<String> commit = optional("commit", submitOptions);
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelper.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelper.java
index 339facec231..73cdf28c366 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelper.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelper.java
@@ -5,7 +5,6 @@ import com.google.common.base.Joiner;
import com.yahoo.component.Version;
import com.yahoo.config.application.api.DeploymentInstanceSpec;
import com.yahoo.config.application.api.DeploymentSpec;
-import com.yahoo.config.application.api.DeploymentSpec.ChangeBlocker;
import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.SystemName;
import com.yahoo.config.provision.zone.ZoneId;
@@ -42,18 +41,14 @@ import com.yahoo.vespa.hosted.controller.deployment.Versions;
import com.yahoo.vespa.hosted.controller.versions.VespaVersion;
import java.net.URI;
-import java.time.Instant;
-import java.time.format.TextStyle;
import java.util.ArrayDeque;
import java.util.Comparator;
import java.util.Deque;
import java.util.LinkedHashMap;
import java.util.List;
-import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
-import java.util.stream.Stream;
import static com.yahoo.config.application.api.DeploymentSpec.UpgradePolicy.conservative;
import static com.yahoo.config.application.api.DeploymentSpec.UpgradePolicy.defaultPolicy;
@@ -67,7 +62,6 @@ import static com.yahoo.vespa.hosted.controller.deployment.Step.installReal;
import static com.yahoo.vespa.hosted.controller.versions.VespaVersion.Confidence.broken;
import static com.yahoo.vespa.hosted.controller.versions.VespaVersion.Confidence.high;
import static com.yahoo.vespa.hosted.controller.versions.VespaVersion.Confidence.normal;
-import static java.util.Comparator.naturalOrder;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toMap;
@@ -575,42 +569,6 @@ class JobControllerApiHandlerHelper {
stepObject.setBool("declared", stepStatus.isDeclared());
stepObject.setString("instance", stepStatus.instance().value());
- stepStatus.readyAt(change).ifPresent(ready -> stepObject.setLong("readyAt", ready.toEpochMilli()));
- stepStatus.readyAt(change)
- .filter(controller.clock().instant()::isBefore)
- .ifPresent(until -> stepObject.setLong("delayedUntil", until.toEpochMilli()));
- stepStatus.pausedUntil().ifPresent(until -> stepObject.setLong("pausedUntil", until.toEpochMilli()));
- stepStatus.coolingDownUntil(change).ifPresent(until -> stepObject.setLong("coolingDownUntil", until.toEpochMilli()));
- stepStatus.blockedUntil(change).ifPresent(until -> stepObject.setLong("blockedUntil", until.toEpochMilli()));
-
- if (stepStatus.type() == DeploymentStatus.StepType.instance) {
- Cursor deployingObject = stepObject.setObject("deploying");
- if ( ! change.isEmpty()) {
- change.platform().ifPresent(version -> deployingObject.setString("platform", version.toString()));
- change.application().ifPresent(version -> toSlime(deployingObject.setObject("application"), version));
- }
-
- Cursor latestVersionsObject = stepObject.setObject("latestVersions");
- List<ChangeBlocker> blockers = application.deploymentSpec().requireInstance(stepStatus.instance()).changeBlocker();
- latestVersionPreferablyWithNormalConfidenceNAndotNewerThanSystem(controller.versionStatus().versions())
- .ifPresent(latestPlatform -> {
- Cursor latestPlatformObject = latestVersionsObject.setObject("platform");
- latestPlatformObject.setString("platform", latestPlatform.versionNumber().toFullString());
- latestPlatformObject.setLong("at", latestPlatform.committedAt().toEpochMilli());
- latestPlatformObject.setBool("upgrade", application.require(stepStatus.instance()).productionDeployments().values().stream()
- .anyMatch(deployment -> deployment.version().isBefore(latestPlatform.versionNumber())));
- toSlime(latestPlatformObject.setArray("blockers"), blockers.stream().filter(ChangeBlocker::blocksVersions));
- });
- application.latestVersion().ifPresent(latestApplication -> {
- Cursor latestApplicationObject = latestVersionsObject.setObject("application");
- toSlime(latestApplicationObject.setObject("application"), latestApplication);
- latestApplicationObject.setLong("at", latestApplication.buildTime().orElse(Instant.EPOCH).toEpochMilli());
- latestApplicationObject.setBool("upgrade", application.require(stepStatus.instance()).productionDeployments().values().stream()
- .anyMatch(deployment -> deployment.applicationVersion().compareTo(latestApplication) < 0));
- toSlime(latestApplicationObject.setArray("blockers"), blockers.stream().filter(ChangeBlocker::blocksRevisions));
- });
- }
-
stepStatus.job().ifPresent(job -> {
stepObject.setString("jobName", job.type().jobName());
String baseUriForJob = baseUriForDeployments.resolve(baseUriForDeployments.getPath() +
@@ -641,6 +599,13 @@ class JobControllerApiHandlerHelper {
Cursor runObject = toRunArray.addObject();
toSlime(runObject.setObject("versions"), versions);
}
+ stepStatus.readyAt(change).ifPresent(ready -> stepObject.setLong("readyAt", ready.toEpochMilli()));
+ stepStatus.readyAt(change)
+ .filter(controller.clock().instant()::isBefore)
+ .ifPresent(until -> stepObject.setLong("delayedUntil", until.toEpochMilli()));
+ stepStatus.pausedUntil().ifPresent(until -> stepObject.setLong("pausedUntil", until.toEpochMilli()));
+ stepStatus.coolingDownUntil(change).ifPresent(until -> stepObject.setLong("coolingDownUntil", until.toEpochMilli()));
+ stepStatus.blockedUntil(change).ifPresent(until -> stepObject.setLong("blockedUntil", until.toEpochMilli()));
Cursor runsArray = stepObject.setArray("runs");
jobStatus.runs().descendingMap().values().stream().limit(10).forEach(run -> {
@@ -661,11 +626,14 @@ class JobControllerApiHandlerHelper {
});
}
+ // TODO jonmv: Add latest platform and application status.
+
return new SlimeJsonResponse(slime);
}
private static void toSlime(Cursor versionObject, ApplicationVersion version) {
- version.buildNumber().ifPresent(id -> versionObject.setLong("build", id));
+ version.buildNumber().ifPresent(id -> versionObject.setLong("id", id));
+ version.source().ifPresent(source -> versionObject.setString("commit", source.commit()));
version.compileVersion().ifPresent(platform -> versionObject.setString("compileVersion", platform.toFullString()));
version.sourceUrl().ifPresent(url -> versionObject.setString("sourceUrl", url));
version.commit().ifPresent(commit -> versionObject.setString("commit", commit));
@@ -678,33 +646,5 @@ class JobControllerApiHandlerHelper {
versions.sourceApplication().ifPresent(application -> toSlime(versionsObject.setObject("sourceApplication"), application));
}
- private static void toSlime(Cursor blockersArray, Stream<ChangeBlocker> blockers) {
- blockers.forEach(blocker -> {
- Cursor blockerObject = blockersArray.addObject();
- blocker.window().days().stream()
- .map(day -> day.getDisplayName(TextStyle.SHORT, Locale.ENGLISH))
- .forEach(blockerObject.setArray("days")::addString);
- blocker.window().hours()
- .forEach(blockerObject.setArray("hours")::addLong);
- blockerObject.setString("zone", blocker.window().zone().toString());
- });
- }
-
- private static Optional<VespaVersion> latestVersionPreferablyWithNormalConfidenceNAndotNewerThanSystem(List<VespaVersion> versions) {
- int i;
- for (i = versions.size(); i-- > 0; )
- if (versions.get(i).isSystemVersion())
- break;
-
- if (i < 0)
- return Optional.empty();
-
- for (int j = i; j >= 0; j--)
- if (versions.get(j).confidence().equalOrHigherThan(normal))
- return Optional.of(versions.get(j));
-
- return Optional.of(versions.get(i));
- }
-
}
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/ApplicationPackageBuilder.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/ApplicationPackageBuilder.java
index ed7ae12168f..9b0706d184f 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/ApplicationPackageBuilder.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/deployment/ApplicationPackageBuilder.java
@@ -201,11 +201,11 @@ public class ApplicationPackageBuilder {
xml.append("'/>\n");
}
xml.append(notifications);
+ xml.append(blockChange);
if (explicitSystemTest)
xml.append(" <test />\n");
if (explicitStagingTest)
xml.append(" <staging />\n");
- xml.append(blockChange);
xml.append(" <");
xml.append(environment.value());
if (globalServiceId != null) {
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelperTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelperTest.java
index 1c96f46dd31..186534dd288 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelperTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/JobControllerApiHandlerHelperTest.java
@@ -5,12 +5,15 @@ import com.yahoo.component.Version;
import com.yahoo.config.provision.zone.ZoneId;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.vespa.hosted.controller.api.application.v4.model.DeployOptions;
+import com.yahoo.vespa.hosted.controller.api.identifiers.DeploymentId;
import com.yahoo.vespa.hosted.controller.api.integration.configserver.ConfigServerException;
import com.yahoo.vespa.hosted.controller.api.integration.deployment.ApplicationVersion;
import com.yahoo.vespa.hosted.controller.api.integration.deployment.JobType;
import com.yahoo.vespa.hosted.controller.application.ApplicationPackage;
import com.yahoo.vespa.hosted.controller.deployment.ApplicationPackageBuilder;
import com.yahoo.vespa.hosted.controller.deployment.DeploymentTester;
+import com.yahoo.vespa.hosted.controller.deployment.InternalStepRunner;
+import com.yahoo.vespa.hosted.controller.deployment.RunStatus;
import org.json.JSONException;
import org.json.JSONObject;
import org.junit.Test;
@@ -23,7 +26,6 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Duration;
import java.time.Instant;
-import java.util.Date;
import java.util.Optional;
import static com.yahoo.vespa.hosted.controller.api.integration.configserver.ConfigServerException.ErrorCode.INVALID_APPLICATION_PACKAGE;
@@ -35,10 +37,13 @@ import static com.yahoo.vespa.hosted.controller.api.integration.deployment.JobTy
import static com.yahoo.vespa.hosted.controller.api.integration.deployment.JobType.stagingTest;
import static com.yahoo.vespa.hosted.controller.api.integration.deployment.JobType.systemTest;
import static com.yahoo.vespa.hosted.controller.api.integration.deployment.JobType.testUsCentral1;
+import static com.yahoo.vespa.hosted.controller.api.integration.deployment.TesterCloud.Status.FAILURE;
import static com.yahoo.vespa.hosted.controller.deployment.DeploymentContext.applicationPackage;
import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.deploymentFailed;
+import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.error;
import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.installationFailed;
import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.running;
+import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.testFailure;
import static org.junit.Assert.assertEquals;
/**
@@ -51,9 +56,6 @@ public class JobControllerApiHandlerHelperTest {
public void testResponses() {
ApplicationPackage applicationPackage = new ApplicationPackageBuilder()
.stagingTest()
- .blockChange(true, true, "mon,tue", "7-13", "UTC")
- .blockChange(false, true, "sun", "0-23", "CET")
- .blockChange(true, false, "fri-sat", "8", "America/Los_Angeles")
.region("us-central-1")
.test("us-central-1")
.parallel("us-west-1", "us-east-3")
@@ -137,6 +139,7 @@ public class JobControllerApiHandlerHelperTest {
userApp.runJob(devAwsUsEast2a, applicationPackage);
assertResponse(JobControllerApiHandlerHelper.runResponse(tester.jobs().runs(userApp.instanceId(), devAwsUsEast2a), URI.create("https://some.url:43/root")), "dev-aws-us-east-2a-runs.json");
assertResponse(JobControllerApiHandlerHelper.jobTypeResponse(tester.controller(), userApp.instanceId(), URI.create("https://some.url:43/root/")), "overview-user-instance.json");
+
assertResponse(JobControllerApiHandlerHelper.overviewResponse(tester.controller(), app.application().id(), URI.create("https://some.url:43/root/")), "deployment-overview-2.json");
}
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 de88f914d44..a8be282deaf 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
@@ -6,123 +6,19 @@
"type": "instance",
"dependencies": [],
"declared": true,
- "instance": "default",
- "readyAt": 0,
- "deploying": {
- "application": {
- "build": 3,
- "compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
- }
- },
- "latestVersions": {
- "platform": {
- "platform": "7.1.0",
- "at": 0,
- "upgrade": true,
- "blockers": [
- {
- "days": [
- "Mon",
- "Tue"
- ],
- "hours": [
- 7,
- 8,
- 9,
- 10,
- 11,
- 12,
- 13
- ],
- "zone": "UTC"
- },
- {
- "days": [
- "Sun"
- ],
- "hours": [
- 0,
- 1,
- 2,
- 3,
- 4,
- 5,
- 6,
- 7,
- 8,
- 9,
- 10,
- 11,
- 12,
- 13,
- 14,
- 15,
- 16,
- 17,
- 18,
- 19,
- 20,
- 21,
- 22,
- 23
- ],
- "zone": "CET"
- }
- ]
- },
- "application": {
- "application": {
- "build": 3,
- "compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
- },
- "at": 1000,
- "upgrade": true,
- "blockers": [
- {
- "days": [
- "Mon",
- "Tue"
- ],
- "hours": [
- 7,
- 8,
- 9,
- 10,
- 11,
- 12,
- 13
- ],
- "zone": "UTC"
- },
- {
- "days": [
- "Fri",
- "Sat"
- ],
- "hours": [
- 8
- ],
- "zone": "America/Los_Angeles"
- }
- ]
- }
- }
+ "instance": "default"
},
{
"type": "test",
"dependencies": [],
"declared": false,
"instance": "default",
- "readyAt": 0,
"jobName": "system-test",
"url": "https://some.url:43/instance/default/job/system-test",
"environment": "test",
"region": "test.us-east-1",
"toRun": [],
+ "readyAt": 0,
"runs": [
{
"id": 3,
@@ -133,17 +29,17 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 3,
+ "id": 3,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 2,
+ "id": 2,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -198,17 +94,17 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 2,
+ "id": 2,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -263,10 +159,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -319,9 +215,6 @@
"dependencies": [],
"declared": true,
"instance": "default",
- "readyAt": 4353000,
- "delayedUntil": 4353000,
- "coolingDownUntil": 4353000,
"jobName": "staging-test",
"url": "https://some.url:43/instance/default/job/staging-test",
"environment": "staging",
@@ -331,21 +224,24 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 3,
+ "id": 3,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
}
}
],
+ "readyAt": 4353000,
+ "delayedUntil": 4353000,
+ "coolingDownUntil": 4353000,
"runs": [
{
"id": 5,
@@ -356,17 +252,17 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 3,
+ "id": 3,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -437,17 +333,17 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 3,
+ "id": 3,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -518,17 +414,17 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 3,
+ "id": 3,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 2,
+ "id": 2,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -599,17 +495,17 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 2,
+ "id": 2,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -680,10 +576,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -755,19 +651,19 @@
],
"declared": true,
"instance": "default",
- "readyAt": 3603000,
"jobName": "production-us-central-1",
"url": "https://some.url:43/instance/default/job/production-us-central-1",
"environment": "prod",
"region": "prod.us-central-1",
"currentPlatform": "6.1.0",
"currentApplication": {
- "build": 3,
+ "id": 3,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"toRun": [],
+ "readyAt": 3603000,
"runs": [
{
"id": 3,
@@ -777,17 +673,17 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 3,
+ "id": 3,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 2,
+ "id": 2,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -814,17 +710,17 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 2,
+ "id": 2,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -851,10 +747,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -890,17 +786,17 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 3,
+ "id": 3,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 3,
+ "id": 3,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
}
}
@@ -915,17 +811,17 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 2,
+ "id": 2,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 2,
+ "id": 2,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -964,17 +860,17 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -1019,27 +915,27 @@
"region": "prod.us-west-1",
"currentPlatform": "6.1.0",
"currentApplication": {
- "build": 2,
+ "id": 2,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"toRun": [
{
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 3,
+ "id": 3,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 2,
+ "id": 2,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
}
}
@@ -1054,17 +950,17 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 2,
+ "id": 2,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -1091,10 +987,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -1127,27 +1023,27 @@
"region": "prod.us-east-3",
"currentPlatform": "6.1.0",
"currentApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"toRun": [
{
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 3,
+ "id": 3,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
}
}
@@ -1162,17 +1058,17 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 2,
+ "id": 2,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
},
"sourcePlatform": "6.1.0",
"sourceApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -1199,10 +1095,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
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 e75ebc923bd..027cca5dad2 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
@@ -6,47 +6,19 @@
"type": "instance",
"dependencies": [],
"declared": true,
- "instance": "instance1",
- "readyAt": 0,
- "deploying": {
- "application": {
- "build": 4,
- "compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
- }
- },
- "latestVersions": {
- "platform": {
- "platform": "6.1.0",
- "at": "(ignore)",
- "upgrade": false,
- "blockers": []
- },
- "application": {
- "application": {
- "build": 4,
- "compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
- },
- "at": 1000,
- "upgrade": false,
- "blockers": []
- }
- }
+ "instance": "instance1"
},
{
"type": "test",
"dependencies": [],
"declared": false,
"instance": "instance1",
- "readyAt": 0,
"jobName": "system-test",
"url": "http://localhost:8080/application/v4/tenant/tenant1/application/application1/instance/instance1/job/system-test",
"environment": "test",
"region": "test.us-east-1",
"toRun": [],
+ "readyAt": 0,
"runs": [
{
"id": 2,
@@ -56,10 +28,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 4,
+ "id": 4,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -114,10 +86,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -170,12 +142,12 @@
"dependencies": [],
"declared": false,
"instance": "instance1",
- "readyAt": 0,
"jobName": "staging-test",
"url": "http://localhost:8080/application/v4/tenant/tenant1/application/application1/instance/instance1/job/staging-test",
"environment": "staging",
"region": "staging.us-east-3",
"toRun": [],
+ "readyAt": 0,
"runs": [
{
"id": 2,
@@ -185,10 +157,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 4,
+ "id": 4,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -259,10 +231,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -342,10 +314,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 4,
+ "id": 4,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
}
}
@@ -360,10 +332,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -399,10 +371,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 4,
+ "id": 4,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
}
}
@@ -416,9 +388,9 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 1,
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "id": 1,
+ "commit": "commit1",
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -454,10 +426,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 4,
+ "id": 4,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
}
}
@@ -471,10 +443,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 1,
+ "id": 1,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
},
"steps": [
@@ -501,39 +473,19 @@
5
],
"declared": true,
- "instance": "instance2",
- "deploying": {},
- "latestVersions": {
- "platform": {
- "platform": "6.1.0",
- "at": "(ignore)",
- "upgrade": false,
- "blockers": []
- },
- "application": {
- "application": {
- "build": 4,
- "compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
- },
- "at": 1000,
- "upgrade": false,
- "blockers": []
- }
- }
+ "instance": "instance2"
},
{
"type": "test",
"dependencies": [],
"declared": false,
"instance": "instance2",
- "readyAt": 0,
"jobName": "system-test",
"url": "http://localhost:8080/application/v4/tenant/tenant1/application/application1/instance/instance2/job/system-test",
"environment": "test",
"region": "test.us-east-1",
"toRun": [],
+ "readyAt": 0,
"runs": []
},
{
@@ -541,12 +493,12 @@
"dependencies": [],
"declared": false,
"instance": "instance2",
- "readyAt": 0,
"jobName": "staging-test",
"url": "http://localhost:8080/application/v4/tenant/tenant1/application/application1/instance/instance2/job/staging-test",
"environment": "staging",
"region": "staging.us-east-3",
"toRun": [],
+ "readyAt": 0,
"runs": []
},
{
@@ -565,10 +517,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 4,
+ "id": 4,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
}
}
@@ -591,10 +543,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 4,
+ "id": 4,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
}
}
@@ -617,10 +569,10 @@
"versions": {
"targetPlatform": "6.1.0",
"targetApplication": {
- "build": 4,
+ "id": 4,
+ "commit": "commit1",
"compileVersion": "6.1.0",
- "sourceUrl": "repository1/tree/commit1",
- "commit": "commit1"
+ "sourceUrl": "repository1/tree/commit1"
}
}
}