Commit in MR not included in merge commit

Because I’m on a GitLab Free plan, I’m not sure where to report this issue. I am not looking for support, but it seems like a serious problem that I would like to make the right people aware of.

In short, I recently realized that a change included in a merge request had not actually been included in the merge commit when the branch was merged, presumably due to a race condition.

In the activity log of the issue, there is first a message that a commit was added to the MR, followed by the message that the branch was merged, so by all indications the commit should have been included, however weeks later I noticed that some changes were missing from the main branch and found that the merge commit only contained the first commit from the MR, not the second.

I can only assume this is due to a race condition between successfully pushing to the MR branch and the branch being merged, but it’s clearly a major violation of the expected contract of a Git management system.

Expected behavior: if a commit is added to a branch under MR prior to it being merged, the commit should be included in the merge commit created on the target branch. If merging has already begun, the commit should not be accepted into the MR.

Actual behavior: it is possible for a commit to be accepted, and then the MR merged, but without the commit being included in the merge commit on the target branch.

My main question is where I should actually report this issue? Again, as I am on a free plan, I am not asking for support, but surely this would be considered a serious issue by the maintainers of GitLab, so I would like to make sure they know about it.

(This occurred in a private repo; if someone from GitLab reaches out I’m happy to grant access to show the problem)

Probably best would be to open an issue here: Issues · GitLab.org / GitLab · GitLab and provide the details to the problem that occurred. I would guess the devs would fix it if it was deemed a problem with Gitlab rather than perhaps a user-error. That would be the best place to report it.

Hi,

Please note that the following should be the workflow:
Commit > Push > Merge

If you forgot to push your branch, the commit will of course not be included in MR.
If you pushed your branch slightly after the Merge, commit again won’t be included.

In any case, you must make sure you pushed all your changes before you hit Merge. Otherwise, commit won’t be included.

To make sure you (or someone else from the team) don’t merge before you’re finished, mark your MR as Draft - it will prevent merging, until you mark it as not draft.

1 Like

Thanks for the info @iwalker, I’ll open an issue there (it seemed to be recommend to start with the forum).

@paula.kokic in this case, I can confirm that the commit was pushed and appeared in the activity log of the MR before the MR was merged.