Commit 67b34ed1 authored by Dylan Griffith's avatar Dylan Griffith

Remove unused method InstanceSecurityDashboard#all_pipelines

This method is doing a cross-join between `ci_*` and non `ci_*` tables
which will not be possible when we move `ci_*` tables to a separate
database (see https://gitlab.com/groups/gitlab-org/-/epics/6289 ).

Based on a `git grep all_pipelines` and also
`git grep InstanceSecurityDashboard` I cannot seem to find any uses of
this method. In fact we also removed `Namespace#all_pipelines` a while
back too because it was unused
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62266 .

It appears this method was added in
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23232 but also
trying to search for usages of `all_pipelines` there I still cannot find
anything as it appears it may have just been replacing another method
that was unused.
parent cec62d8b
......@@ -10,10 +10,6 @@ class InstanceSecurityDashboard
@user = user
end
def all_pipelines
::Ci::Pipeline.where(project_id: users_projects_with_security_reports)
end
def project_ids_with_security_reports
users_projects_with_security_reports.pluck(:project_id)
end
......
......@@ -21,12 +21,6 @@ RSpec.describe InstanceSecurityDashboard do
subject { described_class.new(user, project_ids: project_ids) }
describe '#all_pipelines' do
it 'returns pipelines for the projects with security reports' do
expect(subject.all_pipelines).to contain_exactly(pipeline1)
end
end
describe '#project_ids_with_security_reports' do
context 'when given project IDs' do
it "returns the project IDs that are also on the user's security dashboard" 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