Page MenuHomePhabricator

[native] Download and restore compaction
ClosedPublic

Authored by michal on Feb 7 2024, 9:48 AM.
Tags
None
Referenced Files
F3355775: D10987.diff
Sat, Nov 23, 3:27 PM
Unknown Object (File)
Wed, Nov 6, 5:43 PM
Unknown Object (File)
Fri, Nov 1, 8:52 PM
Unknown Object (File)
Sun, Oct 27, 4:39 PM
Unknown Object (File)
Sun, Oct 27, 9:14 AM
Unknown Object (File)
Fri, Oct 25, 7:33 PM
Unknown Object (File)
Oct 24 2024, 7:55 PM
Unknown Object (File)
Oct 15 2024, 2:18 PM
Subscribers

Details

Summary

Update the JS and Rust code to download and restore sqlite backup compaction. Logs will be handled later. After compaction and user keys are downloaded, the sqlite data is saved to a file and calls the C++ function with the path and the encryption key. After everything succeds it resolved the JS promise.

Depends on D10859

Test Plan
  • Enabled uploading backups
  • Made a new draft
  • Created a new compaction and waited for it to be successfuly uploaded
  • Logged out
  • Logged in, into the same account
  • Checked that the draft wasn't there
  • Restored from backup
  • Restarted the app so redux would refresh
  • Checked that the draft would be there

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Could you please update and re-execute the test plan so that after creating draft you log-out and log-in instead of removing the draft? With you current test plan you test restoring from backup that is encrypted with the same encryption key that we already have on the device. This scenario isn't realistic enough - in practice we will always restore from backup file encrypted with different encryption key that we have on the device.

Updated the test plan to log out and in.

This revision is now accepted and ready to land.Feb 12 2024, 11:53 PM