summaryrefslogtreecommitdiffstats
path: root/controller-server
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2018-10-31 14:53:05 +0100
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2018-10-31 14:53:05 +0100
commit395b92078098ca3a735dfbe33aee9a0dab9cce8b (patch)
treedd492ec7478e04db5d33a7deab317e3dfbc39528 /controller-server
parent62ccbdc9aca001449abfe5d6a6073a0cdbfa4c7d (diff)
Define latest changes to include change and outstanding change
Diffstat (limited to 'controller-server')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java11
1 files changed, 7 insertions, 4 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 43ac3ba085f..dc6930e2312 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
@@ -336,12 +336,16 @@ public class DeploymentTrigger {
}
}
}
- if (testJobs == null) // If nothing to test, but outstanding commits, test those.
- testJobs = testJobs(application, Versions.from(application.outstandingChange(),
+ if (testJobs == null) { // If nothing to test, but outstanding commits, test those.
+ Change latestChange = application.outstandingChange().application()
+ .map(application.change()::with)
+ .orElse(application.change());
+ testJobs = testJobs(application, Versions.from(latestChange,
application,
steps.sortedDeployments(application.productionDeployments().values()).stream().findFirst(),
controller.systemVersion()),
"Testing last changes outside prod", clock.instant());
+ }
jobs.addAll(testJobs);
});
return Collections.unmodifiableList(jobs);
@@ -517,9 +521,8 @@ public class DeploymentTrigger {
for (JobType jobType : steps(application.deploymentSpec()).testJobs()) {
Optional<JobRun> completion = successOn(application, jobType, versions)
.filter(run -> versions.sourcesMatchIfPresent(run) || jobType == systemTest);
- if (!completion.isPresent() && canTrigger(jobType, versions, application)) {
+ if ( ! completion.isPresent() && canTrigger(jobType, versions, application))
jobs.add(deploymentJob(application, versions, application.change(), jobType, reason, availableSince));
- }
}
return jobs;
}