Skip to content

K8SPS-704 use RestoreBackupSource instead of PerconaServerMySQLBackupStatus - #1507

Merged
nmarukovich merged 8 commits into
mainfrom
K8SPS-704
Sep 1, 2026
Merged

K8SPS-704 use RestoreBackupSource instead of PerconaServerMySQLBackupStatus#1507
nmarukovich merged 8 commits into
mainfrom
K8SPS-704

Conversation

@nmarukovich

Copy link
Copy Markdown
Contributor

CHANGE DESCRIPTION

Problem:
Short explanation of the problem.
PerconaServerMySQLRestoreSpec.BackupSource is typed as PerconaServerMySQLBackupStatus. A status struct used as spec exposes fields the user can set but that do nothing

Cause:
Short explanation of the root cause of the issue if applicable.

Solution:
BackupSource now has its own type with the two fields that matter:

type RestoreBackupSource struct {
	Destination BackupDestination  `json:"destination,omitempty"`
	Storage     *BackupStorageSpec `json:"storage,omitempty"`
}

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 PS 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 Aug 25, 2026
@nmarukovich
nmarukovich marked this pull request as ready for review August 25, 2026 15:47
apiv1 "github.com/percona/percona-server-mysql-operator/api/v1"
)

func TestGetBackupFromBackupSource(t *testing.T) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please add a case for all supported storages

@egegunes egegunes added this to the v1.3.0 milestone Aug 27, 2026

@oksana-grishchenko oksana-grishchenko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note:

this PRs

add new fields to PerconaServerMySQLBackupStatus which currently are propagated to the restore as well because we use the same struct. So depending on the order of merging, your PR or the backup-size PR would need to adopt the changes.

@JNKPercona

Copy link
Copy Markdown
Collaborator
Test Name Result Time
async-ignore-annotations-8-4 passed 00:00:00
async-global-metadata-8-4 passed 00:00:00
async-upgrade-8-0 passed 00:00:00
async-upgrade-8-4 passed 00:00:00
auto-config-8-4 passed 00:00:00
config-8-4 passed 00:00:00
config-router-8-0 passed 00:00:00
config-router-8-4 passed 00:00:00
custom-users-8-4 passed 00:00:00
demand-backup-8-0 passed 00:00:00
demand-backup-8-4 passed 00:00:00
gr-pitr-minio-8-4 passed 00:00:00
gr-pitr-encrypted-minio-8-4 passed 00:00:00
gr-pitr-one-pod-8-4 passed 00:00:00
async-pitr-minio-8-4 passed 00:00:00
demand-backup-cloud-8-4 passed 00:00:00
demand-backup-retry-8-4 passed 00:00:00
demand-backup-incremental-8-0 passed 00:00:00
demand-backup-incremental-8-4 passed 00:00:00
async-data-at-rest-encryption-8-0 passed 00:00:00
async-data-at-rest-encryption-8-4 passed 00:00:00
gr-cross-cluster-8-0 passed 00:00:00
gr-cross-cluster-8-4 passed 00:00:00
gr-cross-cluster-backup-8-0 passed 00:00:00
gr-cross-cluster-backup-8-4 passed 00:27:21
gr-global-metadata-8-4 passed 00:00:00
gr-data-at-rest-encryption-8-0 passed 00:00:00
gr-data-at-rest-encryption-8-4 passed 00:00:00
gr-demand-backup-8-4 passed 00:00:00
gr-demand-backup-cloud-8-4 passed 00:00:00
gr-demand-backup-haproxy-8-4 passed 00:00:00
gr-demand-backup-incremental-8-0 passed 00:00:00
gr-demand-backup-incremental-8-4 passed 00:00:00
gr-demand-backup-incremental-compressed-8-0 passed 00:00:00
gr-demand-backup-incremental-compressed-8-4 passed 00:00:00
gr-demand-backup-incremental-encrypted-8-0 passed 00:00:00
gr-demand-backup-incremental-encrypted-8-4 passed 00:00:00
gr-finalizer-8-4 passed 00:00:00
gr-haproxy-8-0 passed 00:00:00
gr-haproxy-8-4 passed 00:00:00
gr-ignore-annotations-8-4 passed 00:00:00
gr-init-deploy-8-0 passed 00:00:00
gr-init-deploy-8-4 passed 00:00:00
gr-one-pod-8-4 passed 00:00:00
gr-recreate-8-4 passed 00:00:00
gr-scaling-8-4 passed 00:00:00
gr-scheduled-backup-8-4 passed 00:00:00
gr-scheduled-backup-incremental-8-4 passed 00:00:00
gr-security-context-8-4 passed 00:00:00
gr-self-healing-8-4 passed 00:00:00
gr-tls-cert-manager-8-4 passed 00:00:00
gr-users-8-4 passed 00:00:00
gr-upgrade-8-0 passed 00:00:00
gr-upgrade-8-4 passed 00:00:00
haproxy-8-0 passed 00:00:00
haproxy-8-4 passed 00:00:00
init-deploy-8-0 passed 00:00:00
init-deploy-8-4 passed 00:00:00
limits-8-4 passed 00:00:00
monitoring-8-4 passed 00:00:00
one-pod-8-0 passed 00:00:00
one-pod-8-4 passed 00:00:00
operator-self-healing-8-4 passed 00:00:00
pvc-auto-resize-8-4 passed 00:00:00
pvc-resize-8-4 passed 00:00:00
recreate-8-4 passed 00:00:00
scaling-8-4 passed 00:00:00
scheduled-backup-8-0 passed 00:00:00
scheduled-backup-8-4 passed 00:00:00
scheduled-backup-incremental-8-0 passed 00:00:00
scheduled-backup-incremental-8-4 passed 00:00:00
service-per-pod-8-4 passed 00:00:00
sidecars-8-4 passed 00:00:00
smart-update-8-4 passed 00:00:00
storage-8-4 passed 00:00:00
switch-cluster-type-8-4 passed 00:00:00
telemetry-8-4 passed 00:00:00
tls-cert-manager-8-4 passed 00:00:00
users-8-0 passed 00:00:00
users-8-4 passed 00:00:00
version-service-8-4 passed 00:00:00
Summary Value
Tests Run 81/81
Job Duration 00:48:07
Total Test Time 00:27:21

commit: 8cd57e3
image: perconalab/percona-server-mysql-operator:PR-1507-8cd57e35

@nmarukovich
nmarukovich merged commit 4f11dc1 into main Sep 1, 2026
16 checks passed
@nmarukovich
nmarukovich deleted the K8SPS-704 branch September 1, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL 500-999 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants