Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(CSI-239): moveToTrash does not return error to upper layers (#312)
### TL;DR Improved error handling in volume garbage collection process. ### What changed? - Modified `triggerGcVolume` and `moveVolumeToTrash` functions to return errors. - Updated `Trash` method in `Volume` struct to handle the error returned by `triggerGcVolume`. - Removed synchronous comment from `triggerGcVolume` as it's no longer relevant. ### How to test? 1. Attempt to trash a volume that requires garbage collection. 2. Verify that any errors during the process are properly propagated and handled. 3. Test scenarios where moving the volume to trash might fail (e.g., permission issues, disk full) and ensure errors are returned. ### Why make this change? This change improves error handling and propagation in the volume garbage collection process. By returning errors from `triggerGcVolume` and `moveVolumeToTrash`, we can better detect and respond to issues that may occur during the trashing process. This enhancement allows for more robust error handling and logging, potentially improving debugging and system reliability. ---
- Loading branch information