Limit the number of feature flags per project
Security Issue: https://gitlab.com/gitlab-org/security/gitlab/-/issues/239
Problem to solve
Currently, client/features
endpoint and feature_flag_scopes
endpoint do not have a pagination. This is because unleash clients are not compatible with pagination and all flags should be populated in one request.
However, this leaves a scalability concern that if there are too many feature flags per project, this endpoint will likely fail by database statement timeout or Unicorn/Puma request timeout. So we should limit the number of flags somehow.
Intended users
User experience goal
The user will be enabled to create feature flags regardless of the situation. If limited the user should be well informed and the feedback made actionable.
Proposal
Implements a UI to support the changes of https://gitlab.com/gitlab-org/security/gitlab/-/issues/239:
- There will be a call out/alert informing the users of the 200 FF limit of https://gitlab.com/gitlab-org/security/gitlab/-/issues/239 when a user presses the
New feature flag
button when the limit has been reached.- This alert is dismissable and will pop up again if the button is pressed while the limit is reached.
- This alert persists during the current page load. When the page is refreshed it will show when the button is pressed again and the limit is reached.
- Copy:
Feature flag limit reached (200). Delete one or more feature flags before adding new ones.
- Variant:
Warning
- The same warning will be given to the users creating feature flags through the API
Mockup (Figma document) |
---|