diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2020-05-25 15:14:55 +0200 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2020-05-25 15:14:55 +0200 |
commit | 4758a51bf06db3c937e5a3070f734089c11dcf4b (patch) | |
tree | 598f657e154bacf3fe8d831c06124313b367f217 /controller-server | |
parent | fd9418f04c6969b742144902bd6a7cb207e3aec2 (diff) |
Include instances with only tests in confidence computation if app has other prod deployment
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VespaVersion.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VespaVersion.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VespaVersion.java index 7122b7dcc40..593b1438856 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VespaVersion.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VespaVersion.java @@ -46,9 +46,9 @@ public class VespaVersion implements Comparable<VespaVersion> { } public static Confidence confidenceFrom(DeploymentStatistics statistics, Controller controller) { - InstanceList all = InstanceList.from(controller.jobController().deploymentStatuses(ApplicationList.from(controller.applications().asList()))) - .withProductionDeployment(); - // 'production on this': All deployment jobs upgrading to this version have completed without failure + InstanceList all = InstanceList.from(controller.jobController().deploymentStatuses(ApplicationList.from(controller.applications().asList()) + .withProductionDeployment())); + // 'production on this': All production deployment jobs upgrading to this version have completed without failure InstanceList productionOnThis = all.matching(instance -> statistics.productionSuccesses().stream().anyMatch(run -> run.id().application().equals(instance))) .not().failingUpgrade() .not().upgradingTo(statistics.version()); @@ -63,12 +63,12 @@ public class VespaVersion implements Comparable<VespaVersion> { return Confidence.broken; // 'low' unless all canary applications are upgraded - if (productionOnThis.with(UpgradePolicy.canary).size() < all.with(UpgradePolicy.canary).size()) + if (productionOnThis.with(UpgradePolicy.canary).size() < all.withProductionDeployment().with(UpgradePolicy.canary).size()) return Confidence.low; // 'high' if 90% of all default upgrade applications upgraded if (productionOnThis.with(UpgradePolicy.defaultPolicy).size() >= - all.with(UpgradePolicy.defaultPolicy).size() * 0.9) + all.withProductionDeployment().with(UpgradePolicy.defaultPolicy).size() * 0.9) return Confidence.high; return Confidence.normal; |