Convert feature flag `git_push_create_all_pipelines` to plan limit
Background
This issue was originally a feature flag rollout issue.
Problem
The feature flag git_push_create_all_pipelines
was introduced as a workaround for self-managed instances to disable the limit of creating max 4 pipelines per git push. On SaaS we use the limit of 4 pipelines per git push to avoid that many pipelines are created for a single push which can undermine the availability of SaaS.
Since this feature flag was introduced years ago we have reached the overdue limit of 6 months where we require taking actions on any outstanding feature flags. Overdue feature flags should be either enabled or converted to application settings.
This feature flag is particular because enabling it will disable the limit in place so it's not recommended to enable the feature flag.
Solution
Rather than having self-managed instances to disable limits we should allow them to raise the limit to a threshold they are comfortable with.
We should:
- remove the feature flag which disables the limit
- make the limit in the code to always be checked
- allow admins to configure the limit. It's recommended to use
PlanLimit
model which can support both plan-based limits on SaaS as well as the instance-wide limit for self-managed.