Skip to content

Conversation

@vprashar2929
Copy link
Collaborator

Replace blocking wait.PollUntilContextTimeout with non-blocking check-and-requeuepattern in Deleter reconciler. This reduces PowerMonitor CR deletion time from5+ minutes to under 30 seconds by allowing Kubernetes GC to run in parallelinstead of sequentially polling for each resource deletion.

Changes:

  • Refactor Deleter to use check-and-requeue instead of blocking polls
  • Remove WaitTimeout field from Deleter (no longer needed)
  • Update Deleter tests for non-blocking behavior
  • Remove 2-minute namespace deletion wait in PowerMonitorInternal cleanup

Replace blocking wait.PollUntilContextTimeout with
non-blocking check-and-requeuepattern in Deleter reconciler.
This reduces PowerMonitor CR deletion time from5+ minutes to
under 30 seconds by allowing Kubernetes GC to run in
parallelinstead of sequentially polling for each resource deletion.

Changes:
- Refactor Deleter to use check-and-requeue instead of blocking polls
- Remove WaitTimeout field from Deleter (no longer needed)
- Update Deleter tests for non-blocking behavior
- Remove 2-minute namespace deletion wait in PowerMonitorInternal cleanup

Signed-off-by: vprashar2929 <[email protected]>
@github-actions github-actions bot added the fix A bug fix label Dec 22, 2025
@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.92%. Comparing base (b442a80) to head (3a53563).

Files with missing lines Patch % Lines
pkg/reconciler/deleter.go 62.50% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #653      +/-   ##
==========================================
+ Coverage   78.89%   78.92%   +0.03%     
==========================================
  Files          11       11              
  Lines        1085     1082       -3     
==========================================
- Hits          856      854       -2     
  Misses        199      199              
+ Partials       30       29       -1     

☔ View full report in Codecov by Sentry.
📢 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.

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

Labels

fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant