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

(maint) Avoid mutating frozen string #102

Merged
merged 1 commit into from
Jan 28, 2019

Conversation

donoghuc
Copy link
Contributor

Avoid risk of RunTime errors related to mutating frozen strings by not modifying puppet_collection in place.

Avoid risk of RunTime errors related to mutating frozen strings by not modifying puppet_collection in place.
@donoghuc
Copy link
Contributor Author

@treydock
Copy link
Contributor

@@ -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'
Copy link
Contributor

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?

Copy link
Contributor

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.

@bastelfreak
Copy link
Contributor

Hi people. I tested this fix and can confirm that it works for the Vox Pupuli org. I also suggest adding # frozen_string_literal: true to the file header.

Copy link
Contributor

@kevpl kevpl left a 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 👍

@kevpl kevpl merged commit cf10998 into puppetlabs:master Jan 28, 2019
@donoghuc donoghuc deleted the immutable-string branch January 28, 2019 17:02
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.

5 participants