Skip to content

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

Closed
komapa wants to merge 1 commit intobitnami:mainfrom
komapa:pgbouncer_custom_init_scripts
Closed

[bitnami/pgbouncer] Remove "Loading custom scripts" log line because it can be misleading#82762
komapa wants to merge 1 commit intobitnami:mainfrom
komapa:pgbouncer_custom_init_scripts

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?

@github-actions
Copy link

This Pull Request has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thank you for your contribution.

@github-actions github-actions bot added the stale 15 days without activity label Jul 16, 2025
@github-actions
Copy link

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Pull Request. Do not hesitate to reopen it later if necessary.

@bitnami-bot bitnami-bot added stale 15 days without activity and removed stale 15 days without activity labels Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pgbouncer solved stale 15 days without activity triage Triage is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants