Eagerly find all features gated by Flipper #720
synth
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
FlipperUI is great! However, in my case, I want to be able to flip features at an organizational level. So I need a UI to flip features that is baked into our existing site admin for each org.
I want to display a multi-select box for each available feature in the app. The feature list is a combination of deployment features as well as canary features. I don't want to burden developers with having to maintain a list or do migrations for each feature.
This could be done with a custom rubocop cop, but I found a simpler way to scan the entire app directory for
Flipper.enabled?lines and parse an AST to get the first argument.The entire scan takes 0.07s (and we have a fairly large app), so I can put this into a remote endpoint for dynamically populating the select box. It's only a site admin for a particular org, so its not frequently visited. Easy solution instead of building a cop or maintaining a file or redis set.
Here's the oneliner (broken out for readability):
Beta Was this translation helpful? Give feedback.
All reactions