Commit fcd37268 authored by andysoiron's avatar andysoiron

Remove sub_group_webhooks feature falg

The feature flag was introduced because there
was no limit for the number of webhooks in a group.
This raised a concern that enabling group hooks to
be triggered from a subgroup could result in a large
number of requests per action.

With https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25129
we introduced a limit for webhooks on a group
and the feature flag is not needed anymore
parent fb46b18b
......@@ -756,8 +756,6 @@ module EE
private
def group_hooks
return group.hooks unless ::Feature.enabled?(:sub_group_webhooks, self)
GroupHook.where(group_id: group.self_and_ancestors)
end
......
---
title: Activate triggering webhooks from a subgroup feature
merge_request: 26070
author:
type: added
......@@ -631,14 +631,6 @@ describe Project do
it_behaves_like 'returns nil when the feature is not available'
it { is_expected.to eq(true) }
context 'when sub_group_webhooks feature flag is disabled' do
before do
stub_feature_flags(sub_group_webhooks: false)
end
it { is_expected.to eq(false) }
end
end
end
end
......@@ -677,32 +669,12 @@ describe Project do
it_behaves_like 'triggering group webhook'
context 'when sub_group_webhooks feature flag is disabled' do
before do
stub_feature_flags(sub_group_webhooks: false)
end
it_behaves_like 'triggering group webhook'
end
context 'in sub group' do
let(:sub_group) { create :group, parent: group }
let(:sub_sub_group) { create :group, parent: sub_group }
let(:project) { create(:project, namespace: sub_sub_group) }
it_behaves_like 'triggering group webhook'
context 'when sub_group_webhooks feature flag is disabled' do
before do
stub_feature_flags(sub_group_webhooks: false)
end
it 'does not execute the hook' do
expect(WebHookService).not_to receive(:new).with(group_hook, { some: 'info' }, 'push_hooks')
project.execute_hooks(some: 'info')
end
end
end
end
end
......
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