Commit 7d0bb1e3 authored by Mikołaj Wawrzyniak's avatar Mikołaj Wawrzyniak

Merge branch '299521-roll-out-preset_root_ancestor_for_labels-feature-flag' into 'master'

Roll out preset_root_ancestor_for_labels feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!53356
parents be05bfda c9aeafbf
......@@ -102,7 +102,7 @@ class LabelsFinder < UnionFinder
# Because we are sure that all groups are in the same hierarchy tree
# we can preset root group for all of them to optimize permission checks
Group.preset_root_ancestor_for(groups) if Feature.enabled?(:preset_root_ancestor_for_labels, group)
Group.preset_root_ancestor_for(groups)
groups_user_can_read_labels(groups).map(&:id)
end
......
---
title: Optimized loading of descendant group labels
merge_request: 53356
author:
type: performance
---
name: preset_root_ancestor_for_labels
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/52236
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/299521
milestone: '13.9'
type: development
group: group::plan
default_enabled: false
......@@ -21,20 +21,6 @@ RSpec.describe 'view audit events' do
expect { send_request }.not_to exceed_all_query_limit(control)
end
context 'when preset_root_ancestor_for_labels flag is disabled' do
before do
stub_feature_flags(preset_root_ancestor_for_labels: false)
end
it 'does additional N+1 DB queries', :request_store do
control = ActiveRecord::QueryRecorder.new(skip_cached: false) { send_request }
create_list(:group, 3, parent: group)
expect { send_request }.to exceed_all_query_limit(control)
end
end
def send_request
get group_labels_path(group, include_descendant_groups: true, format: :json)
end
......
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