Skip to content

Fix "Invalid state of snippets after Project import"

What does this MR do?

Previously, during a project import, we call SnippetsRepoRestorer to create the snippet repositories. Nevertheless, if any of them failed, we stopped the process and avoid processing the rest of the snippets. This leaved those snippets non migrated in the database.

In this MR we implement the following:

  • Even if one of the snippets failed to create the repository we still process the rest.
  • If the import fails we clean all non migrated snippets related to the project.

Refs #219752 (closed)

Does this MR meet the acceptance criteria?

Conformity

Edited by 🤖 GitLab Bot 🤖

Merge request reports