Commit 9bd9d414 authored by Markus Koller's avatar Markus Koller

Remove web_hooks_rate_limit feature flag

This still doesn't take effect until a rate limiting threshold is
defined in `plan_limits`, which has been done now for Free users on
gitlab.com.

Changelog: changed
parent 8ee19b92
...@@ -176,7 +176,6 @@ class WebHookService ...@@ -176,7 +176,6 @@ class WebHookService
end end
def rate_limited? def rate_limited?
return false unless Feature.enabled?(:web_hooks_rate_limit, default_enabled: :yaml)
return false if rate_limit.nil? return false if rate_limit.nil?
Gitlab::ApplicationRateLimiter.throttled?( 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. ...@@ -115,10 +115,7 @@ Limit the maximum daily member invitations allowed per group hierarchy.
### Webhook rate limit ### Webhook rate limit
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/61151) in GitLab 13.12. > - [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. > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/330133) in GitLab 14.1.
> - 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)**
Limit the number of times any given webhook can be called per minute. Limit the number of times any given webhook can be called per minute.
This only applies to project and group webhooks. This only applies to project and group webhooks.
...@@ -136,25 +133,6 @@ Set the limit to `0` to disable it. ...@@ -136,25 +133,6 @@ Set the limit to `0` to disable it.
- **Default rate limit**: Disabled. - **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 ## 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. 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 ...@@ -19,20 +19,6 @@ RSpec.describe WebHookService do
service_instance.async_execute service_instance.async_execute
end 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 end
end end
...@@ -418,19 +418,6 @@ RSpec.describe WebHookService do ...@@ -418,19 +418,6 @@ RSpec.describe WebHookService do
described_class.new(other_hook, data, :push_hooks).async_execute described_class.new(other_hook, data, :push_hooks).async_execute
end end
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 end
context 'when hook has custom context attributes' do 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