Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,763
    • Issues 44,763
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,329
    • Merge requests 1,329
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #299415
Closed
Open
Issue created Jan 21, 2021 by George Koltsov@georgekoltsovMaintainer

Import group members during group migration

From #298745 (closed)

Problem to solve

In order to associate imported group epics (and any other group relation) with their original authors we need to import group members into the group first.

Proposed solution

Create a new pipeline that runs prior to any other relation pipeline in order to map users between instances and create group members for found users. If user is not found - do nothing (user creation is out of scope of this issue).

A GraphQL query can look something like this:

query groupMembers($full_path: ID!, $cursor: String) {
  group(fullPath: $full_path) {
    groupMembers(relations: DIRECT, first: 100, after: $cursor) {
      page_info: pageInfo {
        end_cursor: endCursor
        has_next_page: hasNextPage
      }
      nodes {
        created_at: createdAt
        updated_at: updatedAt
        expires_at: expiresAt
        access_level: accessLevel {
          integer_value: integerValue
        }
        user {
          public_email: publicEmail
        }
      }
    }
  }
}
  1. Create new pipeline to import group members (e.g. GroupMemberPipeline) with the query above
  2. Fetch direct group members using GraphQL with the query above
  3. For fetched user, if publicEmail is present, find by primary/secondary email such user. If it's found - create groupMember with this user. If not - do nothing.
  4. If publicEmail is not present - do nothing.
Edited Feb 01, 2021 by Kassio Borges
Assignee
Assign to
Time tracking