Enable linear version of `groups_including_descendants_by`

In this commit we're removing the ff
`linear_group_including_descendants_by` and enabling the
linear version of `Group.groups_including_descendants_by`.

Changelog: changed
parent c836dd98
......@@ -852,15 +852,7 @@ class Group < Namespace
end
def self.groups_including_descendants_by(group_ids)
groups = Group.where(id: group_ids)
if Feature.enabled?(:linear_group_including_descendants_by, default_enabled: :yaml)
groups.self_and_descendants
else
Gitlab::ObjectHierarchy
.new(groups)
.base_and_descendants
end
Group.where(id: group_ids).self_and_descendants
end
def disable_shared_runners!
......
---
name: linear_group_including_descendants_by
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68835
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/339431
milestone: '14.3'
type: development
group: group::access
default_enabled: false
......@@ -2317,14 +2317,6 @@ RSpec.describe Group do
end
it_behaves_like 'returns the expected groups for a group and its descendants'
context 'when :linear_group_including_descendants_by feature flag is disabled' do
before do
stub_feature_flags(linear_group_including_descendants_by: false)
end
it_behaves_like 'returns the expected groups for a group and its descendants'
end
end
describe '.preset_root_ancestor_for' do
......
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