Skip to content

Commit

Permalink
fix(core): Don't apply traffic checks w/o front50 (#1261)
Browse files Browse the repository at this point in the history
Crashing the pipeline when front50 is disabled causes problems when
running pipelines against a minimal (clouddriver + orca) Spinnaker
  • Loading branch information
lwander committed Mar 31, 2017
1 parent a5ed624 commit cb2cd75
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -21,6 +21,7 @@
import com.netflix.spinnaker.orca.clouddriver.pipeline.servergroup.support.TargetServerGroup;
import com.netflix.spinnaker.orca.front50.Front50Service;
import com.netflix.spinnaker.orca.front50.model.Application;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
Expand All @@ -32,6 +33,7 @@
import static java.lang.String.format;

@Component
@Slf4j
public class TrafficGuard {

private final OortHelper oortHelper;
Expand Down Expand Up @@ -113,7 +115,8 @@ private void verifyOtherServerGroupsAreTakingTraffic(String serverGroupName, Loc

public boolean hasDisableLock(String cluster, String account, Location location) {
if (front50Service == null) {
throw new UnsupportedOperationException("Front50 has not been configured, no way to check disable lock. Fix this by setting front50.enabled: true");
log.warn("Front50 has not been configured, no way to check disable lock. Fix this by setting front50.enabled: true");
return false;
}
Names names = Names.parseName(cluster);
Application application;
Expand Down

0 comments on commit cb2cd75

Please sign in to comment.