Commit a4ab9759 authored by Robert Speicher's avatar Robert Speicher Committed by Ruben Davila

Merge branch 'block-concurrent-pipeline-processings' into 'master'

Block concurrent pipeline processings

## What does this MR do?

It's possible that two builds that succeed at the same will try to
concurrently process pipeline. This can lead to scenario when it will
fail to trigger next stages.

This MR makes sure that process of updating is blocking.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/21263

See merge request !6090
parent 77f99c5b
......@@ -9,6 +9,11 @@ v 8.11.4
- Do not enforce using hash with hidden key in CI configuration. !6079
- Fix hover leading space bug in pipeline graph !5980
- Do not enforce using hash with hidden key in CI configuration. !6079
- Creating an issue through our API now emails label subscribers !5720
- Block concurrent updates for Pipeline
- Fix resolving conflicts on forks
- Fix diff commenting on merge requests created prior to 8.10
- Fix issue boards leak private label names and descriptions
v 8.11.3
- Don't show resolve conflicts link before MR status is updated
......
......@@ -10,13 +10,15 @@ module Ci
create_builds!
end
new_builds =
stage_indexes_of_created_builds.map do |index|
process_stage(index)
end
@pipeline.with_lock do
new_builds =
stage_indexes_of_created_builds.map do |index|
process_stage(index)
end
# Return a flag if a when builds got enqueued
new_builds.flatten.any?
# Return a flag if a when builds got enqueued
new_builds.flatten.any?
end
end
private
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment