Commit 18d2c779 authored by Etienne Baqué's avatar Etienne Baqué

Merge branch 'revert_263442_remove_recursive_approach_for_all_projects_feature_flag' into 'master'

Reintroduce recursive_approach_for_all_projects default-enabled

See merge request gitlab-org/gitlab!64632
parents 2b35733e 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?
......
---
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
......@@ -1083,6 +1083,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)
......
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