Only read DeploymentStatus for non-manually deployed environments
@@ -1391,7 +1391,6 @@ public class ApplicationApiHandler extends AuditLoggingRequestHandler {
controller.zoneRegistry().getDeploymentTimeToLive(deploymentId.zoneId())
.ifPresent(deploymentTimeToLive -> response.setLong("expiryTimeEpochMs", deployment.at().plus(deploymentTimeToLive).toEpochMilli()));
- DeploymentStatus status = controller.jobController().deploymentStatus(application);
application.projectId().ifPresent(i -> response.setString("screwdriverId", String.valueOf(i)));
sourceRevisionToSlime(deployment.applicationVersion().source(), response);
@@ -1400,6 +1399,8 @@ public class ApplicationApiHandler extends AuditLoggingRequestHandler {
if (!instance.rotations().isEmpty() && deployment.zone().environment() == Environment.prod)
toSlime(instance.rotations(), instance.rotationStatus(), deployment, response);
+ if (!deployment.zone().environment().isManuallyDeployed()) {
+ DeploymentStatus status = controller.jobController().deploymentStatus(application);
JobType.from(controller.system(), deployment.zone())
.map(type -> new JobId(instance.id(), type))
.map(status.jobSteps()::get)
@@ -1413,6 +1414,7 @@ public class ApplicationApiHandler extends AuditLoggingRequestHandler {
else response.setString("status", "running");
});
}
+ }
response.setDouble("quota", deployment.quota().rate());
deployment.cost().ifPresent(cost -> response.setDouble("cost", cost));
