flipt icon indicating copy to clipboard operation
flipt copied to clipboard

[FLI-708] Warn user when trying to delete a segment this is in use

Open phenax opened this issue 2 years ago • 2 comments

Problem

There is no indication to the user trying to delete a segment how the operation will affect the flags.

Ideal Solution

A message in the delete modal that highlights for the user that the segment being deleted is currently in use.

Something like "This flag is currently being used in 3 flags"

Search

  • [X] I searched for other open and closed issues before opening this

Additional Context

No response

FLI-708

phenax avatar Nov 16 '23 08:11 phenax

Very reasonable.

I think (since we addressed some feedback) that with the declarative backends you now get an error when validating your config when this referential constraint is violated. So this should only effect the relational backends. Just noting for the future given we implement fixing this.

GeorgeMac avatar Nov 16 '23 09:11 GeorgeMac

We plan to move segments to use Redux, much like @GeorgeMac did in #2301. I think doing that for segments and rules/rollouts might make fixing this much easier, as we could then cross reference each segment with flags/rules/rollouts at deletion time to do the check.

will create issues for moving these resources to redux incase anyone is able to help there

markphelps avatar Nov 22 '23 14:11 markphelps