Commit 425acb89 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch '39084-create-correlation-id-for-import-failures' into 'master'

Create :correlation_id for `import_failures`

See merge request gitlab-org/gitlab!21395
parents d46862fa a8e24c60
......@@ -94,7 +94,7 @@ module Gitlab
relation_index: relation_index,
exception_class: exception.class.to_s,
exception_message: exception.message.truncate(255),
correlation_id_value: Labkit::Correlation::CorrelationId.current_id
correlation_id_value: Labkit::Correlation::CorrelationId.current_or_new_id
)
end
......
......@@ -649,7 +649,9 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
before do
setup_import_export_config('with_invalid_records')
Labkit::Correlation::CorrelationId.use_id(correlation_id) { subject }
# Import is running from the rake task, `correlation_id` is not assigned
expect(Labkit::Correlation::CorrelationId).to receive(:new_id).and_return(correlation_id)
subject
end
context 'when failures occur because a relation fails to be processed' do
......
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