Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure LagoInitFile is loaded by a consistent order #472

Open
nvgoldin opened this issue Mar 12, 2017 · 2 comments
Open

Ensure LagoInitFile is loaded by a consistent order #472

nvgoldin opened this issue Mar 12, 2017 · 2 comments

Comments

@nvgoldin
Copy link
Contributor

We use PyYAML which does not ensure any consistent order when loading the file. The natural thing is to use OrderedDict instead.
Existing PR: #346, fails on something that looks like a bug when using both the yaml merge operator and a custom loader which ensures OrderedDict is used.

Recently, I was playing with anymarkup, a python library which also loads YAMLs as OrderedDict, one option is to check if it happens there too, and if not see what we are missing to make it work.

Some inspiration:
http://stackoverflow.com/questions/38110900/constructorerror-with-yaml-load-while-using-ordereddict-that-support-auto-vivifi
http://stackoverflow.com/questions/5121931/in-python-how-can-you-load-yaml-mappings-as-ordereddicts

@gbenhaim
Copy link
Member

Why don't just put the domains \ nets in a list ?

@ifireball
Copy link

Hmm... that is what JJB and Ansible do... but doing that is a backwards-compatible way may be messy...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants