summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorJon Marius Venstad <jonmv@users.noreply.github.com>2023-08-23 16:06:30 +0200
committerGitHub <noreply@github.com>2023-08-23 16:06:30 +0200
commitf37ad506b56dffd8002eb9334d0811e788dade01 (patch)
tree1527195b67497eee037edc911928c2c4766f666d /controller-api
parentf5d7c59226176a53793ea392debd399197f55689 (diff)
parent9aa7a9d6e0885bf1253e5f4b7469d1f415ed1ff8 (diff)
Merge pull request #28128 from vespa-engine/jonmv/build-number-in-submit-response
Return build number with submit response
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationVersion.java8
1 files changed, 4 insertions, 4 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 29e1d494ffc..7303320a4f7 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
@@ -95,8 +95,8 @@ public class ApplicationVersion implements Comparable<ApplicationVersion> {
public String stringId() {
return source.map(SourceRevision::commit).map(ApplicationVersion::abbreviateCommit)
.or(this::commit)
- .map(commit -> String.format("%s.%d-%s", majorVersion, buildNumber().getAsLong(), commit))
- .orElseGet(() -> majorVersion + "." + buildNumber().getAsLong());
+ .map(commit -> String.format("%s.%d-%s", majorVersion, buildNumber(), commit))
+ .orElseGet(() -> majorVersion + "." + buildNumber());
}
/**
@@ -105,8 +105,8 @@ public class ApplicationVersion implements Comparable<ApplicationVersion> {
*/
public Optional<SourceRevision> source() { return source; }
- /** Returns the build number that built this version */
- public OptionalLong buildNumber() { return OptionalLong.of(id.number()); }
+ /** Returns the build number of this version */
+ public long buildNumber() { return id.number(); }
/** Returns the email of the author of commit of this version, if known */
public Optional<String> authorEmail() { return authorEmail; }