diff options
author | Jon Marius Venstad <jonmv@gmail.com> | 2022-04-07 17:52:08 +0200 |
---|---|---|
committer | Jon Marius Venstad <jonmv@gmail.com> | 2022-04-07 18:17:12 +0200 |
commit | 11fab95e8b642e005bc5c5d086861250ab5d4ef6 (patch) | |
tree | 63549882b945b271290b6b81d4357ddfe935e107 /controller-server | |
parent | c574abb1fe5cefeb37f41fcc0d76132f87854466 (diff) |
Avoid wasting test resources on revisions that will never roll out
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentStatus.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentStatus.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentStatus.java index a305050b5b0..a042215616c 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentStatus.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentStatus.java @@ -269,13 +269,16 @@ public class DeploymentStatus { public Change outstandingChange(InstanceName instance) { StepStatus status = instanceSteps().get(instance); if (status == null) return Change.empty(); - for (ApplicationVersion version : application.deployableVersions(application.deploymentSpec().requireInstance(instance).revisionTarget() == next)) { + boolean ascending = next == application.deploymentSpec().requireInstance(instance).revisionTarget(); + for (ApplicationVersion version : application.deployableVersions(ascending)) { if (status.dependenciesCompletedAt(Change.of(version), Optional.empty()).map(now::isBefore).orElse(true)) continue; Change change = Change.of(version); if (application.productionDeployments().getOrDefault(instance, List.of()).stream() .anyMatch(deployment -> change.downgrades(deployment.applicationVersion()))) continue; if ( ! application.require(instance).change().application().map(change::upgrades).orElse(true)) continue; - if (hasCompleted(instance, change)) continue; + if (hasCompleted(instance, change)) + if (ascending) continue; + else break; return change; } return Change.empty(); |