Import Bitbucket issues
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:
- Import repository and wiki and mark the import as complete (feature flagged)
- Import pull requests: Import Bitbucket pull requests (!131134 - merged)
-
Import issues
👈 this MR - Import notes (comments) for issues and MRs: Import notes from Bitbucket (!131149 - merged)
- Refactoring MR(s) for reusing shared code between BitBucket Cloud and BitBucket Server
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
- The assignee of an issue is the same as the author of the issue since Bitbucket does not have assignees.
- If a milestone exists with the same name as the milestone on Bitbucket, it's used, otherwise a new milestone is created.
How to set up and validate locally
- 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 to add the bitbucket configuration in the
development
section of yourconfig/gitlab.yml
as shown at https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/gitlab-oauth2.md#set-up-gdk - Create a project and repo on BitBucket. Create a few issues.
- Enable the feature flag:
Feature.enable(:bitbucket_parallel_importer)
- On your gdk server, create a new project > click on
Import project
>Bitbucket Cloud
> follow instructions to connect to https://bitbucket.org/. - Import the project created in step 2.
- Verify that the issues were imported correctly.
- You can also view the importer logs to see when each step was executed or if there are errors:
tail -f log/importer.log
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 #412614 (closed)
Edited by Madelein van Niekerk