aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/config
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2024-01-16 13:44:34 +0100
committerjonmv <venstad@gmail.com>2024-01-16 13:45:01 +0100
commitd1cbfbe0343da413386d98901be6b07f57e36ccb (patch)
tree238d2581ce6522be0aff31d3af3b3e9541bc49a0 /config-model/src/main/java/com/yahoo/config
parent86c611b29c7927b212e9482ad29d4741b344c56f (diff)
Revert "Merge pull request #29916 from vespa-engine/revert-29903-jonmv/two-phase-deploy"
This reverts commit 0ce3abacb981dc8e04fa54bc015f57e24a43a7fd, reversing changes made to e6120bdf3176e0d40141a32d6a7326794fba857f.
Diffstat (limited to 'config-model/src/main/java/com/yahoo/config')
-rw-r--r--config-model/src/main/java/com/yahoo/config/model/deploy/DeployState.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/DeployState.java b/config-model/src/main/java/com/yahoo/config/model/deploy/DeployState.java
index f19341098f4..647745eba5d 100644
--- a/config-model/src/main/java/com/yahoo/config/model/deploy/DeployState.java
+++ b/config-model/src/main/java/com/yahoo/config/model/deploy/DeployState.java
@@ -27,6 +27,7 @@ import com.yahoo.config.model.application.provider.MockFileRegistry;
import com.yahoo.config.model.provision.HostsXmlProvisioner;
import com.yahoo.config.model.provision.SingleNodeProvisioner;
import com.yahoo.config.model.test.MockApplicationPackage;
+import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.config.provision.DockerImage;
import com.yahoo.config.provision.Zone;
import com.yahoo.io.IOUtils;
@@ -92,6 +93,7 @@ public class DeployState implements ConfigDefinitionStore {
private final Reindexing reindexing;
private final ExecutorService executor;
private final OnnxModelCost onnxModelCost;
+ private final Set<ClusterSpec.Id> restartingClusters;
public static DeployState createTestState() {
return new Builder().build();
@@ -127,7 +129,8 @@ public class DeployState implements ConfigDefinitionStore {
Optional<DockerImage> wantedDockerImageRepo,
Reindexing reindexing,
Optional<ValidationOverrides> validationOverrides,
- OnnxModelCost onnxModelCost) {
+ OnnxModelCost onnxModelCost,
+ Set<ClusterSpec.Id> restartingClusters) {
this.logger = deployLogger;
this.fileRegistry = fileRegistry;
this.executor = executor;
@@ -156,6 +159,7 @@ public class DeployState implements ConfigDefinitionStore {
this.wantedDockerImageRepo = wantedDockerImageRepo;
this.reindexing = reindexing;
this.onnxModelCost = onnxModelCost;
+ this.restartingClusters = Set.copyOf(restartingClusters);
}
public static HostProvisioner getDefaultModelHostProvisioner(ApplicationPackage applicationPackage) {
@@ -311,6 +315,8 @@ public class DeployState implements ConfigDefinitionStore {
public OnnxModelCost onnxModelCost() { return onnxModelCost; }
+ public Set<ClusterSpec.Id> restartingClusters() { return restartingClusters; }
+
public boolean isHostedTenantApplication(ApplicationType type) {
boolean isTesterApplication = getProperties().applicationId().instance().isTester();
return isHosted() && type == ApplicationType.DEFAULT && !isTesterApplication;
@@ -340,6 +346,7 @@ public class DeployState implements ConfigDefinitionStore {
private Reindexing reindexing = null;
private Optional<ValidationOverrides> validationOverrides = Optional.empty();
private OnnxModelCost onnxModelCost = OnnxModelCost.disabled();
+ private Set<ClusterSpec.Id> restartingClusters = Set.of();
public Builder() {}
@@ -459,6 +466,11 @@ public class DeployState implements ConfigDefinitionStore {
public Builder onnxModelCost(OnnxModelCost instance) { this.onnxModelCost = instance; return this; }
+ public Builder restartingClusters(Set<ClusterSpec.Id> restartingClusters) {
+ this.restartingClusters = Set.copyOf(restartingClusters);
+ return this;
+ }
+
public DeployState build() {
return build(new ValidationParameters());
}
@@ -492,7 +504,8 @@ public class DeployState implements ConfigDefinitionStore {
wantedDockerImageRepo,
reindexing,
validationOverrides,
- onnxModelCost);
+ onnxModelCost,
+ restartingClusters);
}
}