Commit 916eca93 authored by Toon Claes's avatar Toon Claes

Merge branch...

Merge branch '250269-disable-batch-count-because-pipelines-that-have-security-jobs-counters-fail-on-gitlab-com' into 'master'

Disable batch counting for "pipelines that have security jobs" metrics

See merge request gitlab-org/gitlab!42556
parents b6d6708d ae204cdb
......@@ -338,7 +338,6 @@ module EE
# rubocop:disable CodeReuse/ActiveRecord
# rubocop: disable UsageData/LargeTable
# rubocop: disable UsageData/DistinctCountByLargeForeignKey
def count_secure_jobs(time_period)
start = ::Security::Scan.minimum(:build_id)
finish = ::Security::Scan.maximum(:build_id)
......@@ -365,13 +364,12 @@ module EE
.where(status: 'success', retried: [nil, false])
.where('security_scans.scan_type = ?', scan_type)
.where(time_period)
pipelines_with_secure_jobs["#{name}_pipeline".to_sym] = distinct_count(relation, :commit_id, start: start, finish: finish)
pipelines_with_secure_jobs["#{name}_pipeline".to_sym] = distinct_count(relation, :commit_id, start: start, finish: finish, batch: false)
end
pipelines_with_secure_jobs
end
# rubocop: enable UsageData/LargeTable
# rubocop: enable UsageData/DistinctCountByLargeForeignKey
def approval_merge_request_rule_minimum_id
strong_memoize(:approval_merge_request_rule_minimum_id) do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment