diff options
Diffstat (limited to 'lib/bulk_imports/common')
-rw-r--r-- | lib/bulk_imports/common/pipelines/entity_finisher.rb | 5 | ||||
-rw-r--r-- | lib/bulk_imports/common/pipelines/wiki_pipeline.rb | 5 | ||||
-rw-r--r-- | lib/bulk_imports/common/rest/get_badges_query.rb | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/lib/bulk_imports/common/pipelines/entity_finisher.rb b/lib/bulk_imports/common/pipelines/entity_finisher.rb index 915dcf1b455..5066f622d57 100644 --- a/lib/bulk_imports/common/pipelines/entity_finisher.rb +++ b/lib/bulk_imports/common/pipelines/entity_finisher.rb @@ -24,11 +24,12 @@ module BulkImports end logger.info( - bulk_import_id: context.bulk_import.id, + bulk_import_id: context.bulk_import_id, bulk_import_entity_id: context.entity.id, bulk_import_entity_type: context.entity.source_type, pipeline_class: self.class.name, - message: "Entity #{entity.status_name}" + message: "Entity #{entity.status_name}", + importer: 'gitlab_migration' ) context.portable.try(:after_import) diff --git a/lib/bulk_imports/common/pipelines/wiki_pipeline.rb b/lib/bulk_imports/common/pipelines/wiki_pipeline.rb index 0f92c1f1210..fea550b9f9d 100644 --- a/lib/bulk_imports/common/pipelines/wiki_pipeline.rb +++ b/lib/bulk_imports/common/pipelines/wiki_pipeline.rb @@ -44,6 +44,11 @@ module BulkImports wikis = client.get(context.entity.wikis_url_path).parsed_response wikis.any? + rescue BulkImports::NetworkError => e + # 403 is returned when wiki is disabled in settings + return if e.response&.forbidden? || e.response&.not_found? + + raise end def client diff --git a/lib/bulk_imports/common/rest/get_badges_query.rb b/lib/bulk_imports/common/rest/get_badges_query.rb index 60b2ebcc552..6e7cb7504ba 100644 --- a/lib/bulk_imports/common/rest/get_badges_query.rb +++ b/lib/bulk_imports/common/rest/get_badges_query.rb @@ -7,11 +7,8 @@ module BulkImports extend self def to_h(context) - resource = context.entity.pluralized_name - encoded_full_path = ERB::Util.url_encode(context.entity.source_full_path) - { - resource: [resource, encoded_full_path, 'badges'].join('/'), + resource: [context.entity.base_resource_path, 'badges'].join('/'), query: { page: context.tracker.next_page } |