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

(SUP-4666) Pe_databases: pg_repack enable debug mode #126

Conversation

Aaronoftheages
Copy link
Contributor

Implementation of the new conditional logic to enable DEBUG and echo by default in pg-repack.pp, this is set by two new variables which by default are configured to:

Enum['INFO','NOTICE','WARNING', 'ERROR', 'LOG', 'FATAL','PANIC','DEBUG'] $repack_run_level='DEBUG', Boolean $enable_echo = true,

For configuration of $repack_run_level, change DEBUG too one of the stored options:
Enum['INFO','NOTICE','WARNING', 'ERROR', 'LOG', 'FATAL','PANIC','DEBUG'] $repack_run_level=<option> and receive the relevant output in .service files

And to disable echo set $enable_echo to false

Copy link
Contributor

@m0dular m0dular left a comment

Choose a reason for hiding this comment

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

Couple of nitpicks in the code, but the main issue is the unit tests are failing. This one needs to be updated to include the new defaults for the command. https://github.com/puppetlabs/puppetlabs-pe_databases/pull/126/files#annotation_17411960268

manifests/pg_repack.pp Outdated Show resolved Hide resolved
manifests/pg_repack.pp Outdated Show resolved Hide resolved
@Aaronoftheages Aaronoftheages force-pushed the SUP-4666_pg_repack_enable_debug_mode branch from f73bb78 to 1f8389f Compare January 30, 2024 16:30
@m0dular m0dular force-pushed the SUP-4666_pg_repack_enable_debug_mode branch from 8b08ab3 to 931208b Compare January 30, 2024 21:26
@m0dular
Copy link
Contributor

m0dular commented Jan 30, 2024

I wanted to add tests to cover configuring the new parameters and ended up figuring out how to do this with a new hierarchy specific to rspec tests. @Aaronoftheages if you need to make any more changes here, do a git pull --rebase to pick up the commits I pushed.

@Aaronoftheages
Copy link
Contributor Author

I wanted to add tests to cover configuring the new parameters and ended up figuring out how to do this with a new hierarchy specific to rspec tests. @Aaronoftheages if you need to make any more changes here, do a git pull --rebase to pick up the commits I pushed.

I'll pull these down now, and rebase it all together Adrian.

…ho WITH acceptance test modifications. Add rspec specific hierarchy and tests to cover new repack log parameters.

This commit uses the new rspec specific hieradata to change the
parameters to the pg_repack class and tests them.
@MartyEwings MartyEwings dismissed m0dular’s stale review January 31, 2024 11:41

this has been addressed

@MartyEwings MartyEwings merged commit a3a5d9b into puppetlabs:main Jan 31, 2024
29 of 31 checks passed
@Aaronoftheages Aaronoftheages deleted the SUP-4666_pg_repack_enable_debug_mode branch October 2, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants