Add link to filtered history page on bulk import status page
requested to merge 429233-update-direct-transfer-history-page-to-be-able-to-filter-by-migration-id into master
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 |
---|---|
How to set up and validate locally
- In the header bar, click on + icon (Create new...) > New group.
- Select Import group.
- Fill in the GDK URL as GitLab source instance URL and a Person Access Token. Then click Connect instance.
- You should be on the Import groups from GitLab page.
- 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?
- Start a few imports with any group and let them run.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #429233 (closed)
Edited by Justin Ho Tuan Duong