Set head pipeline not being update correctly
We did merge https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11669.
Which introduces a race condition between CreatePipelineService#update_merge_requests_head_pipeline
and MergeRequests::RefreshService
.
RefreshService is executed async, and update happens concurrently and we often are unable to find sha, because we use diff_head_sha
which uses merge_requests_diff
which is generated by RefreshService
.
@DouweM proposes to use source_branch_sha
.