diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
commit | 419c53ec62de6e97a517abd5fdd4cbde3a942a34 (patch) | |
tree | 1f43a548b46bca8a5fb8fe0c31cef1883d49c5b6 /lib/gitlab/import | |
parent | 1da20d9135b3ad9e75e65b028bffc921aaf8deb7 (diff) |
Add latest changes from gitlab-org/gitlab@16-5-stable-eev16.5.0-rc42
Diffstat (limited to 'lib/gitlab/import')
-rw-r--r-- | lib/gitlab/import/import_failure_service.rb | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/gitlab/import/import_failure_service.rb b/lib/gitlab/import/import_failure_service.rb index 714d9b3edd9..a8ccf24b780 100644 --- a/lib/gitlab/import/import_failure_service.rb +++ b/lib/gitlab/import/import_failure_service.rb @@ -9,7 +9,8 @@ module Gitlab project_id: nil, error_source: nil, fail_import: false, - metrics: false + metrics: false, + external_identifiers: {} ) new( exception: exception, @@ -17,7 +18,8 @@ module Gitlab project_id: project_id, error_source: error_source, fail_import: fail_import, - metrics: metrics + metrics: metrics, + external_identifiers: external_identifiers ).execute end @@ -27,7 +29,8 @@ module Gitlab project_id: nil, error_source: nil, fail_import: false, - metrics: false + metrics: false, + external_identifiers: {} ) if import_state.blank? && project_id.blank? @@ -46,6 +49,7 @@ module Gitlab @error_source = error_source @fail_import = fail_import @metrics = metrics + @external_identifiers = external_identifiers end def execute @@ -58,19 +62,20 @@ module Gitlab private - attr_reader :exception, :import_state, :project, :error_source, :fail_import, :metrics + attr_reader :exception, :import_state, :project, :error_source, :fail_import, :metrics, :external_identifiers def track_exception attributes = { import_type: project.import_type, project_id: project.id, - source: error_source + source: error_source, + external_identifiers: external_identifiers } Gitlab::Import::Logger.error( attributes.merge( message: 'importer failed', - 'error.message': exception.message + 'exception.message': exception.message ) ) @@ -85,7 +90,8 @@ module Gitlab exception_class: exception.class.to_s, exception_message: exception.message.truncate(255), correlation_id_value: Labkit::Correlation::CorrelationId.current_or_new_id, - retry_count: fail_import ? 0 : nil + retry_count: fail_import ? 0 : nil, + external_identifiers: external_identifiers ) end |