-
Notifications
You must be signed in to change notification settings - Fork 61
K8SPG-532 add logs #1128
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
base: main
Are you sure you want to change the base?
K8SPG-532 add logs #1128
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also improve the INFO log that the Jira ticket mentions?
@@ -1689,6 +1689,12 @@ func (r *Reconciler) reconcilePostgresClusterDataSource(ctx context.Context, | |||
client.ObjectKey{Name: sourceClusterName, Namespace: sourceClusterNamespace}, | |||
sourceCluster); err != nil { | |||
if apierrors.IsNotFound(err) { | |||
log.Error( | |||
errors.New("DataSource refers to a non-existent PostgresCluster"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we creating a new error instead of using the error that occurred and having a msg on the next line that contains the text of this line?
…resql-operator into K8SPG-532_add_logs
commit: 3bb8e34 |
CHANGE DESCRIPTION
Problem:
By default events are not shown on INFO level and can be seen on DEBUG level only.
But this error should be visible on INFO level too.
Cause:
Short explanation of the root cause of the issue if applicable.
Solution:
Short explanation of the solution we are providing with this PR.
CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
Config/Logging/Testability