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/retry_build_service.rb')
-rw-r--r--app/services/ci/retry_build_service.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/services/ci/retry_build_service.rb b/app/services/ci/retry_build_service.rb
index 23507a31c72..60b3d28b0c5 100644
--- a/app/services/ci/retry_build_service.rb
+++ b/app/services/ci/retry_build_service.rb
@@ -34,10 +34,6 @@ module Ci
attributes[:user] = current_user
- # TODO: we can probably remove this logic
- # see: https://gitlab.com/gitlab-org/gitlab/-/issues/217930
- attributes[:scheduling_type] ||= build.find_legacy_scheduling_type
-
Ci::Build.transaction do
# mark all other builds of that name as retried
build.pipeline.builds.latest
@@ -59,7 +55,9 @@ module Ci
build = project.builds.new(attributes)
build.assign_attributes(::Gitlab::Ci::Pipeline::Seed::Build.environment_attributes_for(build))
build.retried = false
- build.save!
+ BulkInsertableAssociations.with_bulk_insert(enabled: ::Gitlab::Ci::Features.bulk_insert_on_create?(project)) do
+ build.save!
+ end
build
end
end