Commit 529becdf authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '330514-feature-flag-remove-limit_epic_groups_query' into 'master'

[Feature flag] Remove limit_epic_groups_query [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!61372
parents c76a5ecb d76a6bb7
---
name: limit_epic_groups_query
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59360
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/327624
milestone: '13.12'
type: development
group: group::product planning
default_enabled: false
...@@ -102,10 +102,8 @@ class EpicsFinder < IssuableFinder ...@@ -102,10 +102,8 @@ class EpicsFinder < IssuableFinder
# all epics in all subgroups # all epics in all subgroups
next groups if can_read_all_epics_in_related_groups?(groups, include_confidential: false) next groups if can_read_all_epics_in_related_groups?(groups, include_confidential: false)
if Feature.enabled?(:limit_epic_groups_query, group)
next groups.public_to_user unless current_user next groups.public_to_user unless current_user
next groups.public_to_user(current_user) unless groups.user_is_member(current_user).exists? next groups.public_to_user(current_user) unless groups.user_is_member(current_user).exists?
end
# when traversal ids are enabled, we could avoid N+1 issue # when traversal ids are enabled, we could avoid N+1 issue
# by taking all public groups plus groups where user is member # by taking all public groups plus groups where user is member
......
---
title: Optimize number of SQL queries when listing epics.
merge_request: 61372
author:
type: performance
...@@ -570,16 +570,6 @@ RSpec.describe EpicsFinder do ...@@ -570,16 +570,6 @@ RSpec.describe EpicsFinder do
end end
it_behaves_like 'avoids N+1 queries' it_behaves_like 'avoids N+1 queries'
context 'when limit_epic_groups_query is disabled' do
before do
stub_feature_flags(limit_epic_groups_query: false)
end
it 'returns only public epics' do
expect(execute).to match_array([base_epic2, public_epic1, internal_epic])
end
end
end end
context 'when skip_visibility_check is true' do context 'when skip_visibility_check is true' 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