Improve `#stub_feature_flags` semantic
Description of the proposal
This changes the #stub_feature_flags
to be:
-
stub_feature_flags(ci_live_trace: false)
: Disableci_live_trace
feature flag globally -
stub_feature_flags(ci_live_trace: project)
andstub_feature_flags(ci_live_trace: [project1, project2])
: Enableci_live_trace
feature flag only on the specified projects
This MR:
- Updates
stub_feature_flags
semantic - This also changes
flipper_adapter
to useMemory
backend, as some of the specs fallback to usingFlipper
directly - Updates all relevant places in specs, there's just a few of them
This does represent an actual behaviour of Flipper
:
- You can enable selectively: enable means create override for a specific gate
- You cannot disable selectively: disable means remove override for a specific gate
For example:
[2] pry(main)> Feature.enable(:my_feature)
[3] pry(main)> Feature.disable(:my_feature, Project.last)
[4] pry(main)> Feature.enabled?(:my_feature) => true
[5] pry(main)> Feature.enabled?(:my_feature, Project.last) => true
and alternatively:
[6] pry(main)> Feature.disable(:my_feature2)
[7] pry(main)> Feature.enable(:my_feature2, Project.last)
[8] pry(main)> Feature.enabled?(:my_feature2) => false
[9] pry(main)> Feature.enabled?(:my_feature2, Project.last) => true
Check-list
-
Mention this proposal in the relevant Slack channels (e.g. #development
,#backend
,#frontend
) -
Follow the review process as usual
Related to: !31610 (closed)
Edited by 🤖 GitLab Bot 🤖