summaryrefslogtreecommitdiffstats
path: root/hosted-api
diff options
context:
space:
mode:
Diffstat (limited to 'hosted-api')
-rw-r--r--hosted-api/pom.xml6
-rw-r--r--hosted-api/src/main/java/ai/vespa/hosted/api/ControllerHttpClient.java17
2 files changed, 14 insertions, 9 deletions
diff --git a/hosted-api/pom.xml b/hosted-api/pom.xml
index 6f7c6186ece..c016478c3f7 100644
--- a/hosted-api/pom.xml
+++ b/hosted-api/pom.xml
@@ -33,12 +33,6 @@
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>com.yahoo.vespa</groupId>
- <artifactId>yolean</artifactId>
- <version>${project.version}</version>
- <scope>provided</scope>
- </dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
diff --git a/hosted-api/src/main/java/ai/vespa/hosted/api/ControllerHttpClient.java b/hosted-api/src/main/java/ai/vespa/hosted/api/ControllerHttpClient.java
index 67cd7e1477e..3fdcf0e18d8 100644
--- a/hosted-api/src/main/java/ai/vespa/hosted/api/ControllerHttpClient.java
+++ b/hosted-api/src/main/java/ai/vespa/hosted/api/ControllerHttpClient.java
@@ -179,10 +179,21 @@ public abstract class ControllerHttpClient {
}
/** Returns the application package of the given id. */
+ // TODO(mpolden): Remove after all callers have switched to the method below
public HttpResponse<byte[]> applicationPackage(ApplicationId id) {
- return send(request(HttpRequest.newBuilder(applicationPackagePath(id))
- .timeout(Duration.ofMinutes(2)),
- GET));
+ return applicationPackage(id, false);
+ }
+
+ /**
+ * Returns the latest submitted application package of the given id. If latestDeployed is true, return the latest
+ * package that has been deployed to a production zone.
+ */
+ public HttpResponse<byte[]> applicationPackage(ApplicationId id, boolean latestDeployed) {
+ URI url = applicationPackagePath(id);
+ if (latestDeployed) {
+ url = withQuery(url, "build", "latestDeployed");
+ }
+ return send(request(HttpRequest.newBuilder(url).timeout(Duration.ofMinutes(2)), GET));
}
/** Returns the tenants in this system. */