lukasjarosch / skipper

Inventory based templated configuration library inspired by the kapitan project
https://lukasjarosch.github.io/skipper/
MIT License
11 stars 3 forks source link

Multi-level variable replacements sometimes fail #55

Closed lukasjarosch closed 1 year ago

lukasjarosch commented 1 year ago

Describe the bug If a variable is replaced with another variable, it is not always properly replaced.

For example: a key: foo.bar has the value test and another key bar.baz has the value ${foo:bar)_even_more Sometimes the key bar.baz will be test_even_more and sometimes ${foo:bar}_even_more.

This has to do with the order in which the variables are replaced. It is based on a range loop, which has a non-deterministic order.

After all variables have been replaced, it might be a good idea to scan for variables again, until no variables are discovered. Alternative approaches possible.

lukasjarosch commented 1 year ago

Additionally, this is even more confusing if calls are involved.