Commit 24c5f56a authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents b6534a59 82e7eda0
......@@ -528,7 +528,9 @@ module Integrations
yield
rescue StandardError => error
@error = error
log_error("Error sending message", client_url: client_url, error: @error.message)
payload = { client_url: client_url }
Gitlab::ExceptionLogFormatter.format!(error, payload)
log_error("Error sending message", payload)
nil
end
......
......@@ -14,13 +14,13 @@ module Ci
sync_coverage_rules
success
rescue StandardError => error
log_error(
payload = {
pipeline: pipeline&.to_param,
error: error.class.name,
message: error.message,
source: "#{__FILE__}:#{__LINE__}",
backtrace: error.backtrace
)
source: "#{__FILE__}:#{__LINE__}"
}
Gitlab::ExceptionLogFormatter.format!(error, payload)
log_error(payload)
error("Failed to update approval rules")
ensure
[:project_rule_vulnerabilities_allowed, :project_rule_scanners, :project_rule_severity_levels, :project_vulnerability_report, :reports].each do |memoization|
......
......@@ -129,6 +129,13 @@ RSpec.describe Ci::SyncReportsToApprovalRulesService, '#execute' do
allow_next_instance_of(Gitlab::Ci::Reports::LicenseScanning::Report) do |instance|
allow(instance).to receive(:violates?).and_raise('heck')
end
expect(Gitlab::AppLogger).to receive(:error).with(
hash_including(pipeline: anything,
'exception.class' => anything,
'exception.message' => anything,
'exception.backtrace' => anything,
source: anything)).and_call_original
end
specify { expect(subject[:status]).to be(:error) }
......
......@@ -2,7 +2,7 @@
module QA
RSpec.describe 'Create' do
context 'Gitaly automatic failover and recovery', :orchestrated, :gitaly_cluster, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/238953', type: :flaky } do
context 'Gitaly automatic failover and recovery', :orchestrated, :gitaly_cluster do
# Variables shared between contexts. They're used and shared between
# contexts so they can't be `let` variables.
praefect_manager = Service::PraefectManager.new
......
......@@ -3,7 +3,7 @@
module QA
RSpec.describe 'Create' do
context 'Gitaly' do
describe 'Backend node recovery', :orchestrated, :gitaly_cluster, :skip_live_env, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/322647', type: :flaky } do
describe 'Backend node recovery', :orchestrated, :gitaly_cluster, :skip_live_env do
let(:praefect_manager) { Service::PraefectManager.new }
let(:project) do
Resource::Project.fabricate! do |project|
......
......@@ -972,7 +972,9 @@ RSpec.describe Integrations::Jira do
expect(jira_integration).to receive(:log_error).with(
'Error sending message',
client_url: 'http://jira.example.com',
error: error_message
'exception.class' => anything,
'exception.message' => error_message,
'exception.backtrace' => anything
)
expect(jira_integration.test(nil)).to eq(success: false, result: error_message)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment