Commit 94b40284 authored by James Fargher's avatar James Fargher

Merge branch 'pguinoiseau/doc-dev-feature-flags-random' into 'master'

Update the developer docs about feature flags for the new --random parameter in ChatOps

See merge request gitlab-org/gitlab!80788
parents bd598ee5 03fc83c5
...@@ -101,7 +101,7 @@ For visibility, all `/chatops` commands that target production should be execute ...@@ -101,7 +101,7 @@ For visibility, all `/chatops` commands that target production should be execute
- If the feature flag in code has [an actor](https://docs.gitlab.com/ee/development/feature_flags/#feature-actors), perform **actor-based** rollout. - If the feature flag in code has [an actor](https://docs.gitlab.com/ee/development/feature_flags/#feature-actors), perform **actor-based** rollout.
- [ ] `/chatops run feature set <feature-flag-name> <rollout-percentage> --actors` - [ ] `/chatops run feature set <feature-flag-name> <rollout-percentage> --actors`
- If the feature flag in code does **NOT** have [an actor](https://docs.gitlab.com/ee/development/feature_flags/#feature-actors), perform time-based rollout (**random** rollout). - If the feature flag in code does **NOT** have [an actor](https://docs.gitlab.com/ee/development/feature_flags/#feature-actors), perform time-based rollout (**random** rollout).
- [ ] `/chatops run feature set <feature-flag-name> <rollout-percentage>` - [ ] `/chatops run feature set <feature-flag-name> <rollout-percentage> --random`
- Enable the feature globally on production environment. - Enable the feature globally on production environment.
- [ ] `/chatops run feature set <feature-flag-name> true` - [ ] `/chatops run feature set <feature-flag-name> true`
- [ ] Announce on [the feature issue](ISSUE LINK) that the feature has been globally enabled. - [ ] Announce on [the feature issue](ISSUE LINK) that the feature has been globally enabled.
......
...@@ -72,8 +72,8 @@ group. ...@@ -72,8 +72,8 @@ group.
To enable a feature for 25% of the time, run the following in Slack: To enable a feature for 25% of the time, run the following in Slack:
```shell ```shell
/chatops run feature set new_navigation_bar 25 --dev /chatops run feature set new_navigation_bar 25 --random --dev
/chatops run feature set new_navigation_bar 25 --staging /chatops run feature set new_navigation_bar 25 --random --staging
``` ```
### Enabling a feature for GitLab.com ### Enabling a feature for GitLab.com
...@@ -121,7 +121,7 @@ command you make so people can understand the change if they need to. ...@@ -121,7 +121,7 @@ command you make so people can understand the change if they need to.
To enable a feature for 25% of the time, run the following in Slack: To enable a feature for 25% of the time, run the following in Slack:
```shell ```shell
/chatops run feature set new_navigation_bar 25 /chatops run feature set new_navigation_bar 25 --random
``` ```
This sets a feature flag to `true` based on the following formula: This sets a feature flag to `true` based on the following formula:
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
# The experiment is controlled by a Feature Flag (https://docs.gitlab.com/ee/development/feature_flags/controls.html), # The experiment is controlled by a Feature Flag (https://docs.gitlab.com/ee/development/feature_flags/controls.html),
# which is named "#{experiment_key}_experiment_percentage" and *must* be set with a percentage and not be used for other purposes. # which is named "#{experiment_key}_experiment_percentage" and *must* be set with a percentage and not be used for other purposes.
# #
# To enable the experiment for 10% of the users: # To enable the experiment for 10% of the time:
# #
# chatops: `/chatops run feature set experiment_key_experiment_percentage 10` # chatops: `/chatops run feature set experiment_key_experiment_percentage 10 --random`
# console: `Feature.enable_percentage_of_time(:experiment_key_experiment_percentage, 10)` # console: `Feature.enable_percentage_of_time(:experiment_key_experiment_percentage, 10)`
# #
# To disable the experiment: # To disable the experiment:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment