Skip to content

Fetch bulk_import failures from backend and properly format table

What does this MR do and why?

This change is behind the feature flag bulk_import_details_page from issue #429109 (closed).

Previous MR !135004 (merged) added the feature flag and app boilerplate code.

  • Refactor import_details_table to work with both import / bulk_import by passing fields as a prop.
  • Update fetch to use bulk_import API for failures when on bulk_import details page.

Screenshots or screen recordings

Bulk_import_details_with_API

How to set up and validate locally

1. Start an import

  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. Start a few imports with any group and let them run.
  6. Find at least 1 import that has import failures (has the "Details" button next to it on the History page). You can also create a dummy failure running this in rails console:
entity = BulkImports::Entity.last
entity.failures.create!(pipeline_class: "test", exception_class: "test", exception_message: "test", source_url: "...", source_title: "...")

2. Go to the bulk_import details page

Go to http://127.0.0.1:3000/import/bulk_imports/details?id=144&entity_id=68 replacing the id and entity_id with bulk_import_id and id from the /api/v4/bulk_imports/entities endpoint: Screenshot_2023-11-06_at_16.30.45

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

Edited by Justin Ho Tuan Duong

Merge request reports