Skip to content

Commit

Permalink
chore(monitored deploy): clean up naming broadcast -> notify (#3155)
Browse files Browse the repository at this point in the history
left over cleanup from the previous PR
  • Loading branch information
marchello2000 committed Sep 16, 2019
1 parent 8fcc40a commit 0098b13
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ class MonitoredDeployStrategy implements Strategy {
WaitStage waitStage

@Autowired
NotifyDeployStartingStage broadcastDeployStartingStage
NotifyDeployStartingStage notifyDeployStartingStage

@Autowired
NotifyDeployCompletedStage broadcastDeployCompletedStage
NotifyDeployCompletedStage notifyDeployCompletedStage

@Autowired
EvaluateDeploymentHealthStage evaluateDeploymentHealthStage
Expand Down Expand Up @@ -181,15 +181,15 @@ class MonitoredDeployStrategy implements Strategy {
}

if (mdsd.deploymentMonitor.id) {
def broadcastDeployStartingStage = newStage(
def notifyDeployStartingStage = newStage(
stage.execution,
broadcastDeployStartingStage.type,
this.notifyDeployStartingStage.type,
"Notify monitored deploy starting",
evalContext,
stage,
SyntheticStageOwner.STAGE_AFTER
)
stages << broadcastDeployStartingStage
stages << notifyDeployStartingStage
} else {
log.warn("No deployment monitor specified, all monitoring will be skipped")
}
Expand Down Expand Up @@ -304,8 +304,8 @@ class MonitoredDeployStrategy implements Strategy {
if (mdsd.deploymentMonitor.id) {
stages << newStage(
stage.execution,
broadcastDeployCompletedStage.type,
"Broadcast Monitored Deployment Completed",
notifyDeployCompletedStage.type,
"Notify monitored deploy complete",
evalContext,
stage,
SyntheticStageOwner.STAGE_AFTER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class NotifyDeployCompletedTask extends MonitoredDeployBaseTask {
public @Nonnull TaskResult executeInternal() {
// TODO(mvulfson): actually populate the request data
DeploymentCompletedRequest request = new DeploymentCompletedRequest(stage);
monitorDefinition.getService().broadcastCompleted(request);
monitorDefinition.getService().notifyCompleted(request);

return TaskResult.ofStatus(ExecutionStatus.SUCCEEDED);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class NotifyDeployStartingTask extends MonitoredDeployBaseTask {
@Override
public @Nonnull TaskResult executeInternal() {
RequestBase request = new RequestBase(stage);
EvaluateHealthResponse response = monitorDefinition.getService().broadcastStarting(request);
EvaluateHealthResponse response = monitorDefinition.getService().notifyStarting(request);

sanitizeAndLogResponse(response);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ class EvaluateDeploymentHealthTaskSpec extends Specification {
def "should handle bad responses from 3rd party monitor"() {
given:
def monitorServiceStub = Stub(DeploymentMonitorService) {
// broadcastStarting(_) >> {
// notifyStarting(_) >> {
// }
//
// broadcastCompleted(_) >> {
// notifyCompleted(_) >> {
// }
//
evaluateHealth(_) >> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@

public interface DeploymentMonitorService {
@POST("/deployment/starting")
EvaluateHealthResponse broadcastStarting(@Body RequestBase request);
EvaluateHealthResponse notifyStarting(@Body RequestBase request);

@POST("/deployment/completed")
Response broadcastCompleted(@Body DeploymentCompletedRequest request);
Response notifyCompleted(@Body DeploymentCompletedRequest request);

@POST("/deployment/evaluateHealth")
EvaluateHealthResponse evaluateHealth(@Body EvaluateHealthRequest request);
Expand Down

0 comments on commit 0098b13

Please sign in to comment.