summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2018-10-31 13:38:51 +0100
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2018-10-31 13:38:51 +0100
commitbe65022827e91bcc71df7adbb44c3a7c0458231a (patch)
tree3bb03efaea3ba5e721d59ebe8d8b8d457c21f8fd /controller-server
parent57ad6f6a6233efdde9ada807c921e905eaa3a2c3 (diff)
Test outstanding commits, when nothing else to test
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java
index a5896658e5f..0409e2ec5ef 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java
@@ -313,7 +313,8 @@ public class DeploymentTrigger {
if (!alreadyTriggered(application, versions)) {
testJobs = emptyList();
}
- } else if (testJobs == null) {
+ }
+ else if (testJobs == null) {
testJobs = testJobs(application, versions,
String.format("Testing deployment for %s (%s)",
job.jobName(), versions.toString()),
@@ -321,22 +322,26 @@ public class DeploymentTrigger {
}
}
completedAt = Optional.empty();
- } else { // All jobs are complete; find the time of completion of this step.
- if (stepJobs.isEmpty()) { // No jobs means this is delay step.
+ }
+ else { // All jobs are complete; find the time of completion of this step.
+ if (stepJobs.isEmpty()) { // No jobs means this is a delay step.
Duration delay = ((DeploymentSpec.Delay) step).duration();
completedAt = completedAt.map(at -> at.plus(delay)).filter(at -> !at.isAfter(clock.instant()));
reason += " after a delay of " + delay;
- } else {
+ }
+ else {
completedAt = stepJobs.stream().map(job -> application.deploymentJobs().statusOf(job).get().lastCompleted().get().at()).max(naturalOrder());
reason = "Available change in " + stepJobs.stream().map(JobType::jobName).collect(joining(", "));
}
}
}
}
- if (testJobs == null) {
- testJobs = testJobs(application, Versions.from(application, controller.systemVersion()),
+ if (testJobs == null) // If nothing to test, but outstanding commits, test those.
+ testJobs = testJobs(application, Versions.from(application.outstandingChange(),
+ application,
+ steps.sortedDeployments(application.productionDeployments().values()).stream().findFirst(),
+ controller.systemVersion()),
"Testing last changes outside prod", clock.instant());
- }
jobs.addAll(testJobs);
});
return Collections.unmodifiableList(jobs);