[go: up one dir, main page]

Skip to content

Merge atomically in group merge request

When changes to multiple projects are dependent on one another, if merging one of them fails all the projects will break. When using group merge requests https://gitlab.com/gitlab-org/gitlab-ee/issues/3427 this should be prevented by merging atomically.

GitLab should implement a locking system to achieve an atomic merge across multiple projects.

Proposal

When merging in a group merge request:

  • lock the target branch of each project to prevent contention
  • create the merge commit for each project, verifying that the commit can be created
  • add the commit to the target branch
  • unlock the target branch

If any merge fails, all merges should fail without contaminating the target branch of any project.

Links / references

Edited by James Ramsay (ex-GitLab)