re-add support for loading aliases in yaml files#1362
Merged
b4ldr merged 1 commit intopuppetlabs:mainfrom Jun 1, 2023
Merged
Conversation
loadyaml is a functionBreaking changes to this file MAY impact these 2 modules (near match):This module is declared in 318 of 580 indexed public
|
smortex
reviewed
May 30, 2023
Collaborator
smortex
left a comment
There was a problem hiding this comment.
Looks reasonable. Can you please fix the style issues spotted by rubocop and visible on the "Files changed" tab?
b4ldr
reviewed
May 31, 2023
Collaborator
b4ldr
left a comment
There was a problem hiding this comment.
+1 lgtm once rubocop fixed
484e386 to
e8acae9
Compare
Contributor
Author
e8acae9 to
783a5ef
Compare
b4ldr
reviewed
May 31, 2023
Ruby 3.1 includes Psych 4.0 which no longer loads aliases by default. Since aliases are part of the yaml spec, it seems sensible to re-add support. We need to read the file first to be compatible with ruby2.7 which does not support the aliases option on YAML.load_file. Use temp files in rspec tests to avoid needing to mock read.
783a5ef to
c118a50
Compare
b4ldr
approved these changes
Jun 1, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ruby 3.1 includes Psych 4.0 which no longer loads aliases by default. Since aliases are part of the yaml spec, it seems sensible to re-add support.