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-1678 - Add show_diff attribute to concat and concat::fragment defined types #368

Merged
merged 1 commit into from
Nov 18, 2015

Conversation

jdkindy
Copy link

@jdkindy jdkindy commented Sep 18, 2015

Add show_diff to concat and concat::fragment types.

@HelenCampbell
Copy link
Contributor

Hi,
Thank you for your work with this so far, this seems like a sensible addition to this module. However you would need to have all unit tests passing for us to have a look at this properly.

@jdkindy
Copy link
Author

jdkindy commented Sep 21, 2015

@HelenCampbell - I fixed the tests. Please take a look to see if there is anything else I need to fix.

@jdkindy
Copy link
Author

jdkindy commented Sep 21, 2015

Found and removed a whitespace change.

@jdkindy
Copy link
Author

jdkindy commented Oct 14, 2015

@HelenCampbell Do I need to submit a new pull request?

@@ -16,6 +16,7 @@ group :development, :unit_tests do
gem 'simplecov', :require => false
gem 'puppet_facts', :require => false
gem 'json', :require => false
gem 'metadata-json-lint', :require => false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this not moduleynced?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know what is meant by 'moduleynced'. I had to add that line in order to get the tests to pass on my local box.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed line locally and retested successfully, so removed line from the commit. Tests are successful.

@bmjen
Copy link
Contributor

bmjen commented Oct 28, 2015

@jdkindy I think a show_diff param would be quite useful for concat, however I am not a fan of adding the corresponding param to the concat::fragment, since the fragment files themselves are supposed to be ingredients to the resulting file vs independently managed file resources. Also, when we do reintroduce concat as a native type, the utility of having a show_diff on fragments will become obsolete.

@bmjen bmjen removed the tests-fail label Oct 28, 2015
@jdkindy
Copy link
Author

jdkindy commented Oct 28, 2015

@bmjen The reason for adding the show_diff parameter to concat::fragment resources is that diffs of the file resources defined as part of concat::fragment are included in the reports. Leaving show_diff out of concat::fragment allows secrets to appear in reports. Puppet runs show diffs of both the resultant concat file resource as well as diffs of the concat::fragment file resources.

@Vincent--
Copy link

I'd like to have this feature as well (for the same "secret" reason ;-) )
Thanks @jdkindy for the patch !

@bmjen
Copy link
Contributor

bmjen commented Nov 12, 2015

@jdkindy I think I understand the reticence towards show_diff and how it corresponds to the fragment files. However, I am still against the exposure of the show_diff param in the fragment resource, as fragments should be internal resources only. I think an appropriate middle ground would be to remove the show_diff param from the fragment.. and force the fragment file to show_diff=false all the time.

Thoughts?

@Vincent--
Copy link

I totally agree ! :-)

@jdkindy
Copy link
Author

jdkindy commented Nov 13, 2015

@bmjen I intended for the users to be able to choose fragments if they wished. However, if the plan is for concat to move to a native type and the concat::fragment type will not have a show_diff, I am ok with setting it to false for all concat::fragment resources.

$owner = undef,
$group = undef,
$backup = undef
$content = undef,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alignment here needs to be fixed since show_diff was removed.

@bmjen
Copy link
Contributor

bmjen commented Nov 17, 2015

Thanks for the update @jdkindy! A few more comments and we're set for merge!

@jdkindy
Copy link
Author

jdkindy commented Nov 18, 2015

@bmjen I think this commit takes care of all of the issues with the previous one.

@bmjen
Copy link
Contributor

bmjen commented Nov 18, 2015

Awesome. Thanks for all the work @jdkindy !

bmjen added a commit that referenced this pull request Nov 18, 2015
MODULES-1678 - Add show_diff attribute to concat and concat::fragment defined types
@bmjen bmjen merged commit 685cc74 into puppetlabs:master Nov 18, 2015
@Vincent--
Copy link

Thks @jdkindy :-)

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.

6 participants