Skip to content

Conversation

@nmarukovich
Copy link
Contributor

@nmarukovich nmarukovich commented Nov 6, 2025

K8SPXC-1431 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:
Short explanation of the problem.

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?
  • 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 PXC 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 Nov 6, 2025
Comment on lines +11 to +12
local backup_name="$1"
local finalizer_flag="off"
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
local backup_name="$1"
local finalizer_flag="off"
local backup_name="$1"
local finalizer_flag="off"

Comment on lines +14 to +18
desc "Checking finalizers on backup $backup_name"
# Check if pxc-backup has the finalizer "percona.com/delete-backup"
if kubectl get pxc-backup "$backup_name" -o jsonpath='{.metadata.finalizers}' | grep -q "percona.com/delete-backup"; then
finalizer_flag="on"
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
desc "Checking finalizers on backup $backup_name"
# Check if pxc-backup has the finalizer "percona.com/delete-backup"
if kubectl get pxc-backup "$backup_name" -o jsonpath='{.metadata.finalizers}' | grep -q "percona.com/delete-backup"; then
finalizer_flag="on"
fi
desc "Checking finalizers on backup $backup_name"
# Check if pxc-backup has the finalizer "percona.com/delete-backup"
if kubectl get pxc-backup "$backup_name" -o jsonpath='{.metadata.finalizers}' | grep -q "percona.com/delete-backup"; then
finalizer_flag="on"
fi

finalizer_flag="on"
fi

echo "Finalizer is $finalizer_flag"
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
echo "Finalizer is $finalizer_flag"
echo "Finalizer is $finalizer_flag"

Comment on lines +22 to +23
echo "Looking for PVCs containing '$backup_name'"
pvc=$(kubectl get pvc --no-headers -o custom-columns=":metadata.name" | grep "$backup_name")
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
echo "Looking for PVCs containing '$backup_name'"
pvc=$(kubectl get pvc --no-headers -o custom-columns=":metadata.name" | grep "$backup_name")
echo "Looking for PVCs containing '$backup_name'"
pvc=$(kubectl get pvc --no-headers -o custom-columns=":metadata.name" | grep "$backup_name")

Comment on lines +25 to +28
if [[ -z "$pvc" ]]; then
echo "No PVCs found with substring '$backup_name'"
return 1
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
if [[ -z "$pvc" ]]; then
echo "No PVCs found with substring '$backup_name'"
return 1
fi
if [[ -z $pvc ]]; then
echo "No PVCs found with substring '$backup_name'"
return 1
fi

apply_config "$pxcClientFile"
if [[ $IMAGE_PXC =~ 5\.7 ]] && [[ $cluster == 'demand-backup' || $cluster == 'demand-backup-cloud' ]]; then
cat_config "$config" \
cat_config "$config"\
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
cat_config "$config"\
cat_config "$config" \

}

check_pvc_md5() {
local backup_name="$1"
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
local backup_name="$1"
local backup_name="$1"

}

get_pvc_name_for_backup() {
local backup_name="$1"
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
local backup_name="$1"
local backup_name="$1"

fi
local pvc_name="${destination#pvc/}"

echo "$pvc_name"
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
echo "$pvc_name"
echo "$pvc_name"


echo "$pvc_name"
}

Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change

Comment on lines +1802 to +1807
local destination=$(kubectl_bin get pxc-backup "$backup_name" -o jsonpath='{.status.destination}')
if [[ -z "$destination" ]]; then
echo "No destination found in backup $backup_name"
return 1
fi
local pvc_name="${destination#pvc/}"
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
local destination=$(kubectl_bin get pxc-backup "$backup_name" -o jsonpath='{.status.destination}')
if [[ -z "$destination" ]]; then
echo "No destination found in backup $backup_name"
return 1
fi
local pvc_name="${destination#pvc/}"
local destination=$(kubectl_bin get pxc-backup "$backup_name" -o jsonpath='{.status.destination}')
if [[ -z $destination ]]; then
echo "No destination found in backup $backup_name"
return 1
fi
local pvc_name="${destination#pvc/}"

Comment on lines +52 to +55
cat "$file" \
| $sed -E "s#(claimName: xb-on-demand-backup-pvc)(-[0-9]{14}-[a-f0-9]{8})?#claimName: $pvc_name#" \
> "${file}.patched"
mv "${file}.patched" "$file"
Copy link
Contributor

Choose a reason for hiding this comment

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

[shfmt] reported by reviewdog 🐶

Suggested change
cat "$file" \
| $sed -E "s#(claimName: xb-on-demand-backup-pvc)(-[0-9]{14}-[a-f0-9]{8})?#claimName: $pvc_name#" \
> "${file}.patched"
mv "${file}.patched" "$file"
cat "$file" \
| $sed -E "s#(claimName: xb-on-demand-backup-pvc)(-[0-9]{14}-[a-f0-9]{8})?#claimName: $pvc_name#" \
>"${file}.patched"
mv "${file}.patched" "$file"

@JNKPercona
Copy link
Collaborator

Test Name Result Time
affinity-8-0 passed 00:06:00
auto-tuning-8-0 passed 00:18:58
backup-storage-tls-8-0 passed 00:22:50
cross-site-8-0 passed 00:35:07
custom-users-8-0 passed 00:13:05
demand-backup-cloud-8-0 failure 01:00:23
demand-backup-encrypted-with-tls-8-0 failure 00:16:57
demand-backup-8-0 passed 00:43:05
demand-backup-flow-control-8-0 passed 00:10:44
demand-backup-parallel-8-0 passed 00:08:51
demand-backup-without-passwords-8-0 passed 00:15:46
haproxy-5-7 passed 00:12:49
haproxy-8-0 passed 00:14:32
init-deploy-5-7 passed 00:16:22
init-deploy-8-0 passed 00:16:50
limits-8-0 passed 00:12:09
monitoring-2-0-8-0 passed 00:22:40
monitoring-pmm3-8-0 passed 00:17:55
one-pod-5-7 passed 00:14:22
one-pod-8-0 passed 00:14:31
pitr-8-0 passed 00:43:18
pitr-gap-errors-8-0 passed 00:56:28
proxy-protocol-8-0 passed 00:09:29
proxysql-sidecar-res-limits-8-0 passed 00:08:46
pvc-resize-5-7 passed 00:16:15
pvc-resize-8-0 passed 00:17:47
recreate-8-0 passed 00:16:56
restore-to-encrypted-cluster-8-0 passed 00:25:33
scaling-proxysql-8-0 passed 00:08:39
scaling-8-0 passed 00:10:41
scheduled-backup-5-7 failure 00:23:34
scheduled-backup-8-0 failure 00:23:17
security-context-8-0 passed 00:26:03
smart-update1-8-0 passed 00:32:59
smart-update2-8-0 passed 00:36:56
storage-8-0 passed 00:10:23
tls-issue-cert-manager-ref-8-0 passed 00:08:48
tls-issue-cert-manager-8-0 passed 00:11:10
tls-issue-self-8-0 passed 00:13:19
upgrade-consistency-8-0 passed 00:10:46
upgrade-haproxy-5-7 passed 00:23:26
upgrade-haproxy-8-0 passed 00:23:30
upgrade-proxysql-5-7 passed 00:13:01
upgrade-proxysql-8-0 passed 00:14:31
users-5-7 passed 00:24:38
users-8-0 passed 00:25:31
validation-hook-8-0 passed 00:01:42
Summary Value
Tests Run 47/47
Job Duration 02:39:31
Total Test Time 15:31:45

commit: b6dbce1
image: perconalab/percona-xtradb-cluster-operator:PR-2232-b6dbce1b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L 100-499 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants