diff --git a/.gdc-ii-config.yaml b/.gdc-ii-config.yaml index b3831b6ef..438cb7b1c 100644 --- a/.gdc-ii-config.yaml +++ b/.gdc-ii-config.yaml @@ -4,10 +4,10 @@ microservices: dockerfile: './DockerfileOldImage' # specifies whether promote image to M3 image tag when release LCM. Default always promote image. Don't remote # image when promoteImage configure false - promoteImage: false + promoteImage: true # specifies whether run register pipeline components for the image when promote image. Default always run register # pipeline components. Don't run register when registerPipelineComponentsWhenPromote configure false - registerPipelineComponentsWhenPromote: false + registerPipelineComponentsWhenPromote: true argumentsFromFiles: BRICKS_VERSION: 'VERSION' lcm-bricks-nextversion: @@ -15,7 +15,7 @@ microservices: dockerfile: './Dockerfile' # specifies whether promote image to M3 image tag when release LCM. Default always promote image. Don't remote # image when promoteImage configure false - promoteImage: true + promoteImage: false # specifies whether run register pipeline components for the image when promote image. Default always run register # pipeline components. Don't run register when registerPipelineComponentsWhenPromote configure false registerPipelineComponentsWhenPromote: false diff --git a/VERSION b/VERSION index 24d23588d..434b46c4e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.7.89 +3.7.90 diff --git a/lib/gooddata/lcm/actions/synchronize_clients.rb b/lib/gooddata/lcm/actions/synchronize_clients.rb index b757a4e13..d7696609d 100644 --- a/lib/gooddata/lcm/actions/synchronize_clients.rb +++ b/lib/gooddata/lcm/actions/synchronize_clients.rb @@ -61,6 +61,7 @@ class SynchronizeClients < BaseAction class << self def call(params) + GoodData.logger.info 'Starting SynchronizeClients action' client = params.gdc_gd_client domain_name = params.organization || params.domain @@ -91,7 +92,9 @@ def call(params) segment.master_project = master segment.save + GoodData.logger.info "Starting synchronize clients for segment: '#{segment.segment_id}' with master workspace: '#{current_master[:master_project_id]}'" res = segment.synchronize_clients + GoodData.logger.info "Finish synchronize clients for segment: '#{segment.segment_id}'" sync_result = res.json['synchronizationResult'] failed_count = sync_result['failedClients']['count'] diff --git a/lib/gooddata/rest/client.rb b/lib/gooddata/rest/client.rb index 6b15d0625..550f4ea22 100644 --- a/lib/gooddata/rest/client.rb +++ b/lib/gooddata/rest/client.rb @@ -25,7 +25,7 @@ class Client # Constants ################################# DEFAULT_CONNECTION_IMPLEMENTATION = GoodData::Rest::Connection - DEFAULT_SLEEP_INTERVAL = 10 + DEFAULT_SLEEP_INTERVAL = 10 # 10 seconds DEFAULT_POLL_TIME_LIMIT = 5 * 60 * 60 # 5 hours ################################# @@ -353,6 +353,11 @@ def poll_on_response(link, options = {}, &bl) end sleep retry_time retry_time *= GoodData::Rest::Connection::RETRY_TIME_COEFFICIENT + # Polling response will wait result from calling APIs. So don't need wait a long time for each polling + if retry_time > DEFAULT_SLEEP_INTERVAL + retry_time = DEFAULT_SLEEP_INTERVAL + end + GoodData::Rest::Client.retryable(:tries => Helpers::GD_MAX_RETRY, :refresh_token => proc { connection.refresh_token }) do response = get(link, process: process) end diff --git a/spec/unit/rest/polling_spec.rb b/spec/unit/rest/polling_spec.rb index 0373565d6..18250a2f4 100644 --- a/spec/unit/rest/polling_spec.rb +++ b/spec/unit/rest/polling_spec.rb @@ -71,6 +71,7 @@ before do GoodData::Rest::Connection::RETRY_TIME_INITIAL_VALUE = 1 GoodData::Rest::Connection::RETRY_TIME_COEFFICIENT = 1.5 + GoodData::Rest::Client::DEFAULT_SLEEP_INTERVAL = 10 end it 'retries after an increasing interval' do