aboutsummaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-09-07 10:53:19 +0200
committerValerij Fredriksen <valerijf@verizonmedia.com>2021-09-09 21:41:10 +0200
commit902fd292cf302470473ef958cbcf9e5ac1f63ee8 (patch)
treec34a4d9e9795a24d6167b0f8ea31a82e4b947f06 /controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java
parent7b90204f58716ef9fd9238de4f65bfb1c2ba29a3 (diff)
Direct deployments are "before" submitted versions
Diffstat (limited to 'controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java3
1 files changed, 3 insertions, 0 deletions
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<ApplicationVersion> {
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());
}