Home Software Development Q&A: Fixing the problem of stale characteristic flags

Q&A: Fixing the problem of stale characteristic flags

0
Q&A: Fixing the problem of stale characteristic flags


As we noticed final week with what occurred because of a foul replace from CrowdStrike, it’s extra clear than ever that corporations releasing software program want a method to roll again updates if issues go improper. 

Within the most up-to-date episode of our podcast, What the Dev?, we spoke with Konrad Niemiec, founder and CEO of the characteristic flagging software, Lekko, to speak in regards to the significance of including characteristic flags to your code, but additionally what can go improper if flags aren’t correctly maintained.

Right here is an edited and abridged model of that dialog:

David Rubinstein, editor-in-chief of SD Instances: For years we’ve been speaking about characteristic flagging within the context of code experimentation, the place you may launch to a small cohort of individuals. And in the event that they prefer it, you may unfold it out to extra individuals, or you may roll it again with out actually doing any harm if it doesn’t work the best way you thought it might. What’s your tackle the entire characteristic flag scenario?

Konrad Niemiec, founder and CEO of Lekko: Characteristic flagging is now thought-about the mainstream approach of releasing software program options. So it’s positively a observe that we wish individuals to proceed doing and proceed evangelizing.  

Once I was at Uber we used a dynamic configuration software known as Flipper, and I left Uber to a smaller startup known as Sisu, the place we used one of many main characteristic flagging instruments available on the market. And once I used that, though it allow us to characteristic flag and it did clear up a bunch of issues for us, we encountered totally different points that resulted in threat and complexity being added to our system. 

So we ended up having a bunch of stale flags littered round our codebase, and issues we wanted to maintain round as a result of the enterprise wanted them. And so we ended up in a scenario the place code turned very troublesome to take care of, and it was very exhausting to maintain issues clear. And we simply ended up inflicting points left and proper.

DR: What do you imply by a stale flag?

KN: An implementation of a characteristic flag usually seems like an if assertion within the code. It’ll say if characteristic flag is enabled, I’ll do one factor, in any other case, I’ll do the outdated model of the code. That is the way it seems like whenever you’re truly including it as an engineer. And what a stale flag will imply is the flag will likely be all the best way on. So that you’ll have absolutely rolled it out, however you’re leaving that ‘else’ code path in there. So that you mainly have some code that’s just about by no means going to get run, but it surely’s nonetheless sitting in your binaries. And it nearly turns into this zombie. We wish to name them zombie flags, the place it form of pops up whenever you least anticipate them. You suppose they’re lifeless, however they arrive again to life.

And this usually occurs in startups which might be making an attempt to maneuver quick. You wish to get options out as quickly as attainable so that you don’t have time to have a flag clear replace and undergo and categorize to see when you ought to take away all these things from the code. And so they find yourself accumulating and doubtlessly inflicting points due to these stale code paths.

DR: What sort of points?

KN: So a simple instance is you will have some type of untested code based mostly on a mix of characteristic flags. Let’s say you will have two characteristic flags which might be in an analogous a part of the code base, so there at the moment are 4 totally different paths. And if one in every of them hasn’t been executed shortly, odds are there’s a bug. So one factor that occurred at Sisu was that one in every of our largest clients encountered a problem once we mistakenly turned off the improper flag. We thought we have been form of rolling again a brand new characteristic for them, however we jumped right into a stale code path, and we ended up inflicting a giant difficulty for that buyer.

DR: Is that one thing that synthetic intelligence may tackle as a method to undergo the code and recommend eradicating these zombie flags?

KN: With present instruments, it’s a very handbook course of. You’re anticipated to only undergo and clear issues up your self. And that is precisely what we’re seeing. We predict that generative AI has a giant function to play right here. Proper now we’re beginning off with easy heuristic approaches in addition to some generative AI approaches to determine hey, what are some actually difficult code paths right here? Can we flag these and doubtlessly deliver these stale code paths down considerably? Can we outline allowable configurations? 

One thing we see as a giant distinction between dynamic configuration and have flagging itself is you can mix totally different flags or totally different items of dynamic conduct within the code collectively as one outlined configuration. And that approach, you may cut back the variety of attainable choices on the market, and totally different code paths that you need to fear about. And we predict that AI has an enormous place in bettering security and lowering the danger of utilizing this sort of tooling.

DR: How extensively adopted is using characteristic flags at this level?

KN: We predict that particularly amongst mid market to giant tech corporations, it’s most likely a majority of corporations which might be at present utilizing characteristic flagging in some capability. You do discover a good portion of corporations constructing their very own. Usually engineers will take it into their very own palms and construct a system. However usually, whenever you develop to some stage of complexity, you shortly understand there’s so much concerned in making the system each scalable and in addition work in quite a lot of totally different use instances. And there are many issues that find yourself arising because of this. So we predict it’s an excellent portion of corporations, however they might not all be utilizing third-party characteristic flagging instruments. Some corporations even undergo the entire lifecycle, they begin off with a characteristic flagging software, they rip it out, then they spend vital effort constructing related tooling to what Google, Uber, and Fb have, these dynamic configuration instruments.


You might also like…

Classes discovered from CrowdStrike outages on releasing software program updates

Q&A on the Rust Basis’s new Security-Essential Rust Consortium