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/process_pipeline_service.rb')
-rw-r--r--app/services/ci/process_pipeline_service.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/app/services/ci/process_pipeline_service.rb b/app/services/ci/process_pipeline_service.rb
index e511e26adfe..678b386fbbf 100644
--- a/app/services/ci/process_pipeline_service.rb
+++ b/app/services/ci/process_pipeline_service.rb
@@ -38,10 +38,15 @@ module Ci
# mark builds that are retried
if latest_statuses.any?
- pipeline.latest_statuses
- .where(name: latest_statuses.map(&:second))
- .where.not(id: latest_statuses.map(&:first))
- .update_all(retried: true)
+ updated_count = pipeline.latest_statuses
+ .where(name: latest_statuses.map(&:second))
+ .where.not(id: latest_statuses.map(&:first))
+ .update_all(retried: true)
+
+ # This counter is temporary. It will be used to check whether if we still use this method or not
+ # after setting correct value of `GenericCommitStatus#retried`.
+ # More info: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50465#note_491657115
+ metrics.legacy_update_jobs_counter.increment if updated_count > 0
end
end
# rubocop: enable CodeReuse/ActiveRecord