diff --git a/orca-core/src/main/groovy/com/netflix/spinnaker/orca/pipeline/tasks/WaitTask.groovy b/orca-core/src/main/groovy/com/netflix/spinnaker/orca/pipeline/tasks/WaitTask.groovy index 3e63d38cfc..475ca27a67 100644 --- a/orca-core/src/main/groovy/com/netflix/spinnaker/orca/pipeline/tasks/WaitTask.groovy +++ b/orca-core/src/main/groovy/com/netflix/spinnaker/orca/pipeline/tasks/WaitTask.groovy @@ -35,6 +35,9 @@ class WaitTask implements RetryableTask { @Override TaskResult execute(Stage stage) { + if (stage.context.waitTime == null) { + return new TaskResult(SUCCEEDED) + } // wait time is specified in seconds long waitTime = stage.context.waitTime as long def waitTimeMs = TimeUnit.MILLISECONDS.convert(waitTime, TimeUnit.SECONDS) diff --git a/orca-mine/src/main/groovy/com/netflix/spinnaker/orca/mine/tasks/DisableCanaryTask.groovy b/orca-mine/src/main/groovy/com/netflix/spinnaker/orca/mine/tasks/DisableCanaryTask.groovy index 15900823da..87a9a62e25 100644 --- a/orca-mine/src/main/groovy/com/netflix/spinnaker/orca/mine/tasks/DisableCanaryTask.groovy +++ b/orca-mine/src/main/groovy/com/netflix/spinnaker/orca/mine/tasks/DisableCanaryTask.groovy @@ -27,9 +27,12 @@ class DisableCanaryTask extends AbstractCloudProviderAwareTask implements Task { try { def canary = mineService.getCanary(stage.context.canary.id) - if (canary.health?.health == 'UNHEALTHY') { + if (canary.health?.health == 'UNHEALTHY' || stage.context.unhealthy != null) { // If unhealthy, already disabled in MonitorCanaryTask - return TaskResult.SUCCEEDED + return new TaskResult(ExecutionStatus.SUCCEEDED, [ + waitTime : waitTime, + unhealthy : true + ]) } } catch (RetrofitError e) { log.error("Exception occurred while getting canary status with id {} from mine, continuing with disable",