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

(GH-154) Ensure values returned from invoke_get_method are recursively sorted in the DSC Base Provider to reduce canonicalization warnings. #160

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

michaeltlombardi
Copy link
Contributor

Prior to this PR, the values returned from DSC via invoke_get_method were left in the order returned by PowerShell. This caused issues during comparisons during canonicalization due to the Ruby (and therefore Puppet) caring about the ordering of arrays and hashes and PowerShell not.

This PR therefore recursively sorts the result before handing it back, ensuring that canonicalized manifest values and values returned from get are both sorted appropriately, ending the errors and mismatches.

Prior to this commit, the values returned from DSC via invoke_get_method were
left in the order returned by PowerShell. This caused issues during comparisons
during canonicalization due to the Ruby (and therefore Puppet) caring about the
ordering of arrays and hashes and PowerShell not.

This commit therefore recursively sorts the result before handing it back,
ensuring that canonicalized manifest values and values returned from get
are both sorted appropriately, ending the errors and mismatches.
@david22swan david22swan merged commit db82c3f into puppetlabs:main Jun 22, 2021
@michaeltlombardi michaeltlombardi deleted the gh-154/main/order-insensitive-hashes branch June 22, 2021 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Canonicalization of resources from Get fails
2 participants