Skip to content

fix(dataprotection): watch VolumePopulator restore dependencies - #10825

Merged
leon-ape merged 13 commits into
mainfrom
bugfix/volume-populator-dependency-watches
Aug 31, 2026
Merged

fix(dataprotection): watch VolumePopulator restore dependencies#10825
leon-ape merged 13 commits into
mainfrom
bugfix/volume-populator-dependency-watches

Conversation

@leon-ape

Copy link
Copy Markdown
Collaborator

Problem

VolumePopulator reads Restore, Component, and Cluster state while reconciling PVCs, but those dependencies were only represented by periodic requeues. Relevant status-only changes therefore did not directly enqueue the waiting restore PVCs.

Changes

  • watch internal execution and postReady Restore resources
  • watch Component phase and post-provision progress
  • watch Cluster phase for deferred postReady restore
  • map only PVCs carrying a complete Cluster restore intent and valid cluster/component identity
  • validate internal Restore identity and exact PVC/Component owner UID before fan-out
  • preserve all existing requeues and restore semantics
  • add the VolumePopulator Cluster/Restore RBAC markers; generated RBAC is unchanged because the aggregate role already grants these reads

This PR only makes dependencies explicit. It does not add deletion handling, mutate watched resources, manage finalizers, or delete anything.

Stack

Tests

  • execution Restore maps only to its exact target PVC
  • postReady Restore maps to non-terminal PVCs, including redirected postReady ownership
  • Component and Cluster fan-out excludes terminal or invalid PVCs
  • status-only dependency updates pass predicates while unrelated updates are filtered
  • full controllers/dataprotection package
  • cmd/dataprotection compile test

@leon-ape
leon-ape requested review from a team, ldming and wangyelei as code owners August 31, 2026 07:00
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.09859% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.63%. Comparing base (adaef79) to head (9b13ca2).

Files with missing lines Patch % Lines
...ers/dataprotection/volumepopulator_dependencies.go 82.35% 17 Missing and 7 partials ⚠️
Additional details and impacted files
@@                            Coverage Diff                            @@
##           bugfix/stop-target-pvc-delete-cleanup   #10825      +/-   ##
=========================================================================
+ Coverage                                  65.60%   65.63%   +0.03%     
=========================================================================
  Files                                        510      511       +1     
  Lines                                      64400    64542     +142     
=========================================================================
+ Hits                                       42249    42362     +113     
- Misses                                     18395    18407      +12     
- Partials                                    3756     3773      +17     
Flag Coverage Δ
unittests 65.63% <83.09%> (+0.03%) ⬆️

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.

Base automatically changed from bugfix/stop-target-pvc-delete-cleanup to main August 31, 2026 07:13
@github-actions github-actions Bot added the size/L Denotes a PR that changes 100-499 lines. label 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 49f14a1 into main Aug 31, 2026
35 checks passed
@leon-ape
leon-ape deleted the bugfix/volume-populator-dependency-watches branch August 31, 2026 08:25
@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/L Denotes a PR that changes 100-499 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants