Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c9aeafbf
Commit
c9aeafbf
authored
Feb 04, 2021
by
Jan Provaznik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove preset_root_ancestor_for_labels flag
This flag was tested in production w/o issues.
parent
4b76d7e0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
23 deletions
+6
-23
app/finders/labels_finder.rb
app/finders/labels_finder.rb
+1
-1
changelogs/unreleased/preset_ancestor.yml
changelogs/unreleased/preset_ancestor.yml
+5
-0
config/feature_flags/development/preset_root_ancestor_for_labels.yml
...ure_flags/development/preset_root_ancestor_for_labels.yml
+0
-8
ee/spec/requests/groups/labels_spec.rb
ee/spec/requests/groups/labels_spec.rb
+0
-14
No files found.
app/finders/labels_finder.rb
View file @
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
...
...
changelogs/unreleased/preset_ancestor.yml
0 → 100644
View file @
c9aeafbf
---
title
:
Optimized loading of descendant group labels
merge_request
:
53356
author
:
type
:
performance
config/feature_flags/development/preset_root_ancestor_for_labels.yml
deleted
100644 → 0
View file @
4b76d7e0
---
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
ee/spec/requests/groups/labels_spec.rb
View file @
c9aeafbf
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment