Skip to content

Conversation

pooknull
Copy link
Contributor

@pooknull pooknull commented Feb 12, 2025

K8SPSMDB-1197 Powered by Pull Request Badge

https://perconadev.atlassian.net/browse/K8SPSMDB-1197

DESCRIPTION

Problem:
healthcheck doesn't delete old logs if executed very quickly.

Cause:
lumberjack rotates logs in the separate goroutine. It's not guaranteed to finish and it's not possible to check if it's finished.

Solution:
Replace current version of lumberjack with natefinch/lumberjack#211.

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?
  • Are OpenShift compare files changed for E2E tests (compare/*-oc.yml)?

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 MongoDB version?
  • Does the change support oldest and newest supported Kubernetes version?

@pull-request-size pull-request-size bot added the size/L 100-499 lines label Feb 12, 2025
@pull-request-size pull-request-size bot added size/XXL 1000+ lines and removed size/L 100-499 lines labels Feb 13, 2025
@pooknull pooknull marked this pull request as ready for review February 13, 2025 07:27
"github.com/go-logr/logr"
uzap "go.uber.org/zap"
"go.uber.org/zap/zapcore"
"gopkg.in/natefinch/lumberjack.v2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we use "github.com/percona/percona-server-mongodb-operator/cmd/mongodb-healthcheck/logger/lumberjack"here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed we are replacing the dependency with the local directory. We are good then!

gkech
gkech previously approved these changes Feb 17, 2025
Comment on lines 4 to 6
COPY go.mod go.sum ./
RUN go mod download

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this change? with this we'll need to download modules after a every code change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@egegunes egegunes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we should revert Dockerfile changes

@hors hors added this to the v1.20.0 milestone Feb 25, 2025
@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Feb 25, 2025
@github-actions github-actions bot added the build label Feb 25, 2025
@JNKPercona
Copy link
Collaborator

Test name Status
arbiter passed
balancer passed
custom-replset-name passed
custom-tls passed
custom-users-roles passed
custom-users-roles-sharded passed
cross-site-sharded passed
data-at-rest-encryption passed
data-sharded passed
demand-backup passed
demand-backup-fs passed
demand-backup-eks-credentials-irsa passed
demand-backup-physical passed
demand-backup-physical-sharded passed
demand-backup-sharded passed
expose-sharded passed
ignore-labels-annotations passed
init-deploy passed
finalizer passed
ldap passed
ldap-tls passed
limits passed
liveness passed
mongod-major-upgrade passed
mongod-major-upgrade-sharded passed
monitoring-2-0 passed
multi-cluster-service passed
non-voting passed
one-pod passed
operator-self-healing-chaos passed
pitr passed
pitr-sharded passed
pitr-physical passed
preinit-updates passed
pvc-resize passed
recover-no-primary passed
replset-overrides passed
rs-shard-migration passed
scaling passed
scheduled-backup passed
security-context passed
self-healing-chaos passed
service-per-pod passed
serviceless-external-nodes passed
smart-update passed
split-horizon passed
stable-resource-version passed
storage passed
tls-issue-cert-manager passed
upgrade passed
upgrade-consistency passed
upgrade-consistency-sharded-tls passed
upgrade-sharded passed
users passed
version-service passed
We run 55 out of 55

commit: b112ff3
image: perconalab/percona-server-mongodb-operator:PR-1826-b112ff35

@hors hors merged commit e6f8cbe into main Feb 28, 2025
13 of 15 checks passed
@hors hors deleted the K8SPSMDB-1197 branch February 28, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build dependencies Pull requests that update a dependency file size/XXL 1000+ lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants