From a7b3560714b4d9cc4ab32dffcd1f74a284b93580 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 18 Feb 2022 09:45:46 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-8-stable-ee --- doc/administration/feature_flags.md | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'doc/administration/feature_flags.md') 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 +=> [#] +``` + +### 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 +``` -- cgit v1.2.3