summaryrefslogtreecommitdiff
path: root/doc/development/feature_flags
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-20 11:10:13 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-20 11:10:13 +0000
commit0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch)
tree7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /doc/development/feature_flags
parent72123183a20411a36d607d70b12d57c484394c8e (diff)
downloadgitlab-ce-0ea3fcec397b69815975647f5e2aa5fe944a8486.tar.gz
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'doc/development/feature_flags')
-rw-r--r--doc/development/feature_flags/controls.md21
-rw-r--r--doc/development/feature_flags/index.md12
2 files changed, 31 insertions, 2 deletions
diff --git a/doc/development/feature_flags/controls.md b/doc/development/feature_flags/controls.md
index 68c14c1b0c9..07c3c83912a 100644
--- a/doc/development/feature_flags/controls.md
+++ b/doc/development/feature_flags/controls.md
@@ -95,6 +95,7 @@ Guidelines:
- Consider notifying `#support_gitlab-com` beforehand. So in case if the feature has any side effects on user experience, they can mitigate and disable the feature flag to reduce some impact.
- If the feature meets the requirements for creating a [Change Management](https://about.gitlab.com/handbook/engineering/infrastructure/change-management/#feature-flags-and-the-change-management-process) issue, create a Change Management issue per [criticality guidelines](https://about.gitlab.com/handbook/engineering/infrastructure/change-management/#change-request-workflows).
- For simple, low-risk, easily reverted features, proceed and [enable the feature in `#production`](#process).
+- For support requests to toggle feature flags for specific groups or projects, please follow the process outlined in the [support workflows](https://about.gitlab.com/handbook/support/workflows/saas_feature_flags.html).
#### Process
@@ -198,6 +199,14 @@ For groups the `--group` flag is available:
/chatops run feature set --group=gitlab-org some_feature true
```
+Note that `--group` does not work with user namespaces. To enable a feature flag for a
+generic namespace (including groups) use `--namespace`:
+
+```shell
+/chatops run feature set --namespace=gitlab-org some_feature true
+/chatops run feature set --namespace=myusername some_feature true
+```
+
Note that actor-based gates are applied before percentages. For example, considering the
`group/project` as `gitlab-org/gitlab` and a given example feature as `some_feature`, if
you run these 2 commands:
@@ -215,6 +224,16 @@ actors.
Feature.enabled?(:some_feature, group)
```
+Multiple actors can be passed together in a comma-separated form:
+
+```shell
+/chatops run feature set --project=gitlab-org/gitlab,example-org/example-project some_feature true
+
+/chatops run feature set --group=gitlab-org,example-org some_feature true
+
+/chatops run feature set --namespace=gitlab-org,example-org some_feature true
+```
+
Lastly, to verify that the feature is deemed stable in as many cases as possible,
you should fully roll out the feature by enabling the flag **globally** by running:
@@ -267,7 +286,7 @@ To disable a feature flag that has been enabled for a specific project you can r
You cannot selectively disable feature flags for a specific project/group/user without applying a [specific method of implementing](index.md#selectively-disable-by-actor) the feature flags.
-If a feature flag is disabled via ChatOps, that will take precedence over the `default_enabled` value in the YML. In other words, you could have a feature enabled for on-premise installations but not for GitLab.com.
+If a feature flag is disabled via ChatOps, that will take precedence over the `default_enabled` value in the YAML. In other words, you could have a feature enabled for on-premise installations but not for GitLab.com.
### Feature flag change logging
diff --git a/doc/development/feature_flags/index.md b/doc/development/feature_flags/index.md
index 54158de6893..d21a46142a2 100644
--- a/doc/development/feature_flags/index.md
+++ b/doc/development/feature_flags/index.md
@@ -141,7 +141,7 @@ push_frontend_feature_flag(:my_ops_flag, project, type: :ops)
An `experiment` feature flag should conform to the same standards as a `development` feature flag,
although the interface has some differences. An experiment feature flag should have a rollout issue,
-created using the [Experiment Tracking template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/issue_templates/experiment_tracking_template.md). More information can be found in the [experiment guide](../experiment_guide/index.md).
+created using the [Experiment Tracking template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/issue_templates/Experiment%20Rollout.md). More information can be found in the [experiment guide](../experiment_guide/index.md).
## Feature flag definition and validation
@@ -226,6 +226,16 @@ Feature flags **must** be used in the MR that introduces them. Not doing so caus
[broken master](https://about.gitlab.com/handbook/engineering/workflow/#broken-master) scenario due
to the `rspec:feature-flags` job that only runs on the `master` branch.
+## List all the feature flags
+
+To [use ChatOps](../../ci/chatops/index.md) to output all the feature flags in an environment to Slack, you can use the `run feature list`
+command. For example:
+
+```shell
+/chatops run feature list --dev
+/chatops run feature list --staging
+```
+
## Delete a feature flag
See [cleaning up feature flags](controls.md#cleaning-up) for more information about