Closed organizedgrime closed 12 months ago
Tomb cli should be able to get the current metadata from the metadata service for an individual bucket, and begin restoration using that. If it encounters a data block that is not present it should request the storage providers associated with that bucket using the API defined in [ENG-304](https://linear.app/banyan/issue/ENG-304/block-storage-retrieval-staging-service). It should try each of the storage providers returned in the order they were returned to attempt to retrieve the blocks. When multiple blocks are needed it should attempt to continue using the storage provider returned until it encounters a 404 error as most blocks that are part of a restore will most likely be stored together. If a 404 is encountered the next storage provider should be tried. If the [ENG-307](https://linear.app/banyan/issue/ENG-307/metadata-service-block-lookup) API returns a non-200 response the restore should be aborted with an error. If an individual block is not available in all of the returned storage providers, the restore should be aborted with an error.
Looks good šš¼
Description
Huge refactor of CLI structure:
OmniBucket
class now holds two optional fields, one being aLocalBucket
and the other being aRemoteBucket
.SyncState
enum to assess and articulate the current status of a local and remote bucket in comparison to each other.PrivateForest
reconstruction that although reproducible is hard to understand as it is not an issue in WASM presently. Currently syncing with Phillip in search of a fix.tomb-crypt
, making this repo home to the necessary WebCrypto helper methods.Link to issue
https://linear.app/banyan/issue/ENG-308/data-restoration
Type of change
Test plan
Most of this code is integration based and should not be tested through cargo tests but rather through actually interacting with the tool.