Skip to content

Fix unexpected exception by failure of finding an actual head pipeline

Shinya Maeda requested to merge fix-udpate-head-pipeline-method into master

What does this MR do?

As https://gitlab.com/gitlab-org/gitlab-ce/issues/56113 indicates, sometimes MergeRequest#find_actual_head_pipeline returns nil as failed to find an actual pipeline. This could happen by a race condition that a pipeline corresponding to the diff_head_sha has not been created yet. In this case, we should not raise an exception, nor change the head pipeline to nil. We simply update head pipeline only if a new pipeline is found.

What are the relevant issue numbers?

Close https://gitlab.com/gitlab-org/gitlab-ce/issues/56113

Does this MR meet the acceptance criteria?

Edited by Shinya Maeda

Merge request reports