Commit d87cca17 authored by Robert Speicher's avatar Robert Speicher

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
parents 1ba5988a fd4efde5
...@@ -57,13 +57,11 @@ v 8.12.0 (unreleased) ...@@ -57,13 +57,11 @@ v 8.12.0 (unreleased)
v 8.11.4 (unreleased) v 8.11.4 (unreleased)
- Fix broken gitlab:backup:restore because of bad permissions on repo storage !6098 (Dirk Hörner) - Fix broken gitlab:backup:restore because of bad permissions on repo storage !6098 (Dirk Hörner)
- Creating an issue through our API now emails label subscribers !5720 - Creating an issue through our API now emails label subscribers !5720
- Block concurrent updates for Pipeline
- Fix resolving conflicts on forks - Fix resolving conflicts on forks
- Fix diff commenting on merge requests created prior to 8.10 - Fix diff commenting on merge requests created prior to 8.10
v 8.11.4 (unreleased)
- Fix issue boards leak private label names and descriptions - Fix issue boards leak private label names and descriptions
v 8.11.3 (unreleased)
v 8.11.3 v 8.11.3
- Do not enforce using hash with hidden key in CI configuration. !6079 - Do not enforce using hash with hidden key in CI configuration. !6079
- Allow system info page to handle case where info is unavailable - Allow system info page to handle case where info is unavailable
......
...@@ -10,6 +10,7 @@ module Ci ...@@ -10,6 +10,7 @@ module Ci
create_builds! create_builds!
end end
@pipeline.with_lock do
new_builds = new_builds =
stage_indexes_of_created_builds.map do |index| stage_indexes_of_created_builds.map do |index|
process_stage(index) process_stage(index)
...@@ -18,6 +19,7 @@ module Ci ...@@ -18,6 +19,7 @@ module Ci
# Return a flag if a when builds got enqueued # Return a flag if a when builds got enqueued
new_builds.flatten.any? new_builds.flatten.any?
end end
end
private 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