Add % rollout strategy to Feature Flags
Problem to solve
We recently rolled out feature flags with the ability to turn them off or on per environment. Another important capability of feature flags is to be able to set a rollout % for an environment, where a certain number of requests are responded to with the feature on or off. Enabling this feature will allow teams to do controlled rollouts, monitoring behavior of the target environment to ensure the results are as expected.
What we need is to support the https://github.com/Unleash/unleash/blob/master/docs/activation-strategies.md#gradualrolloutuserid strategy, which randomly rolls out to users based on userid (of the client application, not GitLab userid) to ensure a consistent experience from pageload to pageload. In the future we can add a completely random strategy if customer demand presents itself, or session stickiness for non-logged in experiences.
We need to:
- Allow for % rollout to be set on a per-environment basis in the FF UI and API
- Update our implementation of the server to return the current % rollout state
- Show the % rollout value for a particular environment in the feature flag table view
Adding minimal change to the current implementation. Moving forward but awaiting feedback on #8240 (comment 167694060)
User has the ability to set a rollout percentage on the detail view of a feature flag. An input text is present. The percentage range is 0-100 as per the documentation.
Once a percentage is set and saved, the user should see the amount in the list view of feature flags. Given no rollout value is set, user sees the text
What does success look like, and how can we measure that?
This should continue to drive adoption of the Feature Flags feature by making it more complete for normal use cases.