Repository navigation
[PB-7100] refactor: list device folder children with folder content when deleting backups - #547
Conversation
…ng backups
Replaces the GET /folders/{uuid}/tree call in the delete device backups flow
with GET /folders/content/{uuid}. Only the direct children of the device
folder are needed to find the folders left to trash.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|



What is Changed / Added
When the user deletes the backups of a device, the client trashes each backup and then trashes any other folder left under the device folder. To find those leftover folders it used to download the whole tree of the device with
GET /folders/{uuid}/tree, even though it only looked at the direct children. It now gets them fromGET /folders/content/{uuid}, which returns only the device folder and its direct children. The behaviour is the same as before: every folder under the device ends up in the trash, the device folder itself is kept, and if the request fails we log it and skip the cleanup.I have also detected that the windows client does not have the same behaviour. the Windows app only trashes the backups that are currently enabled. Disabled backups, and any folder under the device that isn't in the local backup list, stay in the cloud. I will be adding a new tech deb task PB-7200 to implement it so that we keep consistency between platforms
This is the second of a few smaller PRs that replace #519.
Why
GET /folders/{uuid}/treeis being deprecated because large trees were causing out of memory errors on the backend, and it will start returning 410 Gone in 2.7.2. The content endpoint is already used to list the backups of a device, so this removes the second remaining use of the tree endpoint without adding a new dependency.Summary by CodeRabbit