From 81f94d90aedf919d836dfd5b6d4393b887b361f7 Mon Sep 17 00:00:00 2001 From: Martin Polden Date: Wed, 4 Oct 2023 16:02:21 +0200 Subject: [PATCH] Do not ignore BasicServicesXml parsing failure --- .../hosted/controller/ApplicationController.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java index ca3c66c9f72f..5e4d73954ae3 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/ApplicationController.java @@ -121,7 +121,6 @@ import static com.yahoo.vespa.hosted.controller.versions.VespaVersion.Confidence.high; import static com.yahoo.vespa.hosted.controller.versions.VespaVersion.Confidence.low; import static com.yahoo.vespa.hosted.controller.versions.VespaVersion.Confidence.normal; -import static java.util.Comparator.comparing; import static java.util.Comparator.naturalOrder; import static java.util.stream.Collectors.collectingAndThen; import static java.util.stream.Collectors.counting; @@ -577,17 +576,7 @@ private PreparedEndpoints prepareEndpoints(DeploymentId deployment, JobId job, L .orElseGet(Tags::empty); Optional certificate = endpointCertificates.get(instance, deployment.zoneId(), applicationPackage.truncatedPackage().deploymentSpec()); certificate.ifPresent(e -> deployLogger.accept("Using CA signed certificate version %s".formatted(e.version()))); - BasicServicesXml services; - try { - services = applicationPackage.truncatedPackage().services(deployment, tags); - } catch (Exception e) { - // If the basic parsing done by the controller fails, we ignore the exception here so that - // complete parsing errors are propagated from the config server. Otherwise, throwing here - // will interrupt the request while it's being streamed to the config server - log.warning("Ignoring failure to parse services.xml for deployment " + deployment + - " while streaming application package: " + Exceptions.toMessageString(e)); - services = BasicServicesXml.empty; - } + BasicServicesXml services = applicationPackage.truncatedPackage().services(deployment, tags); return controller.routing().of(deployment).prepare(services, certificate, application); }