Skip to content

Resolve duplicate key value violates on BitbucketImport

What does this MR do and why?

While importing a project from BitBucket, 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 introduced a new way of importing issues using a bulk insert. With the new approach, we are handling N+1 queries and reducing a chance of conflicting IIDs.

How to set up and validate locally

  1. Checkout the current branch
  2. Click on New project/repository button
  3. Integrate your GitLab server with Bitbucket Cloud
  4. Select Import project from and select BitBucket Cloud
  5. Select a project with some issues
  6. Visit the Issues page and create a new 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

Loading