Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/administration/feature_flags.md')
-rw-r--r--doc/administration/feature_flags.md30
1 files changed, 26 insertions, 4 deletions
diff --git a/doc/administration/feature_flags.md b/doc/administration/feature_flags.md
index afbf0759452..85a7304b5e8 100644
--- a/doc/administration/feature_flags.md
+++ b/doc/administration/feature_flags.md
@@ -36,7 +36,7 @@ For example, data is not recorded and services do not run.
If you used a certain feature and identified a bug, a misbehavior, or an
error, it's very important that you [**provide feedback**](https://gitlab.com/gitlab-org/gitlab/-/issues/new?issue[title]=Docs%20-%20feature%20flag%20feedback%3A%20Feature%20Name&issue[description]=Describe%20the%20problem%20you%27ve%20encountered.%0A%0A%3C!--%20Don%27t%20edit%20below%20this%20line%20--%3E%0A%0A%2Flabel%20~%22docs%5C-comments%22%20) to GitLab as soon
as possible so we can improve or fix it while behind a flag. When you upgrade
-GitLab to an earlier version, the feature flag status may change.
+GitLab, the feature flag status may change.
## Risks when enabling features still in development
@@ -130,11 +130,15 @@ irb(main):001:0> Feature.enable(:my_awesome_feature)
=> nil
```
-To check if a flag is enabled or disabled you can use `Feature.enabled?` or `Feature.disabled?`. For example, for a fictional feature flag named `my_awesome_feature`:
+When the feature is ready, GitLab removes the feature flag, and the option for
+enabling and disabling it no longer exists. The feature becomes available in all instances.
+
+### Check if a feature flag is enabled
+
+To check if a flag is enabled or disabled, use `Feature.enabled?` or `Feature.disabled?`.
+For example, for a feature flag named `my_awesome_feature` that is already enabled:
```ruby
-Feature.enable(:my_awesome_feature)
-=> nil
Feature.enabled?(:my_awesome_feature)
=> true
Feature.disabled?(:my_awesome_feature)
@@ -143,3 +147,21 @@ Feature.disabled?(:my_awesome_feature)
When the feature is ready, GitLab removes the feature flag, and the option for
enabling and disabling it no longer exists. The feature becomes available in all instances.
+
+### View set feature flags
+
+You can view all GitLab administrator set feature flags:
+
+```ruby
+Feature.all
+=> [#<Flipper::Feature:198220 name="my_awesome_feature", state=:on, enabled_gate_names=[:boolean], adapter=:memoizable>]
+```
+
+### Unset feature flag
+
+You can unset a feature flag so that GitLab will fall back to the current defaults for that flag:
+
+```ruby
+Feature.remove(:my_awesome_feature)
+=> true
+```