diff options
author | jonmv <venstad@gmail.com> | 2022-06-27 11:54:32 +0200 |
---|---|---|
committer | jonmv <venstad@gmail.com> | 2022-06-27 11:54:32 +0200 |
commit | 4e483cd3535c4d3224716a00d0dc4e1af94f6047 (patch) | |
tree | 0b5c4a3913410055a469155380ec781194b347f1 /controller-server | |
parent | 44515f9965c847d0c8ebdc351239804ecf6236ee (diff) |
Ensure compatible versions for pure test instances
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/DeploymentTrigger.java | 5 |
1 files changed, 3 insertions, 2 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 df8ee910dc4..32bb849a45b 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 @@ -104,8 +104,9 @@ public class DeploymentTrigger { // If the outstanding revision requires a certain platform for compatibility, add that here. VersionCompatibility compatibility = applications().versionCompatibility(status.application().id().instance(instance)); Predicate<Version> compatibleWithCompileVersion = version -> compileVersion.map(compiled -> compatibility.accept(version, compiled)).orElse(true); - if (status.application().productionDeployments().getOrDefault(instance, List.of()).stream() - .anyMatch(deployment -> ! compatibleWithCompileVersion.test(deployment.version()))) { + if ( status.application().productionDeployments().isEmpty() + || status.application().productionDeployments().getOrDefault(instance, List.of()).stream() + .anyMatch(deployment -> ! compatibleWithCompileVersion.test(deployment.version()))) { return targetsForPolicy(controller.readVersionStatus(), status.application().deploymentSpec().requireInstance(instance).upgradePolicy()) .stream() // Pick the latest platform which is compatible with the compile version, and is ready for this instance. .filter(compatibleWithCompileVersion) |