Skip to content

stdlib::to_yaml add sort_keys option#1469

Open
jcpunk wants to merge 1 commit intopuppetlabs:mainfrom
jcpunk:sorted-yaml
Open

stdlib::to_yaml add sort_keys option#1469
jcpunk wants to merge 1 commit intopuppetlabs:mainfrom
jcpunk:sorted-yaml

Conversation

@jcpunk
Copy link
Copy Markdown
Contributor

@jcpunk jcpunk commented Apr 17, 2026

Summary

This will help ensure generated yaml has a stable output.

Additional Context

When using concat's ability to merge yaml together, I've seen unstable output. This provides an optional parameter that can be used to ensure all keys are in a deterministic order.

Related Issues (if any)

Mention any related issues or pull requests.

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

This will help ensure generated yaml has a stable output.

Signed-off-by: Patrick Riehecky <riehecky@fnal.gov>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant