-
-
Notifications
You must be signed in to change notification settings - Fork 730
Feature toggle with Flipper
Flipper is a small tool with its own UI that we use to manage feature toggling and that can be configured at instance level. To know more about Flipper: https://github.com/jnunemaker/flipper
Flipper is our tool to manage feature toggling inside OFN application.
The purpose of this document is to present the tool, its functionalities and how to use it.
-
Feature: A feature is a new behavior inside our application that is not totally released to all users (for many reasons to know more about the power of Feature Toggle concept and why it's powerful see: Feature toggles). It is defined inside the OFN application. Creating feature inside Flipper UI can be seen as link a feature that exists inside OFN application to Flipper UI in order to configure it. View the list of features here.
-
Group: A group is defined inside the OFN application: it is strictly linked to our code base. This can be seen as certain set of user that can share same characteristics. You can activate a feature to a group inside the Flipper UI. View the list of groups here.
-
Actor: An actor is a User from a Flipper point of view. Activate a feature to an actor inside FlipperUI does activate this feature to the corresponding user inside the OFN application.
The UI is enabled for the admin users, and can be seen at this url: /admin/feature-toggle
.
If this is the first time you access to this UI, no feature is present. You can then add a feature (see List of Features in this document to know which features you can add) by clicking the 'Add Feature' blue button. Enter its name (NB: name must be strictly the same, case sensitive).
Once you've created this feature inside the Flipper UI, it is linked from an already existing feature inside the OFN application (based on its name) and can be configured inside Flipper UI.
A feature toggle can be enable at three level: actor, group and fully enabled.
NB: this document doesn't address the configuration by percentage, which is possible with Flipper.
It is possible to enable a feature for one (or many) actor inside the Flipper UI.
An actor is linked to a user by its flipper id
: knowing the id
of the user inside the database, the flipper id
is therefor Spree::User;[ID]
(for example Spree::User;1
). To activate a feature to a specify user, simply add an actor by entering in the field its flipper id
.
You can add as many actors as you want to activate them the feature.
You can now enable a feature to a group of users. Simply select the group and add it.
You can fully enable a feature by simply clicking the "Fully Enable" green button. It reset the previous configurations (actor, group) you've made.
You can fully disable a feature by simply clicking the "Disable" green button. It reset the previous configurations (actor, group) you've made.
As a feature is strongly linked to a concept that exists inside the codebase, notice that you must create/configure it inside the Flipper UI only feature that is actually existing inside the OFN application.
List of available features can be found here: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Feature-toggles
-
unit_price
: roll out
-
admins
: all the users that are admin (ie. have access to the admin backoffice)
Development environment setup
- Pipeline development process
- Bug severity
- Feature template (epic)
- Internationalisation (i18n)
- Dependency updates
Development
- Developer Guidelines
- The process of review, test, merge and deploy
- Making a great commit
- Making a great pull request
- Code Conventions
- Database migrations
- Testing and Rspec Tips
- Automated Testing Gotchas
- Rubocop
- Angular and OFN
- Feature toggles
- Stimulus and Turbo
Testing
- Testing process
- OFN Testing Documentation (Handbooks)
- Continuous Integration
- Parallelized test suite with knapsack
- Karma
Releasing
Specific features
Data and APIs
Instance-specific configuration
External services
Design