Commit 8b583725 authored by Alper Akgun's avatar Alper Akgun

Harden security ci build job queries

By adding pre-calculated start and finish values
parent c41adb48
---
title: Harden security ci build job queries
merge_request: 33966
author:
type: performance
......@@ -363,7 +363,10 @@ module EE
}
SECURE_PRODUCT_TYPES.each do |secure_type, attribs|
results["#{prefix}#{attribs[:name]}".to_sym] = distinct_count(::Ci::Build.where(name: secure_type).where(time_period), :user_id)
results["#{prefix}#{attribs[:name]}".to_sym] = distinct_count(::Ci::Build.where(name: secure_type).where(time_period),
:user_id,
start: user_minimum_id,
finish: user_maximum_id)
end
# handle license rename https://gitlab.com/gitlab-org/gitlab/issues/8911
......
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