Add application limits to CI Variables settings
What does this MR do and why?
For #362227 (closed)
Users are no longer allowed to add CI variables if they have exceeded or are about to exceed the maximum application limit for their respective group or project. This applies to group and project CI variables; admin CI variables are not affected.
Note that the popover from the design was not implemented here, since disabled buttons don't fire hover/focus events that would trigger the popover to show up.
Screenshots or screen recordings
Note: Limit has been set to 5
or 10
for testing purposes (default is 200
):
CI/CD Settings | Without Limits | With Limits (alert on top of table) | With Limits (disabled button + alert at the bottom) |
---|---|---|---|
Group | |||
Project | |||
Admin (No Changes) |
When deleting/adding a variable
Screen_Recording_2022-11-25_at_10.13.09
How to set up and validate locally
- Download the patch below and apply it to your branch. This will set the application limit to
5
instead of the default200
.
git am < set-limit.patch
- Go to the CI Variables settings (Settings > CI/CD > Variables) for either a project or a group.
- If your project/group has exceeded 5 variables, the Add Variable button should be disabled and the max limit alert should show up.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Mireya Andres