Skip to content

Improve fast-forward merge service reliability

Stan Hu requested to merge sh-refactor-ff-merge-service into master

What does this MR do and why?

Previously a fast-forward merge would update a merge requests squash_commit_sha within FfMergeService#try_merge. If a database statement timeout occurred, the merge request would erroneously catch this error and mark the merge request as failed to merge, even though the Gitaly RPC successfully went through.

We solved a similar issue with MergeService in !96806 (merged) by moving the database update outside of #try_merge.

We also refactor FfMergeService so it reuses most of MergeService. Now the main difference is a service-specific #execute_git_merge method is used.

Relates to #372376 (closed)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports