Skip to content

Commit

Permalink
Merge pull request #25123 from vespa-engine/mortent/setup-validator
Browse files Browse the repository at this point in the history
Setup change validator
  • Loading branch information
bjorncs authored Dec 6, 2022
2 parents 77cb75a + 0dcd228 commit 3d4d764
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.yahoo.config.model.deploy.DeployState;
import com.yahoo.config.provision.ClusterSpec;
import com.yahoo.vespa.model.VespaModel;
import com.yahoo.vespa.model.application.validation.change.CertificateRemovalChangeValidator;
import com.yahoo.vespa.model.application.validation.change.ChangeValidator;
import com.yahoo.vespa.model.application.validation.change.CloudAccountChangeValidator;
import com.yahoo.vespa.model.application.validation.change.ClusterSizeReductionValidator;
Expand Down Expand Up @@ -121,7 +122,8 @@ private static List<ConfigChangeAction> validateChanges(VespaModel currentModel,
new ContainerRestartValidator(),
new NodeResourceChangeValidator(),
new RedundancyIncreaseValidator(),
new CloudAccountChangeValidator()
new CloudAccountChangeValidator(),
new CertificateRemovalChangeValidator()
};
List<ConfigChangeAction> actions = Arrays.stream(validators)
.flatMap(v -> v.validate(currentModel, nextModel, overrides, now).stream())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public List<ConfigChangeAction> validate(VespaModel current, VespaModel next, Va

current.getContainerClusters()
.forEach((clusterId, currentCluster) -> {
validateClients(clusterId, currentCluster.getClients(), next.getContainerClusters().get(clusterId).getClients(), overrides, now);
if(next.getContainerClusters().containsKey(clusterId))
validateClients(clusterId, currentCluster.getClients(), next.getContainerClusters().get(clusterId).getClients(), overrides, now);
});

return List.of();
Expand Down

0 comments on commit 3d4d764

Please sign in to comment.