[go: up one dir, main page]

Skip to content

Race condition between auto merge and suggestion being applied leads to merging before suggestion commit is merged

Summary

In certain cases, a MR with auto-merge enabled can be merged before all the required changes are merged.

Steps to reproduce

  • MR with auto merge enabled
  • All approvers have approved
  • CI is passing
  • One thread is open with a suggestion

When I apply the suggestion, a new commit is created for the MR, however the MR gets merged (due to the thread being resolved) before the new commit is added to the MR.

Example Project

What is the current bug behavior?

This results to an unintended merge of code which was not clean enough to go in.

What is the expected correct behavior?

Applied suggestion adds a new commit (triggering pipeline, reviewing, etc) before the thread is resolved.

Results of GitLab environment info

GitLab Enterprise Edition v18.1.6-ee

Possible fixes

Applied suggestion adds a new commit (triggering pipeline, reviewing, etc) before the thread is resolved.

Fix was discussed and agreed upon in #571737 (comment 2789359059).

High-severity bug remediation

Notes

Moved from gitlab-com/marketing/digital-experience/about-gitlab-com#881 (comment 2769508067)

Edited by 🤖 GitLab Bot 🤖