Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
df9f14b3
Commit
df9f14b3
authored
Mar 02, 2021
by
Amparo Luna
Committed by
Marcia Ramos
Mar 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more context to the documentation about removing a FF locally
parent
cd255a09
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
doc/development/feature_flags/development.md
doc/development/feature_flags/development.md
+13
-3
No files found.
doc/development/feature_flags/development.md
View file @
df9f14b3
...
...
@@ -410,11 +410,21 @@ Feature.enable(:feature_flag_name, Project.find_by_full_path("root/my-project"))
### Removing a feature flag locally (in development)
When manually enabling or disabling a feature flag from the Rails console, its default value gets overwritten.
Once you have manually enabled or disabled a feature flag to test in your local environment,
the flag's default value gets overwritten and it takes precedence over the
`default_enabled`
value.
This can cause confusion when changing the flag's
`default_enabled`
attribute.
To reset the feature flag to the default status, you can remove it in the rails console (
`rails c`
)
as follows:
For example, flags are commonly enabled and disabled several times during the development process.
When we finally enable the flag by default, we set
`default_enabled: true`
in the YAML file.
-
If the flag was manually enabled before setting
`default_enabled: true`
, the feature will be enabled.
Not because of the
`default_enabled: true`
value of the flag but because it was manually enabled.
-
If the flag was manually disabled before setting
`default_enabled: true`
, the feature will
remain disabled. The
`default_enabled: true`
value does not take precendence over the explicit
`false`
value set when disabling it manually.
To reset the feature flag to the default status set in its YAML file, remove it using the Rails console
(
`rails c`
) as follows:
```
ruby
Feature
.
remove
(
:feature_flag_name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment