Skip to content

Conversation

@mayankshah1607
Copy link
Member

@mayankshah1607 mayankshah1607 commented Jan 20, 2026

Due to the high volume of requests, we're unable to provide free service for this account. To continue using the service, please upgarde to a paid plan.

CHANGE DESCRIPTION

Problem:
Restore a backup using minio backup source gives the following error:

fields check: one of storageName, backupSource.s3, backupSource.gcs, backupSource.azure or backupSource.filesystem is required", "errorVerbose": "one of storageName, backupSource.s3, backupSource.gcs, backupSource.azure or backupSource.filesystem is required

Cause:
CheckFields() does not consider minio settings

Solution:
Update CheckFields() validation to take Minio configuration into account

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?

Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Signed-off-by: Mayank Shah <mayank.shah@percona.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a validation issue where restoring a backup using MinIO as a backup source incorrectly rejected the operation. The fix adds MinIO to the list of valid backup source types in the validation logic and includes an E2E test to verify the functionality.

Changes:

  • Updated CheckFields() validation to include MinIO as a valid backup source option
  • Added E2E test for restore from MinIO backup source
  • Updated error message to include MinIO in the list of valid options

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
pkg/apis/psmdb/v1/perconaservermongodbrestore_types.go Added Minio nil check to validation and updated error message to include minio option
e2e-tests/demand-backup-physical-minio-native/run Added test case for restore using backupSource with MinIO
e2e-tests/demand-backup-physical-minio-native/conf/restore-backupsource.yml Added restore configuration file for backupSource testing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Mayank Shah <mayank.shah@percona.com>
gkech
gkech previously approved these changes Jan 20, 2026
@egegunes
Copy link
Contributor

@mayankshah1607 getBackup function needs to be updated in restore controller. also copilot is correct about using native minio in e2e test

@mayankshah1607
Copy link
Member Author

mayankshah1607 commented Jan 20, 2026

also copilot is correct about using native minio in e2e test

It is already fixed in a previous commit, that comment is outdated - c1bc4fd

Signed-off-by: Mayank Shah <mayank.shah@percona.com>
nmarukovich
nmarukovich previously approved these changes Jan 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mayankshah1607
Copy link
Member Author

getBackup function needs to be updated in restore controller.

Oh, good catch, the e2e test was passing because it also specified storageName..

Signed-off-by: Mayank Shah <mayank.shah@percona.com>
@JNKPercona
Copy link
Collaborator

Test Name Result Time
arbiter passed 00:00:00
balancer passed 00:00:00
cross-site-sharded passed 00:00:00
custom-replset-name passed 00:00:00
custom-tls passed 00:00:00
custom-users-roles passed 00:00:00
custom-users-roles-sharded passed 00:00:00
data-at-rest-encryption passed 00:00:00
data-sharded passed 00:00:00
demand-backup passed 00:00:00
demand-backup-eks-credentials-irsa passed 00:00:00
demand-backup-fs passed 00:00:00
demand-backup-if-unhealthy passed 00:00:00
demand-backup-incremental passed 00:45:44
demand-backup-incremental-sharded passed 01:02:28
demand-backup-physical-parallel passed 00:00:00
demand-backup-physical-aws passed 00:00:00
demand-backup-physical-azure passed 00:00:00
demand-backup-physical-gcp-s3 passed 00:00:00
demand-backup-physical-gcp-native passed 00:00:00
demand-backup-physical-minio passed 00:00:00
demand-backup-physical-minio-native passed 00:00:00
demand-backup-physical-minio-native-tls passed 00:00:00
demand-backup-physical-sharded-parallel passed 00:00:00
demand-backup-physical-sharded-aws passed 00:00:00
demand-backup-physical-sharded-azure passed 00:00:00
demand-backup-physical-sharded-gcp-native passed 00:00:00
demand-backup-physical-sharded-minio passed 00:00:00
demand-backup-physical-sharded-minio-native passed 00:00:00
demand-backup-sharded passed 00:00:00
disabled-auth passed 00:00:00
expose-sharded passed 00:00:00
finalizer passed 00:00:00
ignore-labels-annotations passed 00:00:00
init-deploy passed 00:00:00
ldap passed 00:00:00
ldap-tls passed 00:00:00
limits passed 00:00:00
liveness passed 00:00:00
mongod-major-upgrade passed 00:00:00
mongod-major-upgrade-sharded passed 00:00:00
monitoring-2-0 passed 00:00:00
monitoring-pmm3 passed 00:00:00
multi-cluster-service passed 00:00:00
multi-storage passed 00:00:00
non-voting-and-hidden passed 00:00:00
one-pod passed 00:00:00
operator-self-healing-chaos passed 00:00:00
pitr passed 00:00:00
pitr-physical passed 00:00:00
pitr-sharded passed 00:00:00
pitr-to-new-cluster passed 00:00:00
pitr-physical-backup-source passed 00:00:00
preinit-updates passed 00:00:00
pvc-resize passed 00:00:00
recover-no-primary passed 00:00:00
replset-overrides passed 00:00:00
replset-remapping passed 00:00:00
replset-remapping-sharded passed 00:00:00
rs-shard-migration passed 00:00:00
scaling passed 00:00:00
scheduled-backup passed 00:00:00
security-context passed 00:00:00
self-healing-chaos passed 00:00:00
service-per-pod passed 00:00:00
serviceless-external-nodes passed 00:00:00
smart-update passed 00:00:00
split-horizon passed 00:00:00
stable-resource-version passed 00:00:00
storage passed 00:00:00
tls-issue-cert-manager passed 00:00:00
unsafe-psa passed 00:00:00
upgrade passed 00:00:00
upgrade-consistency passed 00:00:00
upgrade-consistency-sharded-tls passed 00:00:00
upgrade-sharded passed 00:00:00
upgrade-partial-backup passed 00:00:00
users passed 00:00:00
users-vault passed 00:00:00
version-service passed 00:00:00
Summary Value
Tests Run 80/80
Job Duration 02:10:38
Total Test Time 01:48:12

commit: d97a62a
image: perconalab/percona-server-mongodb-operator:PR-2207-d97a62a5

Copilot AI review requested due to automatic review settings January 20, 2026 21:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@hors hors merged commit 1a6adeb into main Jan 20, 2026
14 checks passed
@hors hors deleted the K8SPSMDB-1520-minio-backup-source branch January 20, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S 10-29 lines tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants