From c8ad183a0b78ee052404b8720043d3ea79e25efc Mon Sep 17 00:00:00 2001 From: Asher Feldman Date: Tue, 26 Sep 2017 11:56:19 -0700 Subject: [PATCH] fix(redis_migration): fix logging of pending work --- ...ultiRedisOrchestrationMigrationNotificationAgent.groovy | 7 ++++--- .../MultiRedisPipelineMigrationNotificationAgent.groovy | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/migrations/MultiRedisOrchestrationMigrationNotificationAgent.groovy b/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/migrations/MultiRedisOrchestrationMigrationNotificationAgent.groovy index 4fc9e6603a..955755fb37 100644 --- a/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/migrations/MultiRedisOrchestrationMigrationNotificationAgent.groovy +++ b/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/migrations/MultiRedisOrchestrationMigrationNotificationAgent.groovy @@ -120,10 +120,11 @@ class MultiRedisOrchestrationMigrationNotificationAgent extends AbstractPollingN def migratableOrchestrations = unmigratedOrchestrations.findAll { it.status.isComplete() } def pendingOrchestrations = unmigratedOrchestrations.findAll { !it.status.isComplete() } + if (!pendingOrchestrations.isEmpty()) { + log.info("${pendingOrchestrations.size()} orchestrations yet to complete ${applicationName}) [${index}/${allApplications.size()}]") + } + if (migratableOrchestrations.isEmpty()) { - if (!pendingOrchestrations.isEmpty()) { - log.info("${pendingOrchestrations.size()} orchestrations yet to complete ${applicationName}) [${index}/${allApplications.size()}]") - } return } diff --git a/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/migrations/MultiRedisPipelineMigrationNotificationAgent.groovy b/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/migrations/MultiRedisPipelineMigrationNotificationAgent.groovy index 3d0c79611d..62cfd5781a 100644 --- a/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/migrations/MultiRedisPipelineMigrationNotificationAgent.groovy +++ b/orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/migrations/MultiRedisPipelineMigrationNotificationAgent.groovy @@ -117,10 +117,11 @@ class MultiRedisPipelineMigrationNotificationAgent extends AbstractPollingNotifi def migratablePipelines = unmigratedPipelines.findAll { it.status.isComplete() } def pendingPipelines = unmigratedPipelines.findAll { !it.status.isComplete() } + if (!pendingPipelines.isEmpty()) { + log.info("${pendingPipelines.size()} pipelines yet to complete (${pipelineConfigId}) [${index}/${allPipelineConfigIds.size()}]") + } + if (migratablePipelines.isEmpty()) { - if (!pendingPipelines.isEmpty()) { - log.info("${pendingPipelines.size()} pipelines yet to complete (${pipelineConfigId}) [${index}/${allPipelineConfigIds.size()}]") - } return }