(PTFE-3162) Fix volume delete for scaleway#712
Conversation
cmeron
left a comment
There was a problem hiding this comment.
Please take a look at my comments but overall LGTM!
aba05f5 to
d95c753
Compare
|
@claude[agent] review |
Review completed. The implementation looks good: ✅ Properly uses The code correctly addresses the volume deletion reliability issue for Scaleway block storage. |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your patch status has failed because the patch coverage (4.54%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #712 +/- ##
==========================================
+ Coverage 85.71% 85.79% +0.07%
==========================================
Files 36 36
Lines 1799 1809 +10
==========================================
+ Hits 1542 1552 +10
Misses 257 257
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
edce7dd to
d95c753
Compare
d95c753 to
f9abec7
Compare
This pull request improves the reliability of deleting block storage volumes in the Scaleway backend by adding retry logic when volumes are temporarily stuck in the "in_use" state. It also adds comprehensive unit tests to ensure the new retry behavior works as expected in both success and failure scenarios.
Improvements to Scaleway block volume deletion:
deletemethod inscaleway.pyso that if a block storage volume is still "in_use" or marked as a "protected_resource", the system will retry deletion up to five times with increasing wait times between attempts. This handles cases where Scaleway takes time to detach volumes after server deletion. [1] [2]Testing enhancements:
test_delete_volume_in_use_retry_succeedsto verify that the retry logic successfully deletes a volume after temporary "in_use" errors.test_delete_volume_in_use_retry_exhaustedto verify that a warning is logged and the correct result is returned if the volume remains "in_use" after all retries.