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
61da1a8f
Commit
61da1a8f
authored
Jun 30, 2021
by
Drew Blessing
Committed by
Etienne Baqué
Jun 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reintroduce recursive_approach_for_all_projects default-enabled
parent
33e16cec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
app/models/namespace.rb
app/models/namespace.rb
+6
-3
config/feature_flags/development/recursive_approach_for_all_projects.yml
...flags/development/recursive_approach_for_all_projects.yml
+8
-0
spec/models/namespace_spec.rb
spec/models/namespace_spec.rb
+8
-0
No files found.
app/models/namespace.rb
View file @
61da1a8f
...
...
@@ -279,9 +279,12 @@ class Namespace < ApplicationRecord
# Includes projects from this namespace and projects from all subgroups
# that belongs to this namespace
def
all_projects
namespace
=
user?
?
self
:
self_and_descendant_ids
Project
.
where
(
namespace:
namespace
)
if
Feature
.
enabled?
(
:recursive_approach_for_all_projects
,
default_enabled: :yaml
)
namespace
=
user?
?
self
:
self_and_descendants
Project
.
where
(
namespace:
namespace
)
else
Project
.
inside_path
(
full_path
)
end
end
def
has_parent?
...
...
config/feature_flags/development/recursive_approach_for_all_projects.yml
0 → 100644
View file @
61da1a8f
---
name
:
recursive_approach_for_all_projects
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64632
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/334817
milestone
:
'
14.1'
type
:
development
group
:
group::fulfillment
default_enabled
:
true
spec/models/namespace_spec.rb
View file @
61da1a8f
...
...
@@ -1053,6 +1053,14 @@ RSpec.describe Namespace do
end
describe
'#all_projects'
do
context
'when recursive approach is disabled'
do
before
do
stub_feature_flags
(
recursive_approach_for_all_projects:
false
)
end
include_examples
'#all_projects'
end
context
'with use_traversal_ids feature flag enabled'
do
before
do
stub_feature_flags
(
use_traversal_ids:
true
)
...
...
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