A LaunchDarkly Horror Story

  Рет қаралды 6,870

fasterthanlime

fasterthanlime

Күн бұрын

Пікірлер: 9
@roryookane
@roryookane 2 жыл бұрын
*Video summary* This video uses as a motivating example a bug that fasterthanlime once ran into when the feature flag management software he was using (LaunchDarkly) read the staging-environment feature flag values in production. That caused all experimental code to be turned on in production, which led to many customers being affected by bugs in the experimental code. After talking about the difficulty of debugging this, fasterthanlime talks about how it’s important to prevent errors automatically and not rely on humans to configure things correctly. He says this particular issue is unusually hard to prevent automatically. He notes that the error could have been avoided if the LaunchDarkly API didn’t conflate the API key and the environment, but that LaunchDarkly would probably not be willing to change the API now. He eventually concludes that the easiest way to prevent that bug is to create a new feature flag called “environment” that just duplicates the name of the environment these feature flag values are for, then assert on application startup that the application environment matches the feature flag environment.
@MatthewScheffel
@MatthewScheffel 2 жыл бұрын
Team strict! I used to be on team "fast production" but found I kept screwing myself with weird bugs because I shadowed a variable or did some other Dumb Thing that Rust would never let me compile past. Now when I load old code of mine in Rust, I can add on to it fearlessly and things work. My >10k LOC Python projects? Yek. Rather rebuild it.
@joshag8721
@joshag8721 2 жыл бұрын
if you're storing the key in an encrypted file but one that a user can decrypt as part of a review, prepend the API key with 'prod-', 'stag-', 'deve-', etc. (as long as the length is the same) and strip off the first 5 characters before passing it to the launch darkly, and now you don't need a separate flag in launch darkly. Then, as part of the checklist for changes to that file, require the reviewer to verify the environment the key is prepended with matches the environment that key belongs to in launch darkly. It's still not automatic, but it's a start. You can then use that launch darkly flag with different values set for each environment (you can also use environment variables if you use those outside of launch darkly, too), and as soon as the launch darkly client initializes, check that key against the string you stripped off of the api key. And if they don't match, the program should die immediately. This way there's a review step that should catch the incorrect key, but even if that fails, there's the backstop of the start-up check. In order for that to fail, not only does the code author have to change the key, they have to change the prepended string to match the correct environment for the api key AND the reviewer has to miss that the prepended string in the file changed in addition to the key itself. At that point i think you're well into the grey are between accidentally setting the wrong key and either doing it on purpose or general atmosphere of negligence.
@cthree87
@cthree87 2 жыл бұрын
Love your talking head! Everyone should support you on Patreon.
@Muaahaa
@Muaahaa Жыл бұрын
Could create a network proxy inside your private pre-production network for SAAS products you use. If you can do this, then you'll hopefully see immediate failures if you accidentally try using them in production (since the hosts wouldn't resolve) outside your private network.
@riccier1
@riccier1 2 жыл бұрын
On the LaunchDarkly issue, an idea that came to me was to create a sort of canary flag - some piece of code that would fail loudly/warn someone if ever run. But then you would have to disable it for local dev/staging anyway, so I guess it's somewhat equivalent to your environment flag idea
@zerker2000
@zerker2000 Жыл бұрын
"Number + array is legal" as an APLer I resent this remark XD
@PaulFisher
@PaulFisher Жыл бұрын
Amos in this video is the most anybody has ever looked like Daniel Armbruster, the lead singer of Rochester, New York rock band Joywave
@rasmuskaj
@rasmuskaj 2 жыл бұрын
Great video, thanks! But I can't help thinking its got two parts that might not be as related as they could be. I'm on team strict all the way, and I love the rust language, but I don't really see how that relates to the launchdarkley issue ... Unless, like ... you write a launchdarkley client api in rust, that makes it very easy to check feature flags once it is initialized, but that requires both the key and the name of the environment to initialize. So, ok, maybe the two parts of the video are related after all, but you left it pretty much to the viewer to find the relation. Which may be part of why your video posts are shorter than your text posts. :-)
POV: I'm on my third coffee and you just asked me how the internet works
21:20
GitHub Actions Feels Bad
26:27
fasterthanlime
Рет қаралды 95 М.
天使救了路飞!#天使#小丑#路飞#家庭
00:35
家庭搞笑日记
Рет қаралды 91 МЛН
Пройди игру и получи 5 чупа-чупсов (2024)
00:49
Екатерина Ковалева
Рет қаралды 3,9 МЛН
Parenting hacks and gadgets against mosquitoes 🦟👶
00:21
Let's GLOW!
Рет қаралды 13 МЛН
What will he say ? 😱 #smarthome #cleaning #homecleaning #gadgets
01:00
I built my own memory profiler (in Rust, on Linux)
22:58
fasterthanlime
Рет қаралды 60 М.
branding 101: let's get personal.
30:28
buildspace
Рет қаралды 6 М.
Asking Interns Why They Studied Computer Science
8:50
Namanh Kapur
Рет қаралды 35 М.
I ported h2spec to Rust (also: codegen!)
16:09
fasterthanlime
Рет қаралды 24 М.
These Keys Shouldn't Exist | Nostalgia Nerd
19:32
Nostalgia Nerd
Рет қаралды 657 М.
When a CIA Hacker Goes Rogue
23:09
TyFrom99
Рет қаралды 2 МЛН
Silly Fast Fresh Deploys with Rust (Part 2)
13:42
fasterthanlime
Рет қаралды 8 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 566 М.
A quick health update
4:26
fasterthanlime
Рет қаралды 19 М.
E-Tachi B12 || FM3 Mobile Review Best Battery charger 2024
0:39
Data recovery from MicroSD using PC3000 Flash & Spider Board 😎
1:01
Google Pixel 9/Pro Review: Gimmick or Good?
24:05
Marques Brownlee
Рет қаралды 3,2 МЛН