Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/ci/create_web_ide_terminal_service.rb')
-rw-r--r--app/services/ci/create_web_ide_terminal_service.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/services/ci/create_web_ide_terminal_service.rb b/app/services/ci/create_web_ide_terminal_service.rb
index 3b89a599180..db8f61c81fa 100644
--- a/app/services/ci/create_web_ide_terminal_service.rb
+++ b/app/services/ci/create_web_ide_terminal_service.rb
@@ -28,6 +28,11 @@ module Ci
def create_pipeline!
build_pipeline.tap do |pipeline|
pipeline.stages << terminal_stage_seed(pipeline).to_resource
+
+ # Project iid must be called outside a transaction, so we ensure it is set here
+ # otherwise it may be set within the save! which it will lock the InternalId row for the whole transaction
+ pipeline.ensure_project_iid!
+
pipeline.save!
Ci::ProcessPipelineService