summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorValerij Fredriksen <valerijf@verizonmedia.com>2021-09-09 14:15:17 +0200
committerValerij Fredriksen <valerijf@verizonmedia.com>2021-09-09 21:41:11 +0200
commite3417b01dea32f147b246f1af7d3d675b9cb5b08 (patch)
treecc314d0eb1cfefd627e1f977bfda5863ca88cd38 /controller-api
parentdacf6dc8fe7566123423aad9aa29481bb50f6f60 (diff)
Store application package diffs on submit/deploy
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationStore.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationStore.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationStore.java
index d072ad595c6..6620cd4d0e3 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationStore.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/ApplicationStore.java
@@ -1,10 +1,8 @@
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.integration.deployment;
-import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.ApplicationName;
import com.yahoo.config.provision.TenantName;
-import com.yahoo.config.provision.zone.ZoneId;
import com.yahoo.vespa.hosted.controller.api.identifiers.DeploymentId;
import java.time.Instant;
@@ -23,11 +21,14 @@ public interface ApplicationStore {
/** Returns the tenant application package of the given version. */
byte[] get(DeploymentId deploymentId, ApplicationVersion applicationVersion);
+ /** Returns the application package diff, compared to the previous build, for the given tenant, application and build number */
+ Optional<String> getDiff(TenantName tenantName, ApplicationName applicationName, long buildNumber);
+
/** Find application package by given build number */
Optional<byte[]> find(TenantName tenant, ApplicationName application, long buildNumber);
- /** Stores the given tenant application package of the given version. */
- void put(TenantName tenant, ApplicationName application, ApplicationVersion applicationVersion, byte[] applicationPackage);
+ /** Stores the given tenant application package of the given version and diff since previous version. */
+ void put(TenantName tenant, ApplicationName application, ApplicationVersion applicationVersion, byte[] applicationPackage, String diff);
/** Removes applications older than the given version, for the given application, and returns whether something was removed. */
boolean prune(TenantName tenant, ApplicationName application, ApplicationVersion olderThanVersion);
@@ -47,8 +48,11 @@ public interface ApplicationStore {
/** Removes all tester packages for the given tester. */
void removeAllTesters(TenantName tenant, ApplicationName application);
- /** Stores the given application package as the development package for the given application and zone. */
- void putDev(DeploymentId deploymentId, byte[] applicationPackage);
+ /** Returns the application package diff, compared to the previous build, for the given deployment and build number */
+ Optional<String> getDevDiff(DeploymentId deploymentId, long buildNumber);
+
+ /** Stores the given application package as the development package for the given deployment and version and diff since previous version. */
+ void putDev(DeploymentId deploymentId, ApplicationVersion version, byte[] applicationPackage, String diff);
/** Stores the given application meta data with the current time as part of the path. */
void putMeta(TenantName tenant, ApplicationName application, Instant now, byte[] metaZip);