Skip to content

fix: clean up deleting restore PVCs - #10604

Closed
weicao wants to merge 1 commit into
mainfrom
clara/task139-pvc-delete-finalizer
Closed

fix: clean up deleting restore PVCs#10604
weicao wants to merge 1 commit into
mainfrom
clara/task139-pvc-delete-finalizer

Conversation

@weicao

@weicao weicao commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • handle a deleting restore PVC before validating its source Backup
  • keep the target PVC finalizer while owned populate Jobs or the helper PVC still exist
  • release the target finalizer only after a fresh reconcile confirms the dependents are absent
  • preserve the existing non-deletion cleanup behavior for bound PVC completion

Tests

  • go test ./controllers/dataprotection -run '^TestSyncPVCDeletion' -count=1
  • go test ./controllers/dataprotection -run '^Test(SyncPVCDeletion|CompleteBoundPVC|ProvisionOnly)' -count=1
  • KUBEBUILDER_ASSETS='<envtest 1.26.1 assets>' go test ./controllers/dataprotection -count=1
  • git diff HEAD^..HEAD --check

The PR remains draft until the patch image is validated against the focused restore cleanup scenario.

Handle deletion before source validation so a missing backup cannot strand the data protection finalizer. Keep the target finalizer until owned populate jobs and the helper PVC are confirmed absent on a fresh reconcile.
@apecloud-bot

Copy link
Copy Markdown
Collaborator

Auto Cherry-pick Instructions

Usage:
  - /nopick: Not auto cherry-pick when PR merged.
  - /pick: release-x.x [release-x.x]: Auto cherry-pick to the specified branch when PR merged.

Example:
  - /nopick
  - /pick release-1.1

CLA Recheck Instructions

Usage:
  - /recheck-cla: Trigger a re-check of CLA status for this pull request.
Example:
  - /recheck-cla

@github-actions github-actions Bot added the size/L Denotes a PR that changes 100-499 lines. label Jul 10, 2026
@apecloud-bot

Copy link
Copy Markdown
Collaborator

This branch name is not following the standards: feature/|bugfix/|release/|hotfix/|support/|releasing/|dependabot/

@weicao weicao closed this Jul 10, 2026
@weicao
weicao deleted the clara/task139-pvc-delete-finalizer branch July 10, 2026 17:56
@github-actions github-actions Bot added this to the Release 1.2.0 milestone Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants