Download logs only when deployment succeeded
@@ -423,8 +423,9 @@ public class InternalStepRunner implements StepRunner {
private Optional<RunStatus> copyVespaLogs(RunId id, DualLogger logger) {
ZoneId zone = id.type().zone(controller.system());
- logger.log("Copying Vespa log from nodes of " + id.application() + " in " + zone + " ...");
+ if (controller.applications().require(id.application()).deployments().containsKey(zone))
try {
+ logger.log("Copying Vespa log from nodes of " + id.application() + " in " + zone + " ...");
List<LogEntry> entries = new ArrayList<>();
String logs = IOUtils.readAll(controller.configServer().getLogStream(new DeploymentId(id.application(), zone),
Collections.emptyMap()), // Get all logs.
