Skip to content

fix(dataprotection): ignore target PVC deletion during restore - #10819

Merged
leon-ape merged 8 commits into
mainfrom
bugfix/stop-target-pvc-delete-cleanup
Aug 31, 2026
Merged

fix(dataprotection): ignore target PVC deletion during restore#10819
leon-ape merged 8 commits into
mainfrom
bugfix/stop-target-pvc-delete-cleanup

Conversation

@leon-ape

@leon-ape leon-ape commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Problem

A target PVC deletion is not a restore cancellation signal. VolumePopulator must not introduce a separate cleanup, wait, condition, event, or requeue path based on DeletionTimestamp.

Changes

  • remove the target-PVC-deleting cleanup path introduced in chore(dataprotection): move volume restore execution to restore controller #10630
  • remove deletion-specific PVC condition, reason, warning event, and requeue behavior
  • process a target PVC retained by the DP finalizer through the ordinary restore state machine, regardless of DeletionTimestamp
  • preserve the existing failure-first and successful resource-release behavior

This PR intentionally does not add Cluster/Component lifecycle handling. Parent deletion cancellation is handled separately.

Ownership

VolumePopulator never deletes the target PVC. It only owns its DP finalizer and restore side effects.

Tests

  • deleting and non-deleting target PVCs with the DP finalizer produce the same ordinary restore result
  • full controllers/dataprotection package passes

@leon-ape
leon-ape requested review from a team, ldming and wangyelei as code owners August 28, 2026 09:24
@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/M Denotes a PR that changes 30-99 lines. label Aug 28, 2026
@leon-ape leon-ape changed the title fix(dataprotection): block direct target PVC cleanup fix(dataprotection): wait when restore target PVC is deleting Aug 28, 2026
@leon-ape leon-ape added the nopick Not auto cherry-pick when PR merged label Aug 28, 2026
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.69%. Comparing base (8295e5e) to head (adaef79).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10819      +/-   ##
==========================================
+ Coverage   65.60%   65.69%   +0.08%     
==========================================
  Files         510      510              
  Lines       64408    64400       -8     
==========================================
+ Hits        42256    42306      +50     
+ Misses      18383    18355      -28     
+ Partials     3769     3739      -30     
Flag Coverage Δ
unittests 65.69% <ø> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions Bot added size/L Denotes a PR that changes 100-499 lines. and removed size/M Denotes a PR that changes 30-99 lines. labels Aug 31, 2026
@leon-ape leon-ape changed the title fix(dataprotection): wait when restore target PVC is deleting fix(dataprotection): guard unfinished restore target PVC deletion Aug 31, 2026
@github-actions github-actions Bot added size/M Denotes a PR that changes 30-99 lines. and removed size/L Denotes a PR that changes 100-499 lines. labels Aug 31, 2026
@leon-ape leon-ape changed the title fix(dataprotection): guard unfinished restore target PVC deletion fix(dataprotection): ignore target PVC deletion during restore Aug 31, 2026
@leon-ape

Copy link
Copy Markdown
Collaborator Author

/approve

@apecloud-bot apecloud-bot added the approved PR Approved Test label Aug 31, 2026
@leon-ape
leon-ape merged commit 6d7e10c into main Aug 31, 2026
37 of 39 checks passed
@leon-ape
leon-ape deleted the bugfix/stop-target-pvc-delete-cleanup branch August 31, 2026 07:13
@github-actions github-actions Bot added this to the Release 1.2.0 milestone Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR Approved Test nopick Not auto cherry-pick when PR merged size/M Denotes a PR that changes 30-99 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants