Upgrade to newest Sentry
This commit is contained in:
@ -38,7 +38,7 @@ class DockerClient
|
||||
Pathname.new(local_workspace_path).children.each do |p|
|
||||
p.rmtree
|
||||
rescue Errno::ENOENT, Errno::EACCES => error
|
||||
Raven.capture_exception(error)
|
||||
Sentry.capture_exception(error)
|
||||
Rails.logger.error("clean_container_workspace: Got #{error.class.to_s}: #{error.to_s}")
|
||||
end
|
||||
# FileUtils.rmdir(Pathname.new(local_workspace_path))
|
||||
@ -237,7 +237,7 @@ class DockerClient
|
||||
clean_container_workspace(container)
|
||||
FileUtils.rmtree(local_workspace_path(container))
|
||||
rescue Errno::ENOENT, Errno::EACCES => error
|
||||
Raven.capture_exception(error)
|
||||
Sentry.capture_exception(error)
|
||||
Rails.logger.error("clean_container_workspace: Got #{error.class.to_s}: #{error.to_s}")
|
||||
end
|
||||
|
||||
|
@ -16,16 +16,16 @@ class DockerContainerPool
|
||||
#Rails.logger.debug('created container ' + container.to_s + ' for execution environment ' + execution_environment.to_s)
|
||||
container
|
||||
rescue StandardError => e
|
||||
Raven.extra_context({container: container.inspect, execution_environment: execution_environment.inspect, config: config.inspect})
|
||||
Raven.capture_exception(e)
|
||||
Sentry.set_extras({container: container.inspect, execution_environment: execution_environment.inspect, config: config.inspect})
|
||||
Sentry.capture_exception(e)
|
||||
nil
|
||||
end
|
||||
|
||||
def self.return_container(container, execution_environment)
|
||||
Faraday.get(config[:location] + "/docker_container_pool/return_container/" + container.id)
|
||||
rescue StandardError => e
|
||||
Raven.extra_context({container: container.inspect, execution_environment: execution_environment.inspect, config: config.inspect})
|
||||
Raven.capture_exception(e)
|
||||
Sentry.set_extras({container: container.inspect, execution_environment: execution_environment.inspect, config: config.inspect})
|
||||
Sentry.capture_exception(e)
|
||||
nil
|
||||
end
|
||||
|
||||
@ -36,8 +36,8 @@ class DockerContainerPool
|
||||
container_id = JSON.parse(Faraday.get(config[:location] + "/docker_container_pool/get_container/" + execution_environment.id.to_s).body)['id']
|
||||
Docker::Container.get(container_id) unless container_id.blank?
|
||||
rescue StandardError => e
|
||||
Raven.extra_context({container_id: container_id.inspect, execution_environment: execution_environment.inspect, config: config.inspect})
|
||||
Raven.capture_exception(e)
|
||||
Sentry.set_extras({container_id: container_id.inspect, execution_environment: execution_environment.inspect, config: config.inspect})
|
||||
Sentry.capture_exception(e)
|
||||
nil
|
||||
end
|
||||
else
|
||||
@ -53,15 +53,15 @@ class DockerContainerPool
|
||||
response = JSON.parse(Faraday.get(config[:location] + "/docker_container_pool/quantities").body)
|
||||
response.transform_keys(&:to_i)
|
||||
rescue StandardError => e
|
||||
Raven.extra_context({response: response.inspect})
|
||||
Raven.capture_exception(e)
|
||||
Sentry.set_extras({response: response.inspect})
|
||||
Sentry.capture_exception(e)
|
||||
[]
|
||||
end
|
||||
|
||||
def self.dump_info
|
||||
JSON.parse(Faraday.get(config[:location] + "/docker_container_pool/dump_info").body)
|
||||
rescue StandardError => e
|
||||
Raven.capture_exception(e)
|
||||
Sentry.capture_exception(e)
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
@ -34,7 +34,7 @@ class PyLintAdapter < TestingFrameworkAdapter
|
||||
end || []
|
||||
end
|
||||
rescue Timeout::Error
|
||||
Raven.capture_message({stdout: output[:stdout], regex: ASSERTION_ERROR_REGEXP}.to_json)
|
||||
Sentry.capture_message({stdout: output[:stdout], regex: ASSERTION_ERROR_REGEXP}.to_json)
|
||||
assertion_error_matches = []
|
||||
end
|
||||
concatenated_errors = assertion_error_matches.map { |result| "#{result[:name]}: #{result[:result]}" }.flatten
|
||||
@ -62,7 +62,7 @@ class PyLintAdapter < TestingFrameworkAdapter
|
||||
captures = message[:result].match(Regexp.new(regex))&.named_captures&.symbolize_keys
|
||||
|
||||
if captures.nil?
|
||||
Raven.capture_message({regex: regex, message: message[:result]}.to_json)
|
||||
Sentry.capture_message({regex: regex, message: message[:result]}.to_json)
|
||||
replacement = {}
|
||||
else
|
||||
replacement = captures.each do |key, value|
|
||||
@ -85,8 +85,8 @@ class PyLintAdapter < TestingFrameworkAdapter
|
||||
assessment
|
||||
rescue StandardError => e
|
||||
# A key was not defined or something really bad happened
|
||||
Raven.extra_context(assessment)
|
||||
Raven.capture_exception(e)
|
||||
Sentry.set_extras(assessment)
|
||||
Sentry.capture_exception(e)
|
||||
assessment
|
||||
end
|
||||
|
||||
@ -104,7 +104,7 @@ class PyLintAdapter < TestingFrameworkAdapter
|
||||
# Read config key
|
||||
I18n.t(keys.append('log_missing').join('.'), default: false)
|
||||
end
|
||||
Raven.capture_message({key: key, default: default}.to_json) if translation == default && log_missing
|
||||
Sentry.capture_message({key: key, default: default}.to_json) if translation == default && log_missing
|
||||
translation
|
||||
end
|
||||
end
|
||||
|
@ -28,7 +28,7 @@ class PyUnitAdapter < TestingFrameworkAdapter
|
||||
}.flatten || []
|
||||
end
|
||||
rescue Timeout::Error
|
||||
Raven.capture_message({stderr: output[:stderr], regex: ASSERTION_ERROR_REGEXP}.to_json)
|
||||
Sentry.capture_message({stderr: output[:stderr], regex: ASSERTION_ERROR_REGEXP}.to_json)
|
||||
assertion_error_matches = []
|
||||
end
|
||||
{count: count, failed: failed + errors, error_messages: assertion_error_matches}
|
||||
|
Reference in New Issue
Block a user