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 4746b38c4..44a748f39 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.7.91 +3.7.92 diff --git a/lib/gooddata/lcm/actions/synchronize_clients.rb b/lib/gooddata/lcm/actions/synchronize_clients.rb index d7696609d..7f4784795 100644 --- a/lib/gooddata/lcm/actions/synchronize_clients.rb +++ b/lib/gooddata/lcm/actions/synchronize_clients.rb @@ -50,6 +50,9 @@ class SynchronizeClients < BaseAction description 'Sync failed list' param :sync_failed_list, instance_of(Type::HashType), required: false + + description 'Synchronize clients time limit' + param :sync_clients_timeout, instance_of(Type::StringType), required: false end RESULT_HEADER = [ @@ -70,6 +73,8 @@ def call(params) data_product = params.data_product domain_segments = domain.segments(:all, data_product) keep_only_previous_masters_count = Integer(params.keep_only_previous_masters_count || "-1") + sync_clients_options = {} + sync_clients_options = sync_clients_options.merge(:time_limit => Integer(params.sync_clients_timeout)) if params.sync_clients_timeout segments = params.segments.map do |seg| domain_segments.find do |s| @@ -93,7 +98,7 @@ def call(params) 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 + res = segment.synchronize_clients(sync_clients_options) GoodData.logger.info "Finish synchronize clients for segment: '#{segment.segment_id}'" sync_result = res.json['synchronizationResult'] diff --git a/lib/gooddata/models/segment.rb b/lib/gooddata/models/segment.rb index 1448a15ab..6637dffb1 100644 --- a/lib/gooddata/models/segment.rb +++ b/lib/gooddata/models/segment.rb @@ -193,13 +193,14 @@ def save # Runs async process that walks through segments and provisions projects if necessary. # + # @param options [Hash] Options # @return [Array] Returns array of results - def synchronize_clients + def synchronize_clients(options = {}) sync_uri = SYNCHRONIZE_URI % [domain.obj_id, data_product.data_product_id, id] res = client.post sync_uri, nil # wait until the instance is created - res = client.poll_on_response(res['asyncTask']['links']['poll'], :sleep_interval => 1) do |r| + res = client.poll_on_response(res['asyncTask']['links']['poll'], options.merge(:sleep_interval => 1)) do |r| r['synchronizationResult'].nil? end