HomePhabricator
Diffusion Comm 69b9def293e1

[services] Backup - Add AddAttachment method

Description

[services] Backup - Add AddAttachment method

Summary:
Adding AddAttachment method to the backup proto file, plus generating according files with the protobuf.

The idea is, that we first upload a new backup/log, and only after that, we separately upload attachments for it.

An alternative solution would be to inject uploading attachments when uploading a new backup/log but I decided it would be messier, the logic, in the end, would get too complicated, and having the solution I'm proposing here, we end up with more isolated and reusable code that is easier to maintain and understand.

The fields we require in the AddAttachmentRequest:

  • userID - we need this to be ale to fetch the proper backup item.
  • backupID - we need this to be ale to fetch the proper backup item.
  • logID - optional we need this to be able to fetch the proper log item only if the attachment is about to be appended to the log item. If this is empty, it means we're appending to the backup item.
  • dataHash - we need this so we can upload the data to the blob.
  • dataChunk - chunks of the attachment.

Test Plan: None, this change is going to be used later in the stack, it's just a change in the proto file.

Reviewers: palys-swm, ashoat

Reviewed By: palys-swm, ashoat

Subscribers: ashoat, palys-swm, Adrian, atul, yayabosh

Differential Revision: https://phabricator.ashoat.com/D4080

Details

Provenance
karolAuthored on May 30 2022, 9:11 AM
Reviewer
tomek
Differential Revision
D4080: [services] Backup - Add AddAttachment method
Parents
rCOMM4ae2e0d41997: [services] Tunnelbroker - Distinguish logging levels in dev-mode
Branches
Unknown
Tags
Unknown