Direct Transfer - Show pending placeholder assignment notice
What does this MR do and why?
Show pending placeholder assignment notice
This MR adds a notice to the bulk import history page to notify users that the root namespaces associated with the import have pending placeholder user assignments.
Related issue: #467369 (closed)
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
Before | After |
---|---|
How to set up and validate locally
Initial setup
-
Enable the
:importer_user_mapping
and:bulk_import_importer_user_mapping
feature flags.ApplicationSetting.first.update( allow_local_requests_from_web_hooks_and_services: true, bulk_import_enabled: true )
-
Enable direct transfer and local import.
-
Create two new ultimate groups:
placeholder-alert-ultimate
andplaceholder-alert-ultimate-two
. The group's membership URLs will behttp://gdk.test:3000/groups/placeholder-alert-ultimate/-/group_members
andhttp://gdk.test:3000/groups/placeholder-alert-ultimate-two/-/group_members
.
Importing to a single top-level group
- Import a group and its projects into your new group. I used
flightjs
. - Visit the import history page. The alert should link to the top level group.
Importing to both top-level groups
- Trigger a multi-group import via the API:
curl --request POST \
--url "http://gdk.test:3000/api/v4/bulk_imports" \
--header "content-type: application/json" \
--header "PRIVATE-TOKEN: $GITLAB_DEV_TOKEN" \
--data "{
\"configuration\": {
\"url\": \"http://gdk.test:3000\",
\"access_token\": \"$GITLAB_DEV_TOKEN\"
},
\"entities\": [
{
\"source_full_path\": \"flightjs\",
\"source_type\": \"group_entity\",
\"destination_slug\": \"multi-flight-1\",
\"destination_namespace\": \"placeholder-alert-ultimate\",
\"migrate_projects\": true
},
{
\"source_full_path\": \"flightjs\",
\"source_type\": \"group_entity\",
\"destination_slug\": \"multi-flight-2\",
\"destination_namespace\": \"placeholder-alert-ultimate-two\",
\"migrate_projects\": true
}
]
}"
- View the import history page. The alert should link to the top level group.
Status check
- Visit the assignment tab of the second group: http://gdk.test:3000/groups/placeholder-alert-ultimate-two/-/group_members
- Mark all placeholders as "don't reassign".
- Refresh the history page and the second group should now be absent from the list.