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

(PIE-296) Add option to dynamically calculate the 'reports' setting #49

Merged
merged 1 commit into from
Jul 10, 2020

Conversation

ekinanp
Copy link
Contributor

@ekinanp ekinanp commented Jul 9, 2020

This option is enabled when $reports == '' for backwards compatibility.
The option's useful because it no longer requires the user to specify
all of their report processors in the $reports param. This leads to a
better UX especially when the user wants to use another report processor
module because they do not have to update the $reports parameter to
include that module's report processor.

Note that the $reports parameter will eventually be deprecated.

Signed-off-by: Enis Inan enis.inan@puppet.com

@ekinanp ekinanp requested a review from a team as a code owner July 9, 2020 03:25
@puppet-community-rangefinder
Copy link

splunk_hec is a class

that may have no external impact to Forge modules.

This module is declared in 2 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.

@ekinanp
Copy link
Contributor Author

ekinanp commented Jul 9, 2020

@gsparks Do I need to update any docs with these changes? If so, could you point me to them?

@@ -29,12 +29,37 @@
) {

if $enable_reports {
if $reports != '' {
$reports_setting = $reports
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we add a deprecation warning here re: the $reports parameter? @bmjen

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, let's go ahead and add the warning.

@gsparks
Copy link
Contributor

gsparks commented Jul 10, 2020

We should update the README, https://github.com/puppetlabs/puppetlabs-splunk_hec/blob/v0.8.1/docs/custom_installation.md, and the forge getting started guide with the new steps. I'll ask Nik if we can update the getting started guide.

@gsparks
Copy link
Contributor

gsparks commented Jul 10, 2020

If I'm understanding this right the report processor will now automatically be installed in the PE console when the module is installed rather than having to manually add the splunk_hec class under the PE master. The open source installation steps should be the same except now you don't have to manually list splunk_hec. Do I have that right?

@ekinanp
Copy link
Contributor Author

ekinanp commented Jul 10, 2020

@gsparks Install instructions are the same, the only difference is that if you specify $reports == '' and $enable_reports is true, then splunk_hec will automatically be added to your existing report processors ('' means "Calculate the report setting for me." Reason is backwards compatibility -- preserve existing default behavior of puppetdb,splunk_hec when $reports isn't specified).

The report processor isn't an open source feature b/c it uses the pe_ini_setting (PE-only) resource. We can make it open source if we change it to ini_setting, but that introduces a dependency to the inifile module. So, open source install/features remain unchanged.

@ekinanp
Copy link
Contributor Author

ekinanp commented Jul 10, 2020

@gsparks Nevermind my comment about reports being a PE-only feature. Looks like having the module set up puppet.conf with the splunk_hec processor is PE-only; people can avoid that by just doing the puppet.conf config themselves.

This option is enabled when $reports == '' for backwards compatibility.
The option's useful because it no longer requires the user to specify
_all_ of their report processors in the $reports param. This leads to a
better UX especially when the user wants to use another report processor
module because they do not have to update the $reports parameter to
include that module's report processor.

Note that the $reports parameter will eventually be deprecated.

Signed-off-by: Enis Inan <enis.inan@puppet.com>
@ekinanp
Copy link
Contributor Author

ekinanp commented Jul 10, 2020

@gsparks Updated.

@gsparks
Copy link
Contributor

gsparks commented Jul 10, 2020

Looks good to me. We can have Barker review if you want, otherwise I'm good to merge.

@ekinanp
Copy link
Contributor Author

ekinanp commented Jul 10, 2020

Yeah I think a review from Barker would be useful.

@gsparks
Copy link
Contributor

gsparks commented Jul 10, 2020

Actually I think he's on leave.

@ekinanp
Copy link
Contributor Author

ekinanp commented Jul 10, 2020

Ok, feel free to merge then. I think change should be OK b/c it doesn't break anything.

@gsparks gsparks merged commit 8c3314e into puppetlabs:master Jul 10, 2020
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.

2 participants