summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-08-31 15:56:48 +0000
committerRuben Davila <rdavila84@gmail.com>2016-08-31 11:52:02 -0500
commita4ab9759ea614d9807ccf3476ca958f72b4db3c1 (patch)
treeb3267f371bcdbb6e9df2e7488a5ed4cbd96779d9
parent77f99c5be4d1802cba705d6cbba4e7cdd8a7f386 (diff)
downloadgitlab-ce-a4ab9759ea614d9807ccf3476ca958f72b4db3c1.tar.gz
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
-rw-r--r--CHANGELOG5
-rw-r--r--app/services/ci/process_pipeline_service.rb14
2 files changed, 13 insertions, 6 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 1779d52c3d9..2d1999315c1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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
diff --git a/app/services/ci/process_pipeline_service.rb b/app/services/ci/process_pipeline_service.rb
index 6f7610d42ba..e38709853cd 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