Skip to content

Commit

Permalink
BUGFIX: MSF-25800 Add SSLErrorWaitReadable error to retry error list
Browse files Browse the repository at this point in the history
  • Loading branch information
hung-nguyen-hoang committed Oct 1, 2023
1 parent 299025c commit 72b7e9a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.61
3.7.62
6 changes: 6 additions & 0 deletions lib/gooddata/lcm/lcm2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,12 @@ def run_action(action, params)
BaseAction.check_params(action.const_get('PARAMS'), params)
params.setup_filters(action.const_get('PARAMS'))
out = action.send(:call, params)
rescue Exception => e # rubocop:disable RescueException
# Log to splunk
GoodData.gd_logger.error("action=#{action} status=failed message=#{e} exception=#{e.backtrace}")
# Log to execution log
GoodData.logger.error("Execution #{action} failed. Error: #{e}. Detail:#{e.backtrace}")
raise e
ensure
params.clear_filters
GoodData.gd_logger.end_action GoodData.gd_logger
Expand Down
1 change: 1 addition & 0 deletions lib/gooddata/rest/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class Connection
RETRY_TIME_INITIAL_VALUE = 1
RETRY_TIME_COEFFICIENT = 1.5
RETRYABLE_ERRORS << Net::ReadTimeout if Net.const_defined?(:ReadTimeout)
RETRYABLE_ERRORS << OpenSSL::SSL::SSLErrorWaitReadable if OpenSSL::SSL.const_defined?(:SSLErrorWaitReadable)

class << self
def construct_login_payload(username, password)
Expand Down
2 changes: 2 additions & 0 deletions spec/unit/lcm/lcm2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
before do
allow(logger).to receive(:class) { Logger }
allow(GoodData.gd_logger).to receive(:info)
allow(GoodData.gd_logger).to receive(:error)
end

describe '#perform' do
Expand All @@ -42,6 +43,7 @@
allow(client).to receive(:class) { GoodData::Rest::Client }
allow(client).to receive(:domain) { domain }
allow(logger).to receive(:info)
allow(logger).to receive(:error)
allow(domain).to receive(:data_products)
end

Expand Down

0 comments on commit 72b7e9a

Please sign in to comment.