this post was submitted on 14 Dec 2023
198 points (98.1% liked)
Asklemmy
43958 readers
1396 users here now
A loosely moderated place to ask open-ended questions
Search asklemmy ๐
If your post meets the following criteria, it's welcome here!
- Open-ended question
- Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
- Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
- Not ad nauseam inducing: please make sure it is a question that would be new to most members
- An actual topic of discussion
Looking for support?
Looking for a community?
- Lemmyverse: community search
- sub.rehab: maps old subreddits to fediverse options, marks official as such
- !lemmy411@lemmy.ca: a community for finding communities
~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
What are feature flags?
Feature flags are just checks that let you enable or disable code paths at runtime. For example, say you're rewriting the profile page for your app. Instead of just replacing the old code with the new code, you'd do something like:
Then you'd have some UI to enable or disable the flag. If anything goes wrong with the new page after launch, flip the flag and it'll switch back to the old version without having to modify the code or redeploy the site.
Fancier gating systems let you do things like roll out to a subset of users (eg a percentage of all users, or to 50% of a particular country, 20% of people that use the site in English, etc) and also let you create a control group in order to compare metrics between users in the test group and users in the control group.
Larger companies all have custom in-house systems for this, but I'm sure there's some libraries that make it easy too.
At my workplace, we don't have any Git feature branches. Instead, all changes are merged directly to trunk/master, and new features are all gated using feature flags.
Wow that's so effing smart!
Everything Dan said and more. They're sometimes also called canaries, although thats not quite the same thing. There's been a ton of times where services have been down for hours instead of minutes because a dev never built in a feature flag.
Canaries, relating to mine work ?
Thats where the term derives from, yes