-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
r10k.yaml is rebuilt (md5sum differs) every Puppet run on ruby 1.8.7 #25
Comments
I am assuming you are on ruby 1.8.7? |
It is: Time to upgrade? |
In Ruby 1.8.7, the order of hash contents is not deterministic and may change between runs --- this results in YAML output with different orderings. In Ruby 1.9.3 and newer, hashes are deterministic with respect to the order in which keys are added to the hash. |
Thanks for the explanation. |
And to actually answer your original question: yes, sorting the hash prior to output should ensure a fixed order. |
@acidprime This affects EL 6 which uses ruby v1.8.7. Since this module supports ruby v1.8.7 could you please take a look at this? |
👍 |
Given that PE 3 runs on Ruby 1.9.3, getting this fixed on 1.8.x might have to fight its way up the TODO list. Anyone feel like submitting a pull request? |
I'd be willing to take a swing at it.. |
@tfhartmann you're my hero |
closing , will reopen if #44 causes issues |
Looks like the contents of r10k.sources are just printing out in random order. One Puppet run will put sources: before basedir:, and the next will reverse it.
Would sorting the hash first keep this from happening?
The text was updated successfully, but these errors were encountered: