yaml configuration: an unexpected bug
Few weeks ago I wrote about
YAML configuration and why I believe they are the best of a bad bunch of formats. Within the post I talked abouit adding the ability for users to do string replacement with $LOG_LEVEL
bash style variables. This worked great in situations where you had a variable on it’s own e.g.
log:
level: "$LOG_LEVEL"
But I did not take into account secrets that may contain dollars in them. This ended up causing an unexpected bug in production adding a secret containing a dollar symbol into a yaml configuration file.
In the end I have decided to go back on my original design and plan to support $LOG_LEVEL
in favour of only supporting ${LOG_LEVEL}
style variables.
Bugs and unexpected behaviour happens and it is important to be able to admit when a solution is flawed and you have to go back on a design. Now my configuration library only supports ${LOG_LEVEL}
which I believe is enough. Adding many configuration options for environment variables added complexity.