Flagsmith / Flagsmith/flagsmith
Not providing required environment fields causes environment saving to fail without errors
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 567
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 121
Description
### How are you running Flagsmith
- [ ] Self Hosted with Docker
- [ ] Self Hosted with Kubernetes
- [X] SaaS at flagsmith.com
- [ ] Some other way (add details in description below)
### Describe the bug
See reproduction steps below
### Steps To Reproduce
1. Create a required field for environments
2. Try to make any change to a preexisting environment, such as changing the name/banner or enabling/disabling change requests
No errors are shown and the changes are not saved.
### Expected behavior
Several possible solutions here:
1. Show an error message when trying to save an environment without providing any required metadata fields
2. Do not allow defining required environment fields - environments are created very infrequently so giving users the option to enforce this might not be useful
3. Ignore errors about missing required environment fields when updating environments if the required fields were originally not present. This forces new environments to be created with all required fields, while still allowing users to make changes to their preexisting environments without needing to provide required fields.
I would strongly prefer option 3 because of how infrequently environments are created and modified. Preventing users from doing anything with their existing environments seems too hard of a blocker, especially considering that virtually all users that create metadata fields will have preexisting environments (the ones created by default by Flagsmith).
### Screenshots
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.