4 ms·
I've had good results with them. We never had more than 5-7 flags at any given time. We would flag things by environment (dev/staging/prod) and/or by user (ever
by swanson 11y ago
I've had good results with them. We never had more than 5-7 flags at any given time. We would flag things by environment (dev/staging/prod) and/or by user (everyone/beta users/internal team).
Flags were there because of two main reasons:
* Our app was deployed more frequently than a service we depended on (e.g. every commit for app, nightly for service in staging, every 2 weeks for service in prod, etc)
* We wanted to have it rolled out to a subset of users for testing
We did not run into exponential trees of combinations because we rarely had two different flags interacting. Maybe it was a happy accident of trying to make work parallelizable or maybe because our feature flags never lasted more than a month or so.
The code was intentionally dumb and the flags were stored directly in the source code (not in a database table or another config file or something). Simple, stupid calls to `FeatureFlipper.isFooReportEnabled()`. We did not test this class because each method was a simple boolean check that the current user appeared in a list or ENV != prod.
We stubbed out `FeatureFlipper` when using it throughout the app. Stub the feature to be enabled, check behavior. Repeat for disabled.
Most of the features were simply hidden at the view level. For users, if there is no button, it doesnt exist. We didn't particularly care if the user would "guess" the url of a feature flagged page -- not worth the effort.
Doing a "full rollout" of the feature was a non-event. Just delete the method on FeatureFlipper and go fix the compile errors :)