Skip to content

Add link to filtered history page on bulk import status page

What does this MR do and why?

  • Add import_history_link to status page for imports that have an id attribute (usually any import that has been started and persisted in the backend).
  • Update bulk import history page to use a different API endpoint when bulk_import_id is provided as a filter. This fetches only the entities for the said bulk_import.
  • Fix a bug where loadHistoryItems was called twice when pagination had non-default values.

Changelog: changed

Screenshots or screen recordings

Before After
Bulk_import_status_without_history_link Bulk_import_status_with_history_link

Bulk_import_history_link

How to set up and validate locally

  1. In the header bar, click on + icon (Create new...) > New group.
  2. Select Import group.
  3. Fill in the GDK URL as GitLab source instance URL and a Person Access Token. Then click Connect instance.
  4. You should be on the Import groups from GitLab page.
  5. Apply the following diff to make some import items fail intentionally:
diff --git a/lib/bulk_imports/ndjson_pipeline.rb b/lib/bulk_imports/ndjson_pipeline.rb
index 07118c3b55c0..5988e998afd2 100644
--- a/lib/bulk_imports/ndjson_pipeline.rb
+++ b/lib/bulk_imports/ndjson_pipeline.rb
@@ -35,6 +35,8 @@ def transform(context, data)
       end
 
       def load(_context, object)
+        raise StandardError.new('Error!')
+
         return unless object
 
         if object.new_record?
  1. Start a few imports with any group and let them run.
  2. You will now see a link to View details which links to the bulk import history page with bulk_import_id param set to that import.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #429233 (closed)

Edited by Justin Ho Tuan Duong

Merge request reports