Skip to content

Direct Transfer - Show pending placeholder assignment notice

James Nutt requested to merge jnutt/placeholder-alert into master

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
CleanShot_2024-08-30_at_11.37.39_2x CleanShot_2024-08-30_at_12.19.37_2x
CleanShot_2024-08-30_at_12.17.45_2x

How to set up and validate locally

Initial setup

  1. 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
    )
  2. Enable direct transfer and local import.

  3. Create two new ultimate groups: placeholder-alert-ultimate and placeholder-alert-ultimate-two. The group's membership URLs will be http://gdk.test:3000/groups/placeholder-alert-ultimate/-/group_members and http://gdk.test:3000/groups/placeholder-alert-ultimate-two/-/group_members.

Importing to a single top-level group

  1. Import a group and its projects into your new group. I used flightjs.
  2. Visit the import history page. The alert should link to the top level group.

Importing to both top-level groups

  1. 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
      }
    ]
  }"
  1. View the import history page. The alert should link to the top level group.

Status check

  1. Visit the assignment tab of the second group: http://gdk.test:3000/groups/placeholder-alert-ultimate-two/-/group_members
  2. Mark all placeholders as "don't reassign".
  3. Refresh the history page and the second group should now be absent from the list.
Edited by James Nutt

Merge request reports

Loading