Skip to content

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

K8SPG-532 add logs #1128

wants to merge 8 commits into from

Conversation

nmarukovich
Copy link
Contributor

@nmarukovich nmarukovich commented Apr 14, 2025

K8SPG-532 Powered by Pull Request Badge

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

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PG version?
  • Does the change support oldest and newest supported Kubernetes version?

@hors hors added this to the 2.7.0 milestone Apr 14, 2025
Copy link
Contributor

@gkech gkech left a 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"),
Copy link
Contributor

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?

@nmarukovich nmarukovich requested a review from gkech April 16, 2025 11:32
@JNKPercona
Copy link
Collaborator

Test name Status
backup-enable-disable passed
custom-extensions passed
custom-tls passed
demand-backup passed
finalizers passed
init-deploy passed
monitoring passed
monitoring-pmm3 passed
one-pod passed
operator-self-healing passed
pitr passed
scaling passed
scheduled-backup passed
self-healing passed
sidecars passed
start-from-backup passed
tablespaces passed
telemetry-transfer passed
upgrade-consistency passed
upgrade-minor passed
users passed
We run 21 out of 21

commit: 3bb8e34
image: perconalab/percona-postgresql-operator:PR-1128-3bb8e343c

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.

4 participants