-
Notifications
You must be signed in to change notification settings - Fork 66
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
(maint) Avoid mutating frozen string #102
Conversation
Avoid risk of RunTime errors related to mutating frozen strings by not modifying puppet_collection in place.
@@ -362,7 +362,8 @@ def install_puppet_agent_on(hosts, opts = {}) | |||
opts[:puppet_agent_version] ||= opts[:version] #backwards compatability with old parameter name | |||
opts[:puppet_collection] ||= puppet_collection_for(:puppet_agent, opts[:puppet_agent_version]) || 'pc1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should puppet_collection_for
return a downcased collection instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair question, but since there is some time pressure due to caused failures from the earlier change & what you're suggesting is functionally equivalent, I'm going to move forward with merging & releasing this change as-is.
Please propose a new PR with your suggested change if you'd like to pursue this further in a later release.
Hi people. I tested this fix and can confirm that it works for the Vox Pupuli org. I also suggest adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
failure unrelated to change, lgtm 👍
Avoid risk of RunTime errors related to mutating frozen strings by not modifying puppet_collection in place.