3 ms·
# Update A ## config.ext foo = false ## src.py from config import config if config('foo'): work(2 / 0) else: work(10 / 5)
by Cyphase 2y ago
# Update A
## config.ext
foo = false
## src.py
from config import config
if config('foo'):
work(2 / 0)
else:
work(10 / 5)
"Yep, we rigorously tested it."
# Update B
## config.ext
foo = true
"It's just a config change, let's go live."
- nrr 2y agoYeah, that's about right. The most insidious part of this is when there are entire swaths of infrastructure in place that circumvent the usual code review process in order to execute those configuration changes. Boolean flags like your `config('foo')` here are most common, but I've also seen nested dictionaries shoved through this way.
- disgruntledphd2 2y agoWhen I was at FB there were a load of SEVs caused by config changes, such that the repo itself would print out a huge warning about updating configs and show you how to do a canary to avoid this problem.