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
62533dd1
Commit
62533dd1
authored
Dec 02, 2021
by
Francisco Javier López
Committed by
Vitali Tatarintev
Dec 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use linear version GroupsWithTemplatesFinder#extended_group_search
parent
f2c6c39a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
33 deletions
+2
-33
config/feature_flags/development/linear_groups_template_finder_extended_group_search.yml
...t/linear_groups_template_finder_extended_group_search.yml
+0
-8
ee/app/finders/groups_with_templates_finder.rb
ee/app/finders/groups_with_templates_finder.rb
+2
-8
ee/spec/finders/groups_with_templates_finder_spec.rb
ee/spec/finders/groups_with_templates_finder_spec.rb
+0
-17
No files found.
config/feature_flags/development/linear_groups_template_finder_extended_group_search.yml
deleted
100644 → 0
View file @
f2c6c39a
---
name
:
linear_groups_template_finder_extended_group_search
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68936
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/339439
milestone
:
'
14.3'
type
:
development
group
:
group::access
default_enabled
:
false
ee/app/finders/groups_with_templates_finder.rb
View file @
62533dd1
...
@@ -18,6 +18,7 @@ class GroupsWithTemplatesFinder
...
@@ -18,6 +18,7 @@ class GroupsWithTemplatesFinder
attr_reader
:group_id
attr_reader
:group_id
def
extended_group_search
def
extended_group_search
# We're adding an extra query that will be removed once we remove the feature flag in https://gitlab.com/gitlab-org/gitlab/-/issues/339439
groups
=
if
Feature
.
enabled?
(
:linear_groups_template_finder_extended_group_search_ancestors_scopes
,
current_group
,
default_enabled: :yaml
)
groups
=
if
Feature
.
enabled?
(
:linear_groups_template_finder_extended_group_search_ancestors_scopes
,
current_group
,
default_enabled: :yaml
)
Group
.
with_project_templates
.
self_and_ancestors
Group
.
with_project_templates
.
self_and_ancestors
else
else
...
@@ -26,14 +27,7 @@ class GroupsWithTemplatesFinder
...
@@ -26,14 +27,7 @@ class GroupsWithTemplatesFinder
.
base_and_ancestors
.
base_and_ancestors
end
end
groups_with_plan
=
groups
.
with_feature_available_in_plan
(
:group_project_templates
)
groups
.
with_feature_available_in_plan
(
:group_project_templates
).
self_and_descendants
# We're adding an extra query that will be removed once we remove the feature flag in https://gitlab.com/gitlab-org/gitlab/-/issues/339439
if
::
Feature
.
enabled?
(
:linear_groups_template_finder_extended_group_search
,
current_group
,
default_enabled: :yaml
)
groups_with_plan
.
self_and_descendants
else
Gitlab
::
ObjectHierarchy
.
new
(
groups_with_plan
).
base_and_descendants
end
end
end
def
simple_group_search
(
groups
)
def
simple_group_search
(
groups
)
...
...
ee/spec/finders/groups_with_templates_finder_spec.rb
View file @
62533dd1
...
@@ -99,14 +99,6 @@ RSpec.describe GroupsWithTemplatesFinder, :saas do
...
@@ -99,14 +99,6 @@ RSpec.describe GroupsWithTemplatesFinder, :saas do
it_behaves_like
'group template finder examples'
it_behaves_like
'group template finder examples'
context
'when feature flag :linear_groups_template_finder_extended_group_search is disabled'
do
before
do
stub_feature_flags
(
linear_groups_template_finder_extended_group_search:
false
)
end
it_behaves_like
'group template finder examples'
end
context
'when feature flag :linear_groups_template_finder_extended_group_search_ancestors_scopes is disabled'
do
context
'when feature flag :linear_groups_template_finder_extended_group_search_ancestors_scopes is disabled'
do
before
do
before
do
stub_feature_flags
(
linear_groups_template_finder_extended_group_search_ancestors_scopes:
false
)
stub_feature_flags
(
linear_groups_template_finder_extended_group_search_ancestors_scopes:
false
)
...
@@ -114,13 +106,4 @@ RSpec.describe GroupsWithTemplatesFinder, :saas do
...
@@ -114,13 +106,4 @@ RSpec.describe GroupsWithTemplatesFinder, :saas do
it_behaves_like
'group template finder examples'
it_behaves_like
'group template finder examples'
end
end
context
'when all linear feature flags are disabled'
do
before
do
stub_feature_flags
(
linear_groups_template_finder_extended_group_search:
false
)
stub_feature_flags
(
linear_groups_template_finder_extended_group_search_ancestors_scopes:
false
)
end
it_behaves_like
'group template finder examples'
end
end
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