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

Allow removal of config_entries via main class #1187

Merged
merged 1 commit into from
Sep 24, 2020

Conversation

ekohl
Copy link
Collaborator

@ekohl ekohl commented Aug 10, 2020

This allows removal of config entries by setting their value to undef. In doing so, users can remove values via hiera. One example is checkpoint_segments which was removed in PostgreSQL 9.5, but commonly used as a tuning parameter in older versions.

I'd like some verification on whether undef values really couldn't be passed in for some other use case, but I can't imagine any.

@ekohl ekohl requested a review from a team as a code owner August 10, 2020 10:05
@puppet-community-rangefinder
Copy link

postgresql::server is a class

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

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

@david22swan david22swan changed the base branch from master to main August 11, 2020 16:55
@david22swan
Copy link
Member

@ekohl
Making a quick change to point your PR at the newly default main branch.
Apologies if this is inconvenient in any way.

@sanfrancrisko
Copy link
Contributor

I may circulate your query around the IAC Team @ekohl :

I'd like some verification on whether undef values really couldn't be passed in for some other use case, but I can't imagine any.

But, in principle, it seems OK to me.

It does appear as though the test you added is failing. From what I can see, in this loop, we're receiving:

$entry = fsync
$value = 'off'

...four times. I'm not seeing any of the additional params being evaluated.

@ekohl ekohl force-pushed the remove-config-entries branch from 74aaccf to 2ae19c1 Compare August 31, 2020 13:30
@ekohl
Copy link
Collaborator Author

ekohl commented Aug 31, 2020

It looks like nil isn't mapped to undef in the tests. Trying with :undef to see if that's mapped to undef.

@ekohl
Copy link
Collaborator Author

ekohl commented Aug 31, 2020

Spec tests pass now. The acceptance tests fail, but those look unrelated to my changes.

@daianamezdrea
Copy link
Contributor

Hi @ekohl, indeed, the failures from acceptance tests are not from this PR, thank you for submitting the PR! I'll have a look to see what is happening here. Cheers!

This allows removal of config entries by setting their value to undef.
In doing so, users can remove values via hiera. One example is
checkpoint_segments which was removed in PostgreSQL 9.5, but commonly
used as a tuning parameter in older versions.
Copy link
Contributor

@sanfrancrisko sanfrancrisko left a comment

Choose a reason for hiding this comment

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

Thanks for the enhancement @ekohl and addressing the test failures.

I've rebased with puppetlabs:main to pull in a workaround for the acceptance test failures. I'll merge the PR when the tests complete (and go green).

@sanfrancrisko sanfrancrisko merged commit 648c135 into puppetlabs:main Sep 24, 2020
@ekohl ekohl deleted the remove-config-entries branch September 27, 2020 18:05
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.

5 participants