diff options
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobController.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobController.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobController.java index 3cc08fb9f52..abd5ca8891a 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobController.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/deployment/JobController.java @@ -496,6 +496,12 @@ public class JobController { /** Orders a run of the given type, or throws an IllegalStateException if that job type is already running. */ public void start(ApplicationId id, JobType type, Versions versions, boolean isRedeployment, JobProfile profile, Optional<String> reason) { + if (versions.targetApplication().compileVersion() + .map(version -> controller.applications().versionCompatibility().refuse(versions.targetPlatform(), version)) + .orElse(false)) + throw new IllegalArgumentException("Will not start a job with incompatible platform version (" + versions.targetPlatform() + ") " + + "and compile versions (" + versions.targetApplication().compileVersion().get() + ")"); + locked(id, type, __ -> { Optional<Run> last = last(id, type); if (last.flatMap(run -> active(run.id())).isPresent()) |