K8SPSMDB-1705: Bump PBM go module to v2.15.0#2411
Draft
egegunes wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the operator to use Percona Backup for MongoDB (PBM) v2.15.0 by bumping the percona-backup-mongodb module and migrating the operator codebase to go.mongodb.org/mongo-driver/v2 APIs.
Changes:
- Bump
github.com/percona/percona-backup-mongodbtov1.8.1-0.20260617122520-9641a911c853(PBM v2.15.0) and migrate togo.mongodb.org/mongo-driver/v2. - Update MongoDB client abstractions, PBM interfaces, mocks, and tests to use new driver v2 types/signatures (e.g.,
bson.Timestamp,options.Lister[...]). - Refresh Go module metadata (
go.mod/go.sum) to reflect new transitive dependencies.
Reviewed changes
Copilot reviewed 15 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/psmdb/mongo/mongo.go | Migrates mongo client wrapper to mongo-driver/v2 and updates connection/options signatures. |
| pkg/psmdb/mongo/models.go | Replaces primitive.* BSON types with mongo-driver/v2 bson.* equivalents in models. |
| pkg/psmdb/mongo/fake/client.go | Updates fake mongo client to mongo-driver/v2 packages and updated option types. |
| pkg/psmdb/backup/pbm.go | Updates PBM interface and PITR timestamp usage to mongo-driver/v2 BSON types. |
| pkg/psmdb/backup/fake/pbm.go | Updates PBM fake to match new PITR timestamp types. |
| pkg/controller/perconaservermongodbrestore/physical.go | Updates BSON import path to mongo-driver/v2. |
| pkg/controller/perconaservermongodbrestore/mock_pbm.go | Regenerates/updates gomock PBM signatures to use mongo-driver/v2 types. |
| pkg/controller/perconaservermongodbrestore/logical.go | Updates PITR restore timestamp type to mongo-driver/v2 bson.Timestamp. |
| pkg/controller/perconaservermongodbbackup/snapshot_test.go | Updates tests to use mongo-driver/v2 BSON timestamp types and gofmt import ordering. |
| pkg/controller/perconaservermongodbbackup/mock_pbm.go | Regenerates/updates gomock PBM signatures to use mongo-driver/v2 types. |
| pkg/controller/perconaservermongodbbackup/backup_test.go | Updates tests to use mongo-driver/v2 BSON timestamp types. |
| pkg/controller/perconaservermongodb/pbm.go | Updates mongo-driver import paths (mongo, bsoncore) to v2. |
| pkg/controller/perconaservermongodb/mgo.go | Updates topology import path and server-selection error detection for driver v2. |
| pkg/controller/perconaservermongodb/finalizers.go | Updates PITR deletion timestamp type to mongo-driver/v2 bson.Timestamp. |
| cmd/mongodb-healthcheck/healthcheck/readiness.go | Updates BSON import path to mongo-driver/v2. |
| cmd/mongodb-healthcheck/healthcheck/liveness.go | Updates BSON import path to mongo-driver/v2. |
| go.mod | Bumps PBM module and switches mongo-driver dependency to v2; updates indirect deps. |
| go.sum | Updates dependency checksums consistent with the module/version bump. |
Files not reviewed (2)
- pkg/controller/perconaservermongodbbackup/mock_pbm.go: Generated file
- pkg/controller/perconaservermongodbrestore/mock_pbm.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
112
to
116
| if err != nil { | ||
| derr := client.Disconnect(tCtx) | ||
| derr := client.Disconnect(ctx) | ||
| if derr != nil { | ||
| log.Error(err, "failed to disconnect") | ||
| } |
Collaborator
commit: 13ee849 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGE DESCRIPTION
This PR bumps PBM go module to v2.15.0.
PBM migrated to mongo-driver v2 since v1 support is deprecated in upstream. We also migrate to v2 with this PR.
CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
compare/*-oc.yml)?Config/Logging/Testability