Improve fast-forward merge service reliability
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.
-
I have evaluated the MR acceptance checklist for this MR.