diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-08-29 16:47:31 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-08-31 10:56:34 +0200 |
commit | 8d87c44ec88bbee1be99f7a69bbdeab8312b9de7 (patch) | |
tree | 6484e73cee26cd6056c6a505fd08fe16d3744657 | |
parent | 4d042afeced540c0acd887714d8ec7c962b7c507 (diff) | |
download | gitlab-ce-block-concurrent-pipeline-processings.tar.gz |
Block concurrent pipeline processingsblock-concurrent-pipeline-processings
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | app/services/ci/process_pipeline_service.rb | 14 |
2 files changed, 11 insertions, 6 deletions
diff --git a/CHANGELOG b/CHANGELOG index 4e963702b8e..21cb44b1fdf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -53,6 +53,9 @@ v 8.12.0 (unreleased) v 8.11.4 (unreleased) - 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 + - Block concurrent updates for Pipeline + +v 8.11.4 (unreleased) - Fix resolving conflicts on forks - Fix diff commenting on merge requests created prior to 8.10 diff --git a/app/services/ci/process_pipeline_service.rb b/app/services/ci/process_pipeline_service.rb index f049ed628db..de48a50774e 100644 --- a/app/services/ci/process_pipeline_service.rb +++ b/app/services/ci/process_pipeline_service.rb @@ -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 |