[bitnami/pgbouncer] Remove "Loading custom scripts" log line because it can be misleading #82762
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
The function
pgbouncer_custom_init_scripts()
starts with the logLoading custom scripts...
. Unfortunately though, There are many use cases where nothing will get loaded or if you call it again (which was in out case), it will already have dropped the.user_scripts_initialized
file and will refuse to load the init scripts again.My suggestion here is to just leave the
info "Loading user's custom files from $PGBOUNCER_INITSCRIPTS_DIR ..."
as the message when it actually is loading the custom init scripts.Benefits
Less confusing log on subsequent runs of the method.
Possible drawbacks
If you call the function and it does not run the init scripts, you do not get any log messages.
Applicable issues
It is misleading to the user using the container and building on top of its logic.
Additional information
The other option here will be to log in the else of the
if
case so we log that init scripts were in fact skipped or not found so that both the positive and negative case get logs.