Table of Contents
Rules of thumb
- Use Waffle to add flexible and temporary feature flags used to roll-out a feature.
- For more permanent feature flags, prefer model-based configuration using config models.
- Note that the same config model is used for edx.org and white label sites. If you need a white label aware setting, then don't use a config model.
- When removing a model-based config field, remove use of it from the code before removing the field with a migration.
...
- Bok-choy tests cannot use the decorator because the server is separate from the test code.
- To override in the URL, see the External Test Suites section of the Waffle documentation. Read the following important details as well.
- In order to override a flag, it must first exist in the database.
- In edx-platform, you can temporarily create a record in common/test/db_fixtures/waffle_flags.json that will be loaded directly into mysql for bok-choy tests only. Note that you can default the flag on or off depending on your needs.
- Other teams temporarily create a migration which will create the flag in all environments, including Production.
- Here is some example code reloading a page with a waffle flag set to a different value.
- Note: In edx-platform, the WAFFLE_OVERRIDE setting is already taken care of in bok-choy to enable this type of URL override.
- In order to override a flag, it must first exist in the database.
Current edX Feature Flag usage, a step-by-step guide:
...