Page MenuHomePhabricator

[backup] Revoke holders on upload error
ClosedPublic

Authored by michal on Aug 28 2023, 2:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 27, 5:02 PM
Unknown Object (File)
Sun, Oct 27, 5:02 PM
Unknown Object (File)
Sun, Oct 27, 5:02 PM
Unknown Object (File)
Sun, Oct 27, 5:01 PM
Unknown Object (File)
Oct 1 2024, 5:25 PM
Unknown Object (File)
Sep 27 2024, 11:20 PM
Unknown Object (File)
Sep 24 2024, 3:19 AM
Unknown Object (File)
Sep 15 2024, 7:42 PM
Subscribers

Details

Summary

Part of ENG-4501

If upload fails at some point we want to revoke holders for blobs so they don't hang around forever. For this purpose I've added a general purpose Defer struct that will defer a given command until an end of scope. If everything succeeds we cancel them (=> don't revoke the holders for blobs).

Depends on D8966

Test Plan

cargo run -- --localstack-endpoint 'dummy url'
Check in logs if there was a blob upload (for both user keys and data). Check in db if there are no blob or backup rows present after the request ended.
Run service normally, check if upload still works.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable