Commit 2db7afa3 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'remove-ancestor-flag' into 'master'

Remove preset_group_root feature flag

Closes #33638

See merge request gitlab-org/gitlab!22165
parents 7eb94603 7a811e8a
---
title: Remove N+1 query issue when checking group root ancestor.
merge_request:
author:
type: performance
......@@ -129,7 +129,7 @@ module EE
# preset root_ancestor for all of them to avoid an additional SQL query
# done for each group permission check:
# https://gitlab.com/gitlab-org/gitlab/issues/11539
preset_root_ancestor_for(groups) if same_root && ::Feature.enabled?(:preset_group_root)
preset_root_ancestor_for(groups) if same_root
DeclarativePolicy.user_scope do
groups.select { |group| Ability.allowed?(user, :read_epic, group) }
......
......@@ -233,22 +233,6 @@ describe Group do
end
end
context 'with `preset_group_root` feature flag disabled' do
before do
stub_feature_flags(preset_group_root: false)
end
it_behaves_like 'group root ancestor' do
let(:params) { {} }
let(:extra_query_count) { 6 }
end
end
context 'with `preset_group_root` feature flag enabled' do
before do
stub_feature_flags(preset_group_root: true)
end
context 'when same_root is false' do
let(:params) { { same_root: false } }
......@@ -276,7 +260,6 @@ describe Group do
end
end
end
end
describe '#vulnerable_projects' do
it "fetches the group's projects that have vulnerabilities" 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