Store entities that were not imported with errors in DB

What does this MR do and why?

It implements Store entities that were not imported with errors in DB.

Screenshots or screen recordings

store-github-identifiers-in-db

Database

The new failures_by_correlation_id scope is added to the ImportFailure class.

Raw SQL:

SELECT
    "import_failures".*
FROM
    "import_failures"
WHERE
    "import_failures"."correlation_id_value" = 'be025cf83013ac4f52ffd2bf712b11a2'
ORDER BY
    "import_failures"."created_at" DESC

How to set up and validate locally

  1. Import a GitHub project. Import has to finish with the Partial status (e.g. raise an exception inside any of github importer)
  2. Ensure the last error stored in the import_failures table that is related to one not imported entity contains entity details in the external_identifiers column (check project.import_failures relation in the console)

MR acceptance checklist

Edited by Tetiana Zavediuk

Merge request reports

Loading