Merge When Pipeline succeeds merges **before** starting pipeline

Summary

When we create an MR using push options and set it to auto-merge when pipeline succeeds from the initial push, the MR merges immediately before the pipeline even started.

We are re-using branch names for some automatic strategy not sure if that is related

Steps to reproduce

Not sure if it happens every time but atleast happens too often to ignore.

Example Project

Sorry don't have it.

What is the current bug behavior?

MR gets merged nearly instantaneously.

What is the expected correct behavior?

MR waits for pipeline creation and that pipeline to have succeeded without errors.

Relevant logs and/or screenshots

Running gitlab v18.9.3-ee no further details as we're hosted by Gitlab Host cannot access a shell there.

Edited by 🤖 GitLab Bot 🤖