Write utility to collect feature toggle state

Description

We need a utility to get data about all feature toggles defined in a given environment, and capture the results in a data file which can be used later to generate a report. A first attempt at this from a previous hackathon exists at https://github.com/edx/django-config-models/compare/fsheets/hackathon .

For each waffle flag or switch, the following data should be collected if available:

  • Current value

  • Creation timestamp

  • Last modification timestamp

Note that we use feature toggles in many repositories, so this utility should not live in a specific one like edx-platform.

Steps to Reproduce

None

Current Behavior

None

Expected Behavior

None

Reason for Variance

None

Release Notes

None

User Impact Summary

None

Activity

Show:
Stuart Young
April 10, 2019, 4:04 PM
Edited

Rather than use a custom management command to extract data concerning waffle flags and such, we can just use the default ‘dumpdata’ management command for the waffle app. I read the code for dumpdata, and it shouldn't cause performance when run in production, because it makes sure to only query models in question (see: https://github.com/django/django/blob/1.11/django/core/management/commands/dumpdata.py#L143)

Example usage of the command:

Once the code in https://github.com/edx/edx-platform/tree/master/openedx/core/djangoapps/waffle_utils has been ported to https://github.com/edx/edx-toggles, we should be able to run the same command, substituting 'edx-toggles' in as the app argument.

Example command output:

I discussed this with and and they seem to think this would be alright.

Mike Youngstrom
March 7, 2019, 8:33 PM

Included in this ticket is getting up to speed with this epic in general.

Done

Assignee

Stuart Young

Reporter

Jeremy Bowman

Labels

None

Reach

None

Impact

None

Platform Area

None

Customer

None

Partner Manager

None

URL

None

Contributor Name

None

Groups with Read-Only Access

None

Actual Points

None

Category of Work

None

Platform Map Area (Levels 1 & 2)

None

Platform Map Area (Levels 3 & 4)

None

Story Points

3

Sprint

None

Priority

Unset