Check for tester endpoint only when needed
Do not check for tester endpoint when using config server for tester API calls,
since tester endpoint might not be a part of the routing policies in that case
@@ -183,16 +183,17 @@ public class JobController {
if (step.isEmpty())
return run;
+ List<LogEntry> entries;
+ ZoneId zone = id.type().zone(controller.system());
+ if (useConfigServerForTesterAPI(zone)) {
+ entries = cloud.getLog(new DeploymentId(id.application(), zone), run.lastTestLogEntry());
+ } else {
Optional<URI> testerEndpoint = testerEndpoint(id);
if (testerEndpoint.isEmpty())
return run;
- List<LogEntry> entries;
- ZoneId zone = id.type().zone(controller.system());
- if (useConfigServerForTesterAPI(zone))
- entries = cloud.getLog(new DeploymentId(id.application(), zone), run.lastTestLogEntry());
- else
entries = cloud.getLog(testerEndpoint.get(), run.lastTestLogEntry());
+ }
if (entries.isEmpty())
return run;
