Skip to content

remove error in log message for PostgresUserReconciler.newSecretForCR#310

Open
xavi-clovr wants to merge 2 commits intomovetokube:masterfrom
xavi-clovr:fix/remove-verbosal-error-in-newSecretForCR
Open

remove error in log message for PostgresUserReconciler.newSecretForCR#310
xavi-clovr wants to merge 2 commits intomovetokube:masterfrom
xavi-clovr:fix/remove-verbosal-error-in-newSecretForCR

Conversation

@xavi-clovr
Copy link
Copy Markdown

@xavi-clovr xavi-clovr commented Mar 10, 2026

The newSecretForCR for the PostgresUserReconciler is setting an error in case the port is not defined.

reqLogger.Error(err, fmt.Sprintf("failed to parse host and port from: '%s', using default port 5432", r.pgHost))

In the end this is not an error, specially cause the code sets it to the default one by itself. However it's sending a log error with the whole stack trace of the err being super verbose and being confusing.
A recommendation would be to set it maximum as a warning or log and specially not sending the whole stack trace of the err.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants