Commit a8e24c60 authored by Aleksei Lipniagov's avatar Aleksei Lipniagov

Create :correlation_id for `import_failures`

parent 2a267e8c
...@@ -94,7 +94,7 @@ module Gitlab ...@@ -94,7 +94,7 @@ module Gitlab
relation_index: relation_index, relation_index: relation_index,
exception_class: exception.class.to_s, exception_class: exception.class.to_s,
exception_message: exception.message.truncate(255), 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 end
......
...@@ -643,7 +643,9 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do ...@@ -643,7 +643,9 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
before do before do
setup_import_export_config('with_invalid_records') 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 end
context 'when failures occur because a relation fails to be processed' do 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