3 ms·
I spent a whole day debugging an issue because an extra - dash in yaml. I had something like rules: - name: Only allow X - condition: ip=123 The - in
by matsemann 3y ago
I spent a whole day debugging an issue because an extra - dash in yaml.
I had something like
rules:
- name: Only allow X
- condition: ip=123
The - in front of condition of course makes a new list element. So I now had 2 rules. One with no conditions and a name, and an unnamed one with conditions. Since they are or'ed together everything for some reason I couldn't figure out went through, as I thought I had a single rule..
I hate yaml.
- IshKebab 3y agoYeah I've had this happen to me too. Truly awful format. I think the only reason it has caught on is because it has multiline strings, which are usually not great in other formats. Of course YAML fucks that up too by having a gazillion different kinds of multiline strings, distinguished only by impossible to remember symbols. But it does at least have them.