In a CD environment with new features hidden behind feature flags, there must be a way to ensure that code being pushed to production is effectively zero change?
Particularly in a change management controlled environment, it would be ideal to not treat code deployment as a change - only the feature switch on. To be able to do this, is there a way to prove that all code changes are protected behind feature flags? And that the effective flow is zero change. Feels like something that could and should exist. But maybe others solve this differently?
if(handle_passover_flag) { do_something_slightly_different_on_passover_if_its_awednesday() } else { do_normal_thing_except_on_wednesdays()}
where the new feature is a pretty subtle edge case. It's the kind of thing component tests often miss. The person writing the new feature could accidentally change some existing code likecommon.utilities.is_weird_day()
. Static analysis could compile with the flag as false and then see that the compiled old code and new code were the same and only promote if it iscommon.utilities.is_weird_day()
, then your unit tests should fail if an expected case is no longer properly managed.