Skip to content

Allow pipeline creation rate limit to be disabled for some projects

What does this MR do and why?

Related to https://gitlab.com/gitlab-org/gitlab/-/issues/352232#note_972620369

We want to enable ci_enforce_throttle_pipelines_creation for almost all the projects on .com and using the standard rollout process with a single feature flag doesn't work as expected:

By default you cannot selectively disable a feature flag by actor.

# This will not work how you would expect.
/chatops run feature set some_feature true
/chatops run feature set --project=gitlab-org/gitlab some_feature false

However, if you add two feature flags, you can write your conditional statement in such a way that the equivalent selective disable is possible.

Feature.enabled?(:a_feature, project) && Feature.disabled?(:a_feature_override, project)
# This will enable a feature flag globally, except for gitlab-org/gitlab
/chatops run feature set a_feature true
/chatops run feature set --project=gitlab-org/gitlab a_feature_override true

In this MR I'm adding the override feature flag and updating the logged message to indicate if the log entry was part of a throttle pipeline request or not.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Marius Bobin

Merge request reports