When pipeline is "pending", "Merge" button does un-CI'd merge, can result in landing broken code
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
When you create a merge reqeust, normally, you see a blue button "Merge when pipeline succeeds". The button "Merge" only appears when the pipeline has passed. This is great, and prevents accidental merging of broken code.
However:
Recently, I accidentally merged a faulty MR by pressing a "Merge" button which appeared very briefrly during the fresh MR page load. (My hindbrain is conditioned to press "Merge" very readily.) IIRC the button changed to "Merge when pipeline succeeds" just after I pressed it, but then gitlab merged actually merged the MR, while the pipeline was still running. The pipeline later failed.
Now, I see a similar behaavuiour on an instance (salsa.debian.org, currently runnng gitlab CE 17.0.5) which is undergoing maintenace to its CI/CD system. My MR (https://salsa.debian.org/dgit-team/dgit/-/merge_requests/19) is showing as "Pipeline #.... pending" (it is remaining in this state because of the maintenance), and there is a "Merge" button.
IMO the MR page should show only "Merge when pipeline succeeds". "Merge" should only appear if either (i) the pipeline has pased, or (ii) there is no pipeline - not even one that's pending, or going to be created, or any similar intermediate state.