Commit 05e8f195 authored by Shinya Maeda's avatar Shinya Maeda

Merge branch '330133-remove-web-hooks-rate-limit-ff' into 'master'

Remove web_hooks_rate_limit feature flag

See merge request gitlab-org/gitlab!64708
parents aad0dbee 9bd9d414
......@@ -176,7 +176,6 @@ class WebHookService
end
def rate_limited?
return false unless Feature.enabled?(:web_hooks_rate_limit, default_enabled: :yaml)
return false if rate_limit.nil?
Gitlab::ApplicationRateLimiter.throttled?(
......
---
name: web_hooks_rate_limit
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61151
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/330133
milestone: '13.12'
type: development
group: group::ecosystem
default_enabled: false
......@@ -115,10 +115,7 @@ Limit the maximum daily member invitations allowed per group hierarchy.
### Webhook rate limit
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61151) in GitLab 13.12.
> - [Deployed behind a feature flag](../user/feature_flags.md), disabled by default.
> - Disabled on GitLab.com.
> - Not recommended for production use.
> - To use in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-rate-limiting-for-webhooks). **(FREE SELF)**
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/330133) in GitLab 14.1.
Limit the number of times any given webhook can be called per minute.
This only applies to project and group webhooks.
......@@ -136,25 +133,6 @@ Set the limit to `0` to disable it.
- **Default rate limit**: Disabled.
#### Enable or disable rate limiting for webhooks **(FREE SELF)**
Rate limiting for webhooks is under development and not ready for production use. It is
deployed behind a feature flag that is **disabled by default**.
[GitLab administrators with access to the GitLab Rails console](../administration/feature_flags.md)
can enable it.
To enable it:
```ruby
Feature.enable(:web_hooks_rate_limit)
```
To disable it:
```ruby
Feature.disable(:web_hooks_rate_limit)
```
## Gitaly concurrency limit
Clone traffic can put a large strain on your Gitaly service. To prevent such workloads from overwhelming your Gitaly server, you can set concurrency limits in Gitaly's configuration file.
......
......@@ -19,20 +19,6 @@ RSpec.describe WebHookService do
service_instance.async_execute
end
context 'when the rate-limiting feature flag is disabled' do
before do
stub_feature_flags(web_hooks_rate_limit: false)
end
it 'does not include the subscription plan in the worker context' do
expect(WebHookWorker).to receive(:perform_async) do
expect(Gitlab::ApplicationContext.current).not_to include('meta.subscription_plan')
end
service_instance.async_execute
end
end
end
end
end
......@@ -418,19 +418,6 @@ RSpec.describe WebHookService do
described_class.new(other_hook, data, :push_hooks).async_execute
end
end
context 'when the feature flag is disabled' do
before do
stub_feature_flags(web_hooks_rate_limit: false)
end
it 'queues a worker without tracking the call' do
expect(Gitlab::ApplicationRateLimiter).not_to receive(:throttled?)
expect_to_perform_worker(project_hook)
service_instance.async_execute
end
end
end
context 'when hook has custom context attributes' 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