Add application admin setting to enable/disable GL Migration
Release notes
As migrating groups by directed transfer gets expanded by migrating projects Beta, released this milestone, we added an application admin setting bulk_import_enabled
to allow admins of Self-Managed instances to enable/disable migrating groups and projects with this method, similar to other importers. This application admin setting needs to be enabled on both instances for the migration to work. Remember that to also migrate projects with the groups, you must enable the bulk_import_projects
feature flag as well.
We are in the process of releasing migrating projects with GL Migration to open beta, see epic.
We should add an application admin setting to allow admins of self-managed instances to enable/disable GitLab Migration in admin settings, similar to other importers (proposed here and in Make sure that Gitlab Migration could be disabl... (#340801 - closed)).
Having consistent importers experience will be beneficial for our users.
We plan to also present an option for user in UI, if they want to include projects in particular group migration or not - Enable user to not include projects when migrat... (#383332 - closed).
Proposed solution
-
add checkbox with text "Migrating GitLab groups and projects by direct transfer enabled" in admin settings under Import sources, similar to Project export enabled checkbox:
-
GL Migration should be disabled by default on SM -
documentation update -
-
new section at https://docs.gitlab.com/ee/user/group/import/ describing how to turn it on or off
-
-
-
alternatively mention the toggle as a pre-requisite similar to: https://docs.gitlab.com/ee/user/project/import/bitbucket_server.html#import-your-bitbucket-repositories.
-
-
migrating both from UI and via API with GL Migration disabled when toggle is off -
in UI: TBD, see below -
if the toggle is off and user tries to migrate via API they should get a informative feedback -
the admin toggle needs to be turned on on both instances. There should be error message shown to the user when they click on "Connect instance" and that instance doesn't have the application setting turned on. Error message: "Importing groups by direct transfer is currently disabled on the source instance. Please enable it on the instance you are migrating from in the Admin settings or ask your Administrator to do it".
Technical details
- Db migration to add new setting in
applications_settings
- Update controllers & API to respect the new setting