aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobList.java
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2022-03-01 12:06:52 +0100
committerJon Marius Venstad <venstad@gmail.com>2022-03-01 12:06:52 +0100
commit0d41f8dff5c3d1343a39653cec19a24eb6c63a11 (patch)
treef0afc2e87a27223f35f78d6bdb3a1367b63ff18e /controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobList.java
parentc391ef917ac415c07cfa96dc382747f7e46cef72 (diff)
Detect test failure when considering change splitting for prod deployments
Diffstat (limited to 'controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobList.java')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobList.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobList.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobList.java
index 5de07bad859..d06bdc45583 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobList.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobList.java
@@ -17,6 +17,7 @@ import java.util.function.Function;
import java.util.function.Predicate;
import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.aborted;
+import static com.yahoo.vespa.hosted.controller.deployment.RunStatus.nodeAllocationFailure;
/**
* A list of deployment jobs that can be filtered in various ways.
@@ -102,6 +103,15 @@ public class JobList extends AbstractFilteringList<JobStatus, JobList> {
return matching(job -> job.id().type().isProduction());
}
+ /** Returns the jobs with any runs failing with non-out-of-test-capacity on the given versions — targets only for system test, everything present otherwise. */
+ public JobList failingHardOn(Versions versions) {
+ return matching(job -> ! RunList.from(job)
+ .on(versions)
+ .matching(Run::hasFailed)
+ .not().matching(run -> run.status() == nodeAllocationFailure && run.id().type().environment().isTest())
+ .isEmpty());
+ }
+
/** Returns the jobs with any runs matching the given versions — targets only for system test, everything present otherwise. */
public JobList triggeredOn(Versions versions) {
return matching(job -> ! RunList.from(job).on(versions).isEmpty());