diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2023-10-02 09:15:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-02 09:15:38 +0200 |
commit | 2f718b83022b1158be18ef14e16c4628b3e606a1 (patch) | |
tree | c64186037d74922ad593d1531eecfea90fedea45 /controller-server/src/main | |
parent | 3b5ff95e40afc294ec6dc02d7e865b85f45cf3b2 (diff) | |
parent | 4265888cd9ccea8aada319ed91ce3a8b0151ddee (diff) |
Merge pull request #28740 from vespa-engine/jonmv/require-at-least-half-apps-regardless-of-pins
Require at least 50% of all canaries for normal, of defaults for high
Diffstat (limited to 'controller-server/src/main')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VespaVersion.java | 12 |
1 files changed, 9 insertions, 3 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 b03098bf18f..8a415a1e7e3 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 @@ -53,9 +53,15 @@ public record VespaVersion(Version version, if (productionOnThis.with(UpgradePolicy.canary).unpinned().size() < all.withProductionDeployment().with(UpgradePolicy.canary).unpinned().size()) return Confidence.low; - // 'high' if 90% of all unpinned default upgrade applications upgraded - if (productionOnThis.with(UpgradePolicy.defaultPolicy).unpinned().groupingBy(TenantAndApplicationId::from).size() >= - all.withProductionDeployment().with(UpgradePolicy.defaultPolicy).unpinned().groupingBy(TenantAndApplicationId::from).size() * 0.9) + // 'low' unless at least half of all canary applications are upgraded + if (productionOnThis.with(UpgradePolicy.canary).size() < all.withProductionDeployment().with(UpgradePolicy.canary).size() * 0.5) + return Confidence.low; + + // 'high' if 90% of all unpinned default upgrade applications, and 50% of all of them, have upgraded + if ( productionOnThis.with(UpgradePolicy.defaultPolicy).unpinned().groupingBy(TenantAndApplicationId::from).size() >= + all.withProductionDeployment().with(UpgradePolicy.defaultPolicy).unpinned().groupingBy(TenantAndApplicationId::from).size() * 0.9 + && productionOnThis.with(UpgradePolicy.defaultPolicy).groupingBy(TenantAndApplicationId::from).size() >= + all.withProductionDeployment().with(UpgradePolicy.defaultPolicy).groupingBy(TenantAndApplicationId::from).size() * 0.5) return Confidence.high; return Confidence.normal; |