Skip to content

Commit

Permalink
STL-744: Add error relate to synchronize translation to execution log
Browse files Browse the repository at this point in the history
  • Loading branch information
hung-nguyen-hoang committed Aug 21, 2024
1 parent dc0cf98 commit fbdb63c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.68
3.7.69
22 changes: 21 additions & 1 deletion lib/gooddata/lcm/actions/synchronize_clients.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,27 @@ def error_handle(segment, error_result, continue_on_error, params)

# Synchronize failure for all clients in segment
if continue_on_error && success_count.zero? && failed_count.positive?
segment_warning_message = "Failed to synchronize clients for #{segment.segment_id} segment. Details: #{sync_result['links']['details']}"
segment_warning_message = "Failed to synchronize all clients for #{segment.segment_id} segment. Details: #{sync_result['links']['details']}"
if sync_result['links'] && sync_result['links']['details'] # rubocop:disable Style/SafeNavigation
begin
client = params.gdc_gd_client
response = client.get sync_result['links']['details']
error_detail_result = response['synchronizationResultDetails']

if error_detail_result && error_detail_result.items # rubocop:disable Style/SafeNavigation
error_count = 1
error_detail_result.items.each do |item|
break if error_count > 5

GoodData.logger.warn(error_message(item, segment))
error_count += 1
end
end
rescue StandardError => ex
GoodData.logger.warn "Failed to fetch result of synchronize clients. Error: #{ex.message}"
end
end

add_failed_segment(segment.segment_id, segment_warning_message, short_name, params)
return
end
Expand Down

0 comments on commit fbdb63c

Please sign in to comment.