Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gdc-ii-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ 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:
docker:
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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.91
3.7.92
7 changes: 6 additions & 1 deletion lib/gooddata/lcm/actions/synchronize_clients.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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|
Expand All @@ -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']
Expand Down
5 changes: 3 additions & 2 deletions lib/gooddata/models/segment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down