Skip to content

[bitnami/pgbouncer] Remove "Loading custom scripts" log line because it can be misleading #82762

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

komapa
Copy link

@komapa komapa commented Jun 29, 2025

Description of the change

The function pgbouncer_custom_init_scripts() starts with the log Loading 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.

@github-actions github-actions bot added pgbouncer triage Triage is needed labels Jun 29, 2025
@github-actions github-actions bot requested a review from javsalgar June 29, 2025 04:06
@komapa komapa changed the title Remove "Loading custom scripts" because it can be misleading Remove "Loading custom scripts" log line because it can be misleading Jun 29, 2025
@javsalgar javsalgar changed the title Remove "Loading custom scripts" log line because it can be misleading [bitnami/pgbouncer] Remove "Loading custom scripts" log line because it can be misleading Jun 30, 2025
@javsalgar
Copy link
Contributor

Hi!

Thank you so much for the PR! Could you fix the DCO issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pgbouncer triage Triage is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants