MergeWhenBuildSuccedsService quietly merged something and changed MR to "Closed" without any system notes
This happened in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4859.
- Master clicked the "Merge When Build Succeeds" button.
- The MR was actually merged 17 minutes later (6/23/2016 4:47 pm UTC time).
- No system notes on the MR were created.
- No user event note (e.g. Yorick merged XXX) was created either.
- However, the relevant issue (gitlab-ce#18924) was also closed.
What's supposed to happen?
-
MergeWhenBuildSucceedsService#triggergets called by the commit status API when the build succeeds. - This kicks off
MergeWorkerto runMergeServiceasynchronously. -
MergeService#commitcreates the merge commit. -
MergeService#after_mergegoes and closes the issues and creates the relevant system notes.
I double checked to see if this was an issue with notes being redacted, but I see no evidence of this.
I'm not sure how step 4 could close issues yet cause the MR to be put in the "Closed" state. It's possible the steps failed somewhere midway through the process, and we never saw the error message.
I think better logging may be necessary here to track this problem down.
Edited by 🤖 GitLab Bot 🤖