diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-10-09 12:08:23 +0000 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-10-09 12:08:23 +0000 |
commit | c1ad8bcb4c2be010d5f42c506535ce4b2846aea6 (patch) | |
tree | 440b33cabb9b8905fad33d8a889949e6672a5886 | |
parent | df0b8b946bef4f8ea825a5c2d3a7256bbd735a71 (diff) | |
parent | a78bc746083db825f0b59296823d1d7f98df3335 (diff) | |
download | gitlab-ce-c1ad8bcb4c2be010d5f42c506535ce4b2846aea6.tar.gz |
Merge branch 'docs/rs-feature-flag-check-by-default' into 'master'
Documentation for feature flags defaulting to on
Closes gitlab-ee#7883
See merge request gitlab-org/gitlab-ce!22157
-rw-r--r-- | doc/development/rolling_out_changes_using_feature_flags.md | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/development/rolling_out_changes_using_feature_flags.md b/doc/development/rolling_out_changes_using_feature_flags.md index 905aa26a40b..dada59ce242 100644 --- a/doc/development/rolling_out_changes_using_feature_flags.md +++ b/doc/development/rolling_out_changes_using_feature_flags.md @@ -151,3 +151,27 @@ most cases this will translate to a feature (with a feature flag) being shipped in RC1, followed by the feature flag being removed in RC2. This in turn means the feature will be stable by the time we publish a stable package around the 22nd of the month. + +## Undefined feature flags default to "on" + +By default, the [`Project#feature_available?`][project-fa], +[`Namespace#feature_available?`][namespace-fa] (EE), and +[`License.feature_available?`][license-fa] (EE) methods will check if the +specified feature is behind a feature flag. Unless the feature is explicitly +disabled or limited to a percentage of users, the feature flag check will +default to `true`. + +As an example, if you were to ship the backend half of a feature behind a flag, +you'd want to explicitly disable that flag until the frontend half is also ready +to be shipped. You can do this via ChatOps: + +``` +/chatops run feature set some_feature 0 +``` + +Note that you can do this at any time, even before the merge request using the +flag has been merged! + +[project-fa]: https://gitlab.com/gitlab-org/gitlab-ee/blob/4cc1c62918aa4c31750cb21dfb1a6c3492d71080/app/models/project_feature.rb#L63-68 +[namespace-fa]: https://gitlab.com/gitlab-org/gitlab-ee/blob/4cc1c62918aa4c31750cb21dfb1a6c3492d71080/ee/app/models/ee/namespace.rb#L71-85 +[license-fa]: https://gitlab.com/gitlab-org/gitlab-ee/blob/4cc1c62918aa4c31750cb21dfb1a6c3492d71080/ee/app/models/license.rb#L293-300 |