• Stan Hu's avatar
    Fix error when duplicate users are merged in approvers list · 6e4a4465
    Stan Hu authored
    If an user who belongs to an approval group and also is an individual in
    the approval rule, `MergeService` will fail in the `after_merge`, which
    will cause `MergeWorker` to retry again. Since the merge has been
    successfully merged, `MergeWorker` will encounter an error since
    `MergeService` is not idempotent.
    
    This change fixes the issue by using the Array |= join method to add an
    element to the Array, unless it is already present. This fixes the
    immediate bug, but we will have to address the idempotency issues later.
    
    Closes https://gitlab.com/gitlab-org/gitlab/issues/13488
    6e4a4465
sh-fix-dupe-approvals-failing.yml 112 Bytes