Skip to content

Resolve duplicate key value violates on GitHubImport

What does this MR do and why?

While importing a project from GitHub, and simultaneously creating a new issue via the UI, there is a chance of conflicting IIDs which results in:

  • import failure
  • error while create new issues

Error described in #229614 (closed)

We are introducing IID allocation logic to prevent unique constraint violation and possible import failure.

How to set up and validate locally

  1. Checkout the current branch
  2. Click on New project/repository button
  3. Select Import project from and select GitHub
  4. Select a project with some issues
  5. Visit the Issues page and create a new issue
  6. Validate that the newly created issue has a higher ID than the last imported issue
  7. Validate that all issues are successfully imported

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

Edited by Bojan Marjanovic

Merge request reports