MergeRequests::MergeService does not handle errors that occur after merge
As described in https://gitlab.com/gitlab-org/gitlab-ce/issues/23505#note_24909714, MergeRequests::MergeService does not handle errors that can occur in MergeRequests::MergeService#after_merge (after a merge commit is created).
Things to consider:
- log and rescue errors occurring after merge
- do not retry
MergeWorkerbecause the task is not transactional - do not perform a merge if the merge request has
merge_commit_shaset - reorder operations in
MergeRequests::PostMergeServiceso that changing status to "merged" executes before operations that may result in HTTP calls to external services (MergeRequests::PostMergeService#close_issues)