Skip to content

Import notes from Bitbucket

Madelein van Niekerk requested to merge 412614-import-notes into master

What does this MR do and why?

Makes the BitBucket Cloud importer parallel instead of running sequentially in order to fix migration timeouts. This follows the same framework as the GitHub importer and the BitBucket Server importer.

The work is split into the following MRs:

The feature is behind bitbucket_parallel_importer feature flag so that it is safe to continue releasing bits without affecting the importer. The feature flag is controlled in lib/gitlab/import_sources.rb.

Important notes

  • This MR imports MR and issue notes
  • Issue and MR refs are converted in lib/gitlab/bitbucket_import/importer.rb

How to set up and validate locally

  1. Follow https://docs.gitlab.com/ee/integration/bitbucket.html to setup OAuth for BitBucket Cloud. You will need an account on https://bitbucket.org/. Make sure you add the bitbucket configuration in the development section of your config/gitlab.yml as shown at https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/gitlab-oauth2.md#set-up-gdk
  2. Create a project and repo on BitBucket. Create a few issues and MRs with notes.
  3. Enable the feature flag: Feature.enable(:bitbucket_parallel_importer)
  4. On your gdk server, create a new project > click on Import project > Bitbucket Cloud > follow instructions to connect to https://bitbucket.org/.
  5. Import the project created in step 2.
  6. Verify that the notes were imported correctly on both MRs and issues.
  7. You can also view the importer logs to see when each step was executed or if there are errors: tail -f log/importer.log
Bitbucket Gitlab
MR notes with issue and MR refs Screenshot_2023-09-19_at_12.09.28 Screenshot_2023-09-19_at_12.09.18
Issue note with MR ref Screenshot_2023-09-18_at_14.49.02 Screenshot_2023-09-18_at_14.48.08

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

Edited by Madelein van Niekerk

Merge request reports