Resolve duplicate key value violates on GitHubImport
requested to merge pg-uniqueviolation-error-duplicate-key-value-violates-unique-constraint into master
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
- Checkout the current branch
- Click on
New project/repository
button - Select
Import project from
and selectGitHub
- Select a project with some issues
- Visit the
Issues
page and create a new issue - Validate that the newly created issue has a higher
ID
than the last imported issue - 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #229614 (closed)
Edited by Bojan Marjanovic