Page MenuHomePhabricator

[backup-service] make `user_data` and `user_keys` optional in `BackupData`
ClosedPublic

Authored by kamil on Tue, Nov 5, 9:10 AM.
Tags
None
Referenced Files
F3373464: D13878.id45682.diff
Tue, Nov 26, 9:51 AM
F3373335: D13878.id45652.diff
Tue, Nov 26, 9:05 AM
Unknown Object (File)
Fri, Nov 22, 11:01 PM
Unknown Object (File)
Fri, Nov 22, 2:32 PM
Unknown Object (File)
Wed, Nov 20, 4:53 PM
Unknown Object (File)
Wed, Nov 20, 5:09 AM
Unknown Object (File)
Sun, Nov 17, 9:06 PM
Unknown Object (File)
Fri, Nov 15, 12:10 PM
Subscribers

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Wed, Nov 6, 3:45 AM
kamil added inline comments.
native/native_rust_library/src/backup/upload_handler.rs
199–209 ↗(On Diff #45634)

Depending on what files will be generated we're going to upload User Keys, or User Data, or both

services/commtest/tests/backup_integration_test.rs
60 ↗(On Diff #45634)

not sure what is best pattern for this

shared/backup_client/src/lib.rs
59–84 ↗(On Diff #45634)

this is strange but we need to maintain order, otherwise backup service can fail to parse Multiplart

86–88 ↗(On Diff #45634)

We always want to upload at least one, and depending on data we're gone chose endpoint (see below)

services/commtest/tests/backup_integration_test.rs
60 ↗(On Diff #45634)

This is good

shared/backup_client/src/lib.rs
59–84 ↗(On Diff #45634)

This is normal - Backup service is designed in such a way that expects these fields in order. So is Blob service.

86–96 ↗(On Diff #45634)

I'd also put this above creation of Form::new() etc to early exit when data and keys are both none

This revision is now accepted and ready to land.Thu, Nov 7, 12:38 AM

address review

shared/backup_client/src/lib.rs
86–96 ↗(On Diff #45634)

Good call, thanks