Added API call to Bitbucket Cloud workspace members to cache later
What does this MR do and why?
Summary of Changes:
:bitbucket_cloud_convert_mentions_to_users
New Feature Flag: A new feature flag, :bitbucket_cloud_convert_mentions_to_users
was added to mitigate risks in our importers, and a new issue for its rollout was added #442484
Added a new stage worker and importer to cache users
Similar to the Bitbucket Server importer, a ImportUsersWorker
and UsersImporter
were added to call the Bitbucket Cloud API to get all members of a workspace.
client.rb
Updated Bitbucket Cloud's A call to the new endpoint was added to lib/bitbucket/client.rb
, but the new endpoint doesn't support sorting on created_on
, so other endpoints needed to be updated. Bitbucket's paginator also needed to be updated to handle paginated API calls with logging between the calls to each page.
spec/support/shared_examples/lib/gitlab/bitbucket_import/stage_methods_shared_examples.rb
Spec changes to Some spec changes to DRY up Bitbucket Cloud import specs
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
No UI changes yet. Changes will be visible once actual mapping of user Bitbucket account IDs to their names is implemented.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Create/find a Bitbucket Cloud repository to import
-
Set up your local environment for Bitbucket Cloud imports. In a development environment, make sure the OAuth provider is added in the
development
section. - Import the Bitbucket Cloud repository with the new FF enabled and disabled.
There should be no visble changes or errors.
Related to #436307