summaryrefslogtreecommitdiffstats
path: root/controller-server/src/main/java/com/yahoo
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2023-03-10 09:14:48 +0100
committerjonmv <venstad@gmail.com>2023-03-10 09:14:48 +0100
commit8197eb4fb0ab6f8459777fb9c9dc9fa9b4053e7a (patch)
tree7b180027adcb59ea75c52673baba2a8621596338 /controller-server/src/main/java/com/yahoo
parent7284e71d05812bd972429a112bd49fd80a6939d3 (diff)
Improve validation error message
Diffstat (limited to 'controller-server/src/main/java/com/yahoo')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ApplicationPackageValidator.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ApplicationPackageValidator.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ApplicationPackageValidator.java
index 842d99abe71..bd42587576d 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ApplicationPackageValidator.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/application/pkg/ApplicationPackageValidator.java
@@ -225,14 +225,15 @@ public class ApplicationPackageValidator {
oldEndpoint.allowedUrns().stream().map(AllowedUrn::toString).collect(joining(", ", "[", "]")) +
", but does not include all these in the new deployment spec. " +
"Deploying with the new settings will allow access to " +
- (newEndpoint.allowedUrns().isEmpty() ? "no one" : newEndpoint.allowedUrns().stream().map(AllowedUrn::toString).collect(joining(", ", "[", "]"))));
+ (newEndpoint.allowedUrns().isEmpty() ? "no one" : newEndpoint.allowedUrns().stream().map(AllowedUrn::toString).collect(joining(", ", "[", "]")) +
+ ". " + ValidationOverrides.toAllowMessage(validationId)));
});
newEndpoints.forEach((cluster, newEndpoint) -> {
ZoneEndpoint oldEndpoint = oldEndpoints.getOrDefault(cluster, ZoneEndpoint.defaultEndpoint);
if (oldEndpoint.isPublicEndpoint() && ! newEndpoint.isPublicEndpoint())
throw new IllegalArgumentException(prefix + "has a public endpoint for cluster '" + cluster.value() +
"' in '" + zone.region().get().value() + "', but the new deployment spec " +
- "disables this");
+ "disables this. " + ValidationOverrides.toAllowMessage(validationId));
});
});
}