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

fix merge nil hashes #708

Merged
merged 1 commit into from
Jun 7, 2021
Merged

fix merge nil hashes #708

merged 1 commit into from
Jun 7, 2021

Conversation

thde
Copy link
Contributor

@thde thde commented Jun 7, 2021

Apparently it can be the case that one of the hashes is nil. I added a nil check in the merge function.

Error: /Stage[main]/xxx::Config/Concat[/etc/file/config.yml]/Concat_file[/etc/file/config.yml]: Failed to generate additional resources us
ing 'eval_generate': undefined method `empty?' for nil:NilClass
/opt/puppetlabs/puppet/cache/lib/puppet/type/concat_file.rb:266:in `nested_merge'
/opt/puppetlabs/puppet/cache/lib/puppet/type/concat_file.rb:232:in `block in should_content'
/opt/puppetlabs/puppet/cache/lib/puppet/type/concat_file.rb:231:in `each'
/opt/puppetlabs/puppet/cache/lib/puppet/type/concat_file.rb:231:in `reduce'
/opt/puppetlabs/puppet/cache/lib/puppet/type/concat_file.rb:231:in `should_content'
/opt/puppetlabs/puppet/cache/lib/puppet/type/concat_file.rb:355:in `eval_generate'

@thde thde requested a review from a team as a code owner June 7, 2021 09:37
@CLAassistant
Copy link

CLAassistant commented Jun 7, 2021

CLA assistant check
All committers have signed the CLA.

@puppet-community-rangefinder
Copy link

concat_file is a type

Breaking changes to this file WILL impact these 1 modules (exact match):
Breaking changes to this file MAY impact these 2 modules (near match):

This module is declared in 170 of 576 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@adrianiurca
Copy link
Contributor

Hey @thde, thank you for your contribution!

kind regards,
@adrianiurca

@adrianiurca adrianiurca merged commit 344fe93 into puppetlabs:main Jun 7, 2021
@adrianiurca adrianiurca self-assigned this Jun 7, 2021
@thde thde deleted the patch-1 branch June 7, 2021 14:08
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.

3 participants