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

[MODULES-10781] Fix defined type defined_with_params() #1122

Conversation

trevor-vaughan
Copy link
Contributor

An edge case was missed previously where calling the
defined_with_params() function from inside a defined type on another
instance of the same defined type would always return a match because it
would match against itself.

This updates the code to ignore itself and also adds a debug line output
for any resource that was matched.

MODULES-10781 #close

An edge case was missed previously where calling the
defined_with_params() function from inside a defined type on another
instance of the same defined type would always return a match because it
would match against itself.

This updates the code to ignore itself and also adds a debug line output
for any resource that was matched.

MODULES-10781 #close
@trevor-vaughan trevor-vaughan requested a review from a team as a code owner August 19, 2020 21:40
@puppet-community-rangefinder
Copy link

defined_with_params is a function

Breaking changes to this file MAY impact these 7 modules (near match):

This module is declared in 318 of 575 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.

@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2020

Codecov Report

Merging #1122 into master will increase coverage by 0.84%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1122      +/-   ##
=========================================
+ Coverage    4.46%   5.31%   +0.84%     
=========================================
  Files         185     185              
  Lines        5224    5273      +49     
=========================================
+ Hits          233     280      +47     
- Misses       4991    4993       +2     
Impacted Files Coverage Δ
lib/puppet/parser/functions/defined_with_params.rb 0.00% <0.00%> (ø)
lib/puppet/parser/functions/has_interface_with.rb 0.00% <0.00%> (-92.31%) ⬇️
lib/puppet/parser/functions/dig44.rb 0.00% <0.00%> (-80.00%) ⬇️
lib/facter/root_home.rb 65.38% <0.00%> (-2.62%) ⬇️
lib/puppet/parser/functions/enclose_ipv6.rb 85.71% <0.00%> (+0.71%) ⬆️
lib/puppet/parser/functions/deprecation.rb 87.50% <0.00%> (+1.78%) ⬆️
lib/puppet/type/file_line.rb 96.36% <0.00%> (+1.81%) ⬆️
lib/facter/facter_dot_d.rb 39.00% <0.00%> (+20.00%) ⬆️
lib/puppet/provider/file_line/ruby.rb 62.62% <0.00%> (+47.47%) ⬆️
lib/puppet/parser/functions/type3x.rb 72.22% <0.00%> (+72.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33ff524...cf7b302. Read the comment docs.

@david22swan
Copy link
Member

david22swan commented Aug 20, 2020

@trevor-vaughan Thanks for your contributions, this looks good to me.
Hope to see more from you in the future.

@david22swan david22swan merged commit 7c1ae25 into puppetlabs:master Aug 20, 2020
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