Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Label and reviewer pickers send a write per click, and GitLab Free silently keeps the old reviewer #30509

ClosedTonybynMp4(GitHub profile, opens in a new tab) opened this issue 1 comment

Area

Pull requests (label and reviewer pickers, web and mobile)

Steps to reproduce

  1. Open a GitLab merge request on a Free plan project. I used !5 on TonybynMp4/git-ansible.
  2. Open the Labels picker and click three labels in a row.
  3. Ask one person for a review, then pick a second person.

Expected behavior

Picking is instant. The picker sends what changed once, when it closes, the way GitHub's own sidebar does. On a host that keeps one reviewer, picking someone replaces the current reviewer.

Actual behavior

Each click is its own write. On GitLab that is a permission read, a label lookup and a PUT, about 2.2 s, and the items stay disabled until it returns. Three labels take three round trips and three refetch bursts.

On GitLab Free the second reviewer never lands. The adapter writes back the whole reviewer_ids list with the new id appended, and GitLab keeps only the first entry without an error. The write itself succeeds, so the picker shows its "Review requested from ..." toast for someone who was never added.

$ glab api graphql -f query='{ project(fullPath: "TonybynMp4/git-ansible") { mergeRequest(iid: "5") { allowsMultipleReviewers } } }' | jq -c .data
{"project":{"mergeRequest":{"allowsMultipleReviewers":false}}}
$ echo '{"reviewer_ids":[33309834,33276967]}' | glab api -X PUT "projects/TonybynMp4%2Fgit-ansible/merge_requests/5" --input - -H "Content-Type: application/json" | jq -c '[.reviewers[].username]'
["16g"]

Impact

Labelling a merge request is slow enough that people go back to the host. On GitLab Free, swapping a reviewer looks like it worked and didn't.

Version or commit

c2adfe0b88 (#30483)

Environment

Linux, web dev build, gitlab.com through glab.

Workaround

Change reviewers on GitLab. For labels, wait for each click to finish.

  1. tanstack-source added labelsbug

  2. The pickers now send picks once, when they close: one add and one remove, diffed against the host's latest state (#37733). Shipped in 15271c8d008.

    Not covered: on GitLab Free, adding a second reviewer while one is already requested still reports success and does nothing (allowsMultipleReviewers is false and GitLab keeps only the first reviewer_ids entry). Swapping one reviewer for another in a single picker session works, because removals are sent first.

  3. juliusmarminge closed this

Sign in to join this conversation.