Skip to content

Commit

Permalink
Merge pull request #28793 from vespa-engine/mpolden/remove-exception-…
Browse files Browse the repository at this point in the history
…handling

Do not ignore BasicServicesXml parsing failure when preparing endpoints
  • Loading branch information
jonmv authored Oct 4, 2023
2 parents a42a5e9 + 81f94d9 commit 584223f
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -577,17 +576,7 @@ private PreparedEndpoints prepareEndpoints(DeploymentId deployment, JobId job, L
.orElseGet(Tags::empty);
Optional<EndpointCertificate> 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);
}

Expand Down

0 comments on commit 584223f

Please sign in to comment.