Skip to content

Fetch failures for import details page from API endpoint

What does this MR do and why?

This feature is currently behind a feature flag.

Now that the API private endpoint /import/github/failures is ready, we can fetch real data from the backend using axios. This MR adds this functionality along with some minor adjustments to the code to match the backend params.

Screenshots or screen recordings

Import_details_page_with_API

How to set up and validate locally

  1. Go to http://127.0.0.1:3000/import/github/details?project_id=29 (use any project id that was imported). The page should render 404 Not Found.
  2. Enable the feature flag and refresh the page:
Feature.enable :import_details_page
  1. Fake some failures in rails console:
p = Project.find(29)
f = p.import_failures.new
f.external_identifiers = {
  object_type: 'pull_request',
  title: 'A new pull request',
  iid: 18741
}
f.exception_message = 'Something went wrong!'
f.save

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

Edited by Justin Ho Tuan Duong

Merge request reports