Skip to content

Fix error in MR widget after /merge slash command

Jarka Kadlecova requested to merge jarka/gitlab-ce:28176_merge_widget_fix into master

What does this MR do?

It fixes an error that sometimes occurs when a user merges an MR using /merge slash command. This error was caused due to the fact that MRs are merged asynchronously and when MR widget is reloaded the MR could still be waiting for being picked up by a worker. MR waiting for a worker doesn't have any special state and that's why the error occurs.

With this fix the merge_widget_refresh action will end in 2 possible states - merge_when_build_succeeds for a case a build is running or success which refreshes the widget. This action should never be called unless all merge request checks for merging are ok. And even if it was called the possible error would still be caught by the js code of the widget.

Why was this MR needed?

Found bug confirmed on gitlab.com

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Fixes #28176 (closed)

Merge request reports