summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2018-02-06 15:06:13 +0100
committerMartin Polden <mpolden@mpolden.no>2018-02-20 13:27:01 +0100
commit5df193d95df61ad3db8917f39371fbadab7a9ef6 (patch)
treedfe28b6a4e3535324cf92c9ffac9a6bb9df93164 /controller-server
parenta0d596375786e2ae3ec439f11c051313e6ab2dc4 (diff)
Simplify deploy
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java196
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VersionStatus.java2
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java1
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/FailureRedeployerTest.java1
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java12
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application.json47
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application1-recursive.json67
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/dev-us-west-1.json4
-rw-r--r--controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/prod-corp-us-east-1.json2
9 files changed, 180 insertions, 152 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java
index 090f25171b1..9e4e5b19f64 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java
@@ -2,6 +2,7 @@
package com.yahoo.vespa.hosted.controller;
import com.google.common.collect.ImmutableList;
+import com.yahoo.collections.Pair;
import com.yahoo.component.Version;
import com.yahoo.config.application.api.DeploymentSpec;
import com.yahoo.config.application.api.ValidationId;
@@ -14,8 +15,6 @@ import com.yahoo.vespa.hosted.controller.api.ActivateResult;
import com.yahoo.vespa.hosted.controller.api.Tenant;
import com.yahoo.vespa.hosted.controller.api.application.v4.model.DeployOptions;
import com.yahoo.vespa.hosted.controller.api.application.v4.model.EndpointStatus;
-import com.yahoo.vespa.hosted.controller.api.application.v4.model.GitRevision;
-import com.yahoo.vespa.hosted.controller.api.application.v4.model.ScrewdriverBuildJob;
import com.yahoo.vespa.hosted.controller.api.application.v4.model.configserverbindings.ConfigChangeActions;
import com.yahoo.vespa.hosted.controller.api.identifiers.DeploymentId;
import com.yahoo.vespa.hosted.controller.api.identifiers.Hostname;
@@ -41,8 +40,6 @@ import com.yahoo.vespa.hosted.controller.application.ApplicationVersion;
import com.yahoo.vespa.hosted.controller.application.Deployment;
import com.yahoo.vespa.hosted.controller.application.DeploymentJobs;
import com.yahoo.vespa.hosted.controller.application.DeploymentJobs.JobReport;
-import com.yahoo.vespa.hosted.controller.application.JobStatus;
-import com.yahoo.vespa.hosted.controller.application.SourceRevision;
import com.yahoo.vespa.hosted.controller.deployment.DeploymentTrigger;
import com.yahoo.vespa.hosted.controller.maintenance.DeploymentExpirer;
import com.yahoo.vespa.hosted.controller.persistence.ControllerDb;
@@ -93,7 +90,7 @@ public class ApplicationController {
private final RotationRepository rotationRepository;
private final AthenzClientFactory zmsClientFactory;
private final NameService nameService;
- private final ConfigServerClient configserverClient;
+ private final ConfigServerClient configServer;
private final RoutingGenerator routingGenerator;
private final Clock clock;
@@ -101,7 +98,7 @@ public class ApplicationController {
ApplicationController(Controller controller, ControllerDb db, CuratorDb curator,
AthenzClientFactory zmsClientFactory, RotationsConfig rotationsConfig,
- NameService nameService, ConfigServerClient configserverClient,
+ NameService nameService, ConfigServerClient configServer,
ArtifactRepository artifactRepository,
RoutingGenerator routingGenerator, Clock clock) {
this.controller = controller;
@@ -109,7 +106,7 @@ public class ApplicationController {
this.curator = curator;
this.zmsClientFactory = zmsClientFactory;
this.nameService = nameService;
- this.configserverClient = configserverClient;
+ this.configServer = configServer;
this.routingGenerator = routingGenerator;
this.clock = clock;
@@ -157,7 +154,7 @@ public class ApplicationController {
Optional<String> endpoint = getCanonicalGlobalEndpoint(deploymentId);
if (endpoint.isPresent()) {
- configserverClient.setGlobalRotationStatus(deploymentId, endpoint.get(), status);
+ configServer.setGlobalRotationStatus(deploymentId, endpoint.get(), status);
rotations.add(endpoint.get());
}
@@ -175,7 +172,7 @@ public class ApplicationController {
Optional<String> endpoint = getCanonicalGlobalEndpoint(deploymentId);
if (endpoint.isPresent()) {
- EndpointStatus status = configserverClient.getGlobalRotationStatus(deploymentId, endpoint.get());
+ EndpointStatus status = configServer.getGlobalRotationStatus(deploymentId, endpoint.get());
result.put(endpoint.get(), status);
}
@@ -274,6 +271,8 @@ public class ApplicationController {
.map(app -> new LockedApplication(app, lock))
.orElseGet(() -> new LockedApplication(createApplication(applicationId, Optional.empty()), lock));
+ final boolean canDeployDirectly = canDeployDirectlyTo(zone, options);
+
// Determine Vespa version to use
Version version;
if (options.deployCurrentVersion) {
@@ -287,58 +286,14 @@ public class ApplicationController {
}
// Determine application package to use
- ApplicationVersion applicationVersion;
- ApplicationPackage applicationPackage;
- Optional<DeploymentJobs.JobType> job = DeploymentJobs.JobType.from(controller.system(), zone);
-
- // TODO: Simplify after new application version is always available
- if (canDownloadReportedApplicationVersion(application) && !canDeployDirectlyTo(zone, options)) {
- if (!job.isPresent()) {
- throw new IllegalArgumentException("Cannot determine job for zone " + zone);
- }
- applicationVersion = application.deployApplicationVersionFor(job.get(), controller,
- options.deployCurrentVersion)
- .orElseThrow(() -> new IllegalArgumentException("Cannot determine application version for " + applicationId + " in " + job.get()));
- if (canDownloadArtifact(applicationVersion)) {
- applicationPackage = new ApplicationPackage(
- artifactRepository.getApplicationPackage(applicationId, applicationVersion.id())
- );
- } else {
- applicationPackage = applicationPackageFromDeployer.orElseThrow(
- () -> new IllegalArgumentException("Application package with version " +
- applicationVersion.id() + " cannot be downloaded, and " +
- "no package was given by deployer"));
- }
- } else { // ..otherwise we use the package sent by the deployer and deduce version from the package
- // TODO: Only allow this for environments that are allowed to deploy directly
- applicationPackage = applicationPackageFromDeployer.orElseThrow(
- () -> new IllegalArgumentException("Application package must be given as new application " +
- "version is not known for " + applicationId)
- );
- applicationVersion = toApplicationPackageRevision(applicationPackage, options.screwdriverBuildJob);
- }
+ Pair<ApplicationPackage, ApplicationVersion> artifact = artifactFor(zone, application,
+ applicationPackageFromDeployer,
+ canDeployDirectly,
+ options.deployCurrentVersion);
+ ApplicationPackage applicationPackage = artifact.getFirst();
+ ApplicationVersion applicationVersion = artifact.getSecond();
validate(applicationPackage.deploymentSpec());
- // TODO: Remove after introducing new application version
- if (!options.deployCurrentVersion && !canDownloadReportedApplicationVersion(application)) {
- if (application.change().application().isPresent()) {
- application = application.withChange(application.change().with(applicationVersion));
- }
- if (!canDeployDirectlyTo(zone, options) && job.isPresent()) {
- // Update with (potentially) missing information about what we triggered:
- // * When someone else triggered the job, we need to store a stand-in triggering event.
- // * When this is the system test job, we need to record the new application version,
- // for future use.
- JobStatus.JobRun triggering = getOrCreateTriggering(application, version, job.get());
- application = application.withJobTriggering(job.get(),
- application.change(),
- triggering.at(),
- version,
- applicationVersion,
- triggering.reason());
- }
- }
-
// Update application with information from application package
if (!options.deployCurrentVersion) {
// Store information about application package
@@ -355,23 +310,13 @@ public class ApplicationController {
store(application); // store missing information even if we fail deployment below
}
- // Validate automated deployment
- if (!canDeployDirectlyTo(zone, options)) {
- if (!application.deploymentJobs().isDeployableTo(zone.environment(), application.change())) {
- throw new IllegalArgumentException("Rejecting deployment of " + application + " to " + zone +
- " as " + application.change() + " is not tested");
- }
- Deployment existingDeployment = application.deployments().get(zone);
- if (zone.environment().isProduction() && existingDeployment != null &&
- existingDeployment.version().isAfter(version)) {
- throw new IllegalArgumentException("Rejecting deployment of " + application + " to " + zone +
- " as the requested version " + version + " is older than" +
- " the current version " + existingDeployment.version());
- }
+ // Validate the change being deployed
+ if (!canDeployDirectly) {
+ validateChange(application, zone, version);
}
+ // Assign global rotation
application = withRotation(application, zone);
-
Set<String> rotationNames = new HashSet<>();
Set<String> cnames = new HashSet<>();
application.rotation().ifPresent(applicationRotation -> {
@@ -383,8 +328,8 @@ public class ApplicationController {
// Carry out deployment
options = withVersion(version, options);
ConfigServerClient.PreparedApplication preparedApplication =
- configserverClient.prepare(new DeploymentId(applicationId, zone), options, cnames, rotationNames,
- applicationPackage.zippedContent());
+ configServer.prepare(new DeploymentId(applicationId, zone), options, cnames, rotationNames,
+ applicationPackage.zippedContent());
preparedApplication.activate();
application = application.withNewDeployment(zone, applicationVersion, version, clock.instant());
@@ -395,6 +340,32 @@ public class ApplicationController {
}
}
+ /** Decide application package and version pair to use in given zone */
+ private Pair<ApplicationPackage, ApplicationVersion> artifactFor(ZoneId zone,
+ Application application,
+ Optional<ApplicationPackage> applicationPackage,
+ boolean canDeployDirectly,
+ boolean deployCurrentVersion) {
+ ApplicationVersion version;
+ ApplicationPackage pkg;
+ Optional<DeploymentJobs.JobType> job = DeploymentJobs.JobType.from(controller.system(), zone);
+ if (canDeployDirectly) {
+ pkg = applicationPackage.orElseThrow(() -> new IllegalArgumentException("Application package must be " +
+ "given when deploying to " + zone));
+ version = ApplicationVersion.unknown;
+ } else {
+ if (!job.isPresent()) {
+ throw new IllegalArgumentException("No job found for zone " + zone);
+ }
+ version = application
+ .deployApplicationVersionFor(job.get(), controller, deployCurrentVersion)
+ .orElseThrow(() -> new IllegalArgumentException("Cannot determine application version to use for " +
+ job.get()));
+ pkg = new ApplicationPackage(artifactRepository.getApplicationPackage(application.id(), version.id()));
+ }
+ return new Pair<>(pkg, version);
+ }
+
/** Makes sure the application has a global rotation, if eligible. */
private LockedApplication withRotation(LockedApplication application, ZoneId zone) {
if (zone.environment() == Environment.prod && application.deploymentSpec().globalServiceId().isPresent()) {
@@ -460,22 +431,6 @@ public class ApplicationController {
return application;
}
- /**
- * Returns the existing triggering of the given type from this application,
- * or an incomplete one created in this method if none is present
- * This is needed (only) in the case where some external entity triggers a job.
- */
- private JobStatus.JobRun getOrCreateTriggering(Application application, Version version, DeploymentJobs.JobType jobType) {
- JobStatus status = application.deploymentJobs().jobStatus().get(jobType);
- if (status == null) return incompleteTriggeringEvent(version);
- if ( ! status.lastTriggered().isPresent()) return incompleteTriggeringEvent(version);
- return status.lastTriggered().get();
- }
-
- private JobStatus.JobRun incompleteTriggeringEvent(Version version) {
- return new JobStatus.JobRun(-1, version, ApplicationVersion.unknown, false, "", clock.instant());
- }
-
private DeployOptions withVersion(Version version, DeployOptions options) {
return new DeployOptions(options.screwdriverBuildJob,
Optional.of(version),
@@ -483,20 +438,6 @@ public class ApplicationController {
options.deployCurrentVersion);
}
- private ApplicationVersion toApplicationPackageRevision(ApplicationPackage applicationPackage,
- Optional<ScrewdriverBuildJob> buildJob) {
- if ( ! buildJob.isPresent())
- return ApplicationVersion.from(applicationPackage.hash());
-
- GitRevision gitRevision = buildJob.get().gitRevision;
- if (gitRevision.repository == null || gitRevision.branch == null || gitRevision.commit == null)
- return ApplicationVersion.from(applicationPackage.hash());
-
- return ApplicationVersion.from(applicationPackage.hash(), new SourceRevision(gitRevision.repository.id(),
- gitRevision.branch.id(),
- gitRevision.commit.id()));
- }
-
/** Register a DNS name for rotation */
private void registerRotationInDns(Rotation rotation, String dnsName) {
try {
@@ -624,7 +565,7 @@ public class ApplicationController {
*/
public void restart(DeploymentId deploymentId, Optional<Hostname> hostname) {
try {
- configserverClient.restart(deploymentId, hostname);
+ configServer.restart(deploymentId, hostname);
}
catch (NoInstanceException e) {
throw new IllegalArgumentException("Could not restart " + deploymentId + ": No such deployment");
@@ -647,8 +588,7 @@ public class ApplicationController {
&& ! DeploymentExpirer.hasExpired(controller.zoneRegistry(), deployment.get(), clock.instant()))
return;
- lockOrThrow(application.id(), lockedApplication ->
- store(deactivate(lockedApplication, zone)));
+ lockOrThrow(application.id(), lockedApplication -> store(deactivate(lockedApplication, zone)));
}
/**
@@ -658,7 +598,7 @@ public class ApplicationController {
*/
private LockedApplication deactivate(LockedApplication application, ZoneId zone) {
try {
- configserverClient.deactivate(new DeploymentId(application.id(), zone));
+ configServer.deactivate(new DeploymentId(application.id(), zone));
}
catch (NoInstanceException ignored) {
// ok; already gone
@@ -674,7 +614,7 @@ public class ApplicationController {
id.instance().value());
}
- public ConfigServerClient configserverClient() { return configserverClient; }
+ public ConfigServerClient configServer() { return configServer; }
/**
* Returns a lock which provides exclusive rights to changing this application.
@@ -687,33 +627,39 @@ public class ApplicationController {
/** Returns whether a direct deployment to given zone is allowed */
private static boolean canDeployDirectlyTo(ZoneId zone, DeployOptions options) {
- return ! options.screwdriverBuildJob.isPresent() ||
+ return !options.screwdriverBuildJob.isPresent() ||
options.screwdriverBuildJob.get().screwdriverId == null ||
zone.environment().isManuallyDeployed();
}
- /** Returns whether artifact for given version number is available in artifact repository */
- private static boolean canDownloadArtifact(ApplicationVersion applicationVersion) {
- return applicationVersion.buildNumber().isPresent() && applicationVersion.source().isPresent();
- }
-
- /** Returns whether component has reported a version number that is availabe in artifact repository */
- private static boolean canDownloadReportedApplicationVersion(Application application) {
- return application.deploymentJobs().lastSuccessfulApplicationVersionFor(DeploymentJobs.JobType.component)
- .filter(ApplicationController::canDownloadArtifact)
- .isPresent();
- }
-
/** Verify that each of the production zones listed in the deployment spec exist in this system. */
private void validate(DeploymentSpec deploymentSpec) {
deploymentSpec.zones().stream()
.filter(zone -> zone.environment() == Environment.prod)
.forEach(zone -> {
- if ( ! controller.zoneRegistry().hasZone(ZoneId.from(zone.environment(), zone.region().orElse(null))))
- throw new IllegalArgumentException("Zone " + zone + " in deployment spec was not found in this system!");
+ if (!controller.zoneRegistry().hasZone(ZoneId.from(zone.environment(),
+ zone.region().orElse(null)))) {
+ throw new IllegalArgumentException("Zone " + zone + " in deployment spec was not found in " +
+ "this system!");
+ }
});
}
+ /** Verify that change is tested and that we aren't downgrading */
+ private void validateChange(Application application, ZoneId zone, Version version) {
+ if (!application.deploymentJobs().isDeployableTo(zone.environment(), application.change())) {
+ throw new IllegalArgumentException("Rejecting deployment of " + application + " to " + zone +
+ " as " + application.change() + " is not tested");
+ }
+ Deployment existingDeployment = application.deployments().get(zone);
+ if (zone.environment().isProduction() && existingDeployment != null &&
+ existingDeployment.version().isAfter(version)) {
+ throw new IllegalArgumentException("Rejecting deployment of " + application + " to " + zone +
+ " as the requested version " + version + " is older than" +
+ " the current version " + existingDeployment.version());
+ }
+ }
+
public RotationRepository rotationRepository() {
return rotationRepository;
}
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VersionStatus.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VersionStatus.java
index 46bb8f00215..9bc7b7a22d8 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VersionStatus.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VersionStatus.java
@@ -124,7 +124,7 @@ public class VersionStatus {
ListMap<Version, String> versions = new ListMap<>();
for (URI configServer : configServers)
- versions.put(controller.applications().configserverClient().version(configServer), configServer.getHost());
+ versions.put(controller.applications().configServer().version(configServer), configServer.getHost());
return versions;
}
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java
index 5b3f2c74548..243dfdff4df 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/ControllerTest.java
@@ -609,6 +609,7 @@ public class ControllerTest {
.upgradePolicy("canary")
.region("cd-us-central-1")
.build();
+ tester.jobCompletion(component).application(application).uploadArtifact(applicationPackage).submit();
long cdJobsCount = statuses.get().keySet().stream()
.filter(type -> type.zone(SystemName.cd).isPresent())
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/FailureRedeployerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/FailureRedeployerTest.java
index 6b8901ace88..908d8f3a484 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/FailureRedeployerTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/maintenance/FailureRedeployerTest.java
@@ -196,6 +196,7 @@ public class FailureRedeployerTest {
.upgradePolicy("canary")
.region("cd-us-central-1")
.build();
+ tester.jobCompletion(component).application(application).uploadArtifact(applicationPackage).submit();
// New version is released
version = Version.fromString("6.142.1");
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java
index 2b198c9897f..0e24a6d434f 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java
@@ -187,10 +187,12 @@ public class ApplicationApiTest extends ControllerContainerTest {
ATHENZ_TENANT_DOMAIN,
new com.yahoo.vespa.hosted.controller.api.identifiers.ApplicationId(id.application().value())); // (Necessary but not provided in this API)
- // Trigger deployment
- tester.assertResponse(request("/application/v4/tenant/tenant1/application/application1/deploying", POST)
- .data("6.1.0"),
- new File("application-deployment.json"));
+ // Trigger deployment from completion of component job
+ controllerTester.jobCompletion(DeploymentJobs.JobType.component)
+ .application(id)
+ .projectId(screwdriverProjectId)
+ .uploadArtifact(applicationPackage)
+ .submit();
// ... systemtest
tester.assertResponse(request("/application/v4/tenant/tenant1/application/application1/environment/test/region/us-east-1/instance/default/", POST)
@@ -247,7 +249,7 @@ public class ApplicationApiTest extends ControllerContainerTest {
.userIdentity(USER_ID)
.recursive("deployment"),
new File("recursive-root.json"));
- // GET at root, with "&recursive=tenant", returns info about all tenants, with limmited info about their applications.
+ // GET at root, with "&recursive=tenant", returns info about all tenants, with limited info about their applications.
tester.assertResponse(request("/application/v4/", GET)
.userIdentity(USER_ID)
.recursive("tenant"),
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application.json
index ca37d602711..155166dea4c 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application.json
@@ -2,10 +2,49 @@
"application": "application1",
"instance": "default",
"deploying": {
- "version": "(ignore)"
+ "revision": {
+ "hash": "(ignore)",
+ "source": {
+ "gitRepository": "repository1",
+ "gitBranch": "master",
+ "gitCommit": "commit1"
+ }
+ }
},
"deploymentJobs": [
{
+ "type": "component",
+ "success": true,
+ "lastCompleted": {
+ "id": 42,
+ "version": "(ignore)",
+ "revision": {
+ "hash": "(ignore)",
+ "source": {
+ "gitRepository": "repository1",
+ "gitBranch": "master",
+ "gitCommit": "commit1"
+ }
+ },
+ "reason": "Application commit",
+ "at": "(ignore)"
+ },
+ "lastSuccess": {
+ "id": 42,
+ "version": "(ignore)",
+ "revision": {
+ "hash": "(ignore)",
+ "source": {
+ "gitRepository": "repository1",
+ "gitBranch": "master",
+ "gitCommit": "commit1"
+ }
+ },
+ "reason": "Application commit",
+ "at": "(ignore)"
+ }
+ },
+ {
"type": "system-test",
"success": true,
"lastTriggered": {
@@ -19,7 +58,7 @@
"gitCommit": "commit1"
}
},
- "reason": "",
+ "reason": "component completed",
"at": "(ignore)"
},
"lastCompleted": {
@@ -33,7 +72,7 @@
"gitCommit": "commit1"
}
},
- "reason": "",
+ "reason": "component completed",
"at": "(ignore)"
},
"lastSuccess": {
@@ -47,7 +86,7 @@
"gitCommit": "commit1"
}
},
- "reason": "",
+ "reason": "component completed",
"at": "(ignore)"
}
},
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application1-recursive.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application1-recursive.json
index 82a5a5b856d..35124adbf68 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application1-recursive.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/application1-recursive.json
@@ -2,15 +2,54 @@
"application": "application1",
"instance": "default",
"deploying": {
- "version": "6.1"
+ "revision": {
+ "hash": "(ignore)",
+ "source": {
+ "gitRepository": "repository1",
+ "gitBranch": "master",
+ "gitCommit": "commit1"
+ }
+ }
},
"deploymentJobs": [
{
+ "type": "component",
+ "success": true,
+ "lastCompleted": {
+ "id": 42,
+ "version": "(ignore)",
+ "revision": {
+ "hash": "(ignore)",
+ "source": {
+ "gitRepository": "repository1",
+ "gitBranch": "master",
+ "gitCommit": "commit1"
+ }
+ },
+ "reason": "Application commit",
+ "at": "(ignore)"
+ },
+ "lastSuccess": {
+ "id": 42,
+ "version": "(ignore)",
+ "revision": {
+ "hash": "(ignore)",
+ "source": {
+ "gitRepository": "repository1",
+ "gitBranch": "master",
+ "gitCommit": "commit1"
+ }
+ },
+ "reason": "Application commit",
+ "at": "(ignore)"
+ }
+ },
+ {
"type": "system-test",
"success": true,
"lastTriggered": {
"id": -1,
- "version": "6.1.0",
+ "version": "(ignore)",
"revision": {
"hash": "(ignore)",
"source": {
@@ -19,12 +58,12 @@
"gitCommit": "commit1"
}
},
- "reason": "",
+ "reason": "component completed",
"at": "(ignore)"
},
"lastCompleted": {
"id": 42,
- "version": "6.1.0",
+ "version": "(ignore)",
"revision": {
"hash": "(ignore)",
"source": {
@@ -33,12 +72,12 @@
"gitCommit": "commit1"
}
},
- "reason": "",
+ "reason": "component completed",
"at": "(ignore)"
},
"lastSuccess": {
"id": 42,
- "version": "6.1.0",
+ "version": "(ignore)",
"revision": {
"hash": "(ignore)",
"source": {
@@ -47,7 +86,7 @@
"gitCommit": "commit1"
}
},
- "reason": "",
+ "reason": "component completed",
"at": "(ignore)"
}
},
@@ -56,7 +95,7 @@
"success": true,
"lastTriggered": {
"id": -1,
- "version": "6.1.0",
+ "version": "(ignore)",
"revision": {
"hash": "(ignore)",
"source": {
@@ -70,7 +109,7 @@
},
"lastCompleted": {
"id": 42,
- "version": "6.1.0",
+ "version": "(ignore)",
"revision": {
"hash": "(ignore)",
"source": {
@@ -84,7 +123,7 @@
},
"lastSuccess": {
"id": 42,
- "version": "6.1.0",
+ "version": "(ignore)",
"revision": {
"hash": "(ignore)",
"source": {
@@ -102,7 +141,7 @@
"success": false,
"lastTriggered": {
"id": -1,
- "version": "6.1.0",
+ "version": "(ignore)",
"revision": {
"hash": "(ignore)",
"source": {
@@ -116,7 +155,7 @@
},
"lastCompleted": {
"id": 42,
- "version": "6.1.0",
+ "version": "(ignore)",
"revision": {
"hash": "(ignore)",
"source": {
@@ -130,7 +169,7 @@
},
"firstFailing": {
"id": 42,
- "version": "6.1.0",
+ "version": "(ignore)",
"revision": {
"hash": "(ignore)",
"source": {
@@ -144,7 +183,7 @@
}
}
],
- "compileVersion": "6.1.0",
+ "compileVersion": "(ignore)",
"globalRotations": [
"http://application1.tenant1.global.vespa.yahooapis.com:4080/",
"https://application1--tenant1.global.vespa.yahooapis.com:4443/"
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/dev-us-west-1.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/dev-us-west-1.json
index 062f4408518..d13a4dac116 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/dev-us-west-1.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/dev-us-west-1.json
@@ -11,7 +11,7 @@
],
"nodes": "http://localhost:8080/zone/v2/dev/us-west-1/nodes/v2/node/%3F&recursive=true&application=tenant1.application1.default",
"yamasUrl": "http://monitoring-system.test/?environment=dev&region=us-west-1&application=tenant1.application1",
- "version": "6.1.0",
+ "version": "(ignore)",
"revision": "(ignore)",
"deployTimeEpochMs": "(ignore)",
"screwdriverId": "123",
@@ -60,4 +60,4 @@
"queryLatencyMillis": 4.0,
"writeLatencyMillis": 5.0
}
-} \ No newline at end of file
+}
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/prod-corp-us-east-1.json b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/prod-corp-us-east-1.json
index 75b257da0ed..0f16bee308d 100644
--- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/prod-corp-us-east-1.json
+++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/responses/prod-corp-us-east-1.json
@@ -15,7 +15,7 @@
"nodes": "http://localhost:8080/zone/v2/prod/corp-us-east-1/nodes/v2/node/%3F&recursive=true&application=tenant1.application1.default",
"elkUrl": "http://log.prod.corp-us-east-1.test/#/discover?_g=()&_a=(columns:!(_source),index:'logstash-*',interval:auto,query:(query_string:(analyze_wildcard:!t,query:'HV-tenant:%22tenant1%22%20AND%20HV-application:%22application1%22%20AND%20HV-region:%22corp-us-east-1%22%20AND%20HV-instance:%22default%22%20AND%20HV-environment:%22prod%22')),sort:!('@timestamp',desc))",
"yamasUrl": "http://monitoring-system.test/?environment=prod&region=corp-us-east-1&application=tenant1.application1",
- "version": "6.1.0",
+ "version": "(ignore)",
"revision": "(ignore)",
"deployTimeEpochMs": "(ignore)",
"screwdriverId": "123",