Skip to content

Add "Partially completed" import state for group imports

What does this MR do and why?

  • Update backend realtime_changes.json endpoint to include has_failures attribute.
  • Pass this attribute from API request to frontend via GraphQL.
  • Use group import_status for status page which includes "Partially completed" state when hasFailures is true.

Changelog: changed

Screenshots or screen recordings

Before After
Bulk_import_status_before Bulk_import_status_after

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.

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 #394727 (closed)

Merge request reports

Loading