Pressing "Merge When Build succeeds" at the same exact time that a build is failing will merge the failed build
See title.
Happened on gitlab-com/www-gitlab-com!2132 (merged)
related: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4414
Designs
- Show closed items
Link issues together to show that they're related or that one is blocking others.
Learn more.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Contributor
Yeah, that sucks.
/cc @zj
- Grzegorz Bizon Added ~19173 label
Added ~19173 label
- Contributor
The offending lines:
if params[:merge_when_build_succeeds].present? && @merge_request.ci_commit && @merge_request.ci_commit.active? MergeRequests::MergeWhenBuildSucceedsService.new(@project, current_user, merge_params) .execute(@merge_request) @status = :merge_when_build_succeeds else MergeWorker.perform_async(@merge_request.id, current_user.id, params) @status = :success end
You set the param, but
ci_commit.active?
is now false.. This is a nice race condition indeed..Edited by Zeger-Jan van de Weg - Zeger-Jan van de Weg mentioned in merge request !4443 (merged)
mentioned in merge request !4443 (merged)
- Contributor
Is this a regression?
- Robert Speicher Reassigned to @zj
Reassigned to @zj
- Contributor
@connorshea What makes you say that?
- Contributor
@zj I'm just wondering if this is a new problem or not.
- Contributor
I don't think so, git blaming those lines just shows this issue has been there since these lines were merged?
Edited by Zeger-Jan van de Weg - Robert Speicher Status changed to closed by merge request !4443 (merged)
Status changed to closed by merge request !4443 (merged)
- Robert Speicher mentioned in commit nulldoxyz/gitlab-ce@2cfbf3e8
mentioned in commit nulldoxyz/gitlab-ce@2cfbf3e8
- Robert Speicher Mentioned in commit jmcgeheeiv/gitlab-ce@2cfbf3e8
Mentioned in commit jmcgeheeiv/gitlab-ce@2cfbf3e8
Please register or sign in to reply