Page frozen when submitting FF with the duplicated environment selected
Summary
In the create/edit section of Feature Flags, it is allowed to select the same env multiple times. When I try to save though, nothing happens.
Steps to reproduce
- Go to Feature Flags
- Create or Edit one
- Select the same environment multiple times
- Click on
Save
orCreate
Example Project
What is the current bug behavior?
Nothing happens and the page seemed frozen.
The server returns an error which is not displayed. As as user I would like to know that selecting the same env multiple times is not allowed.
old | new |
---|---|
What is the expected correct behavior?
I should be warned that selecting the same env multiple times is not allowed
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Proposal
- We'll have an error as depicted at the last image in #243499 (comment 430976005)
- It will have the copy
Selecting the same environment ($environment) multiple times is not allowed.
- It can support reporting on multiple environments like:
Selecting the same environments ($environment, $environment, $environment) multiple times is not allowed.
-
Use an alert component withscoped off to #273018 (closed)warning
component type
Edited by Dimitrie Hoekstra