From 902fd292cf302470473ef958cbcf9e5ac1f63ee8 Mon Sep 17 00:00:00 2001 From: Jon Marius Venstad Date: Tue, 7 Sep 2021 10:53:19 +0200 Subject: Direct deployments are "before" submitted versions --- .../controller/api/integration/deployment/ApplicationVersion.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'controller-api') diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java index 76d7bdc4f12..978b6349dc0 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java @@ -174,6 +174,9 @@ public class ApplicationVersion implements Comparable { if (buildNumber().isEmpty() || o.buildNumber().isEmpty()) return Boolean.compare(buildNumber().isPresent(), o.buildNumber.isPresent()); // Unknown version sorts first + if (deployedDirectly || o.deployedDirectly) + return Boolean.compare(deployedDirectly, o.deployedDirectly); // Directly deployed versions sort first + return Long.compare(buildNumber().getAsLong(), o.buildNumber().getAsLong()); } -- cgit v1.2.3