Page MenuHomePhabricator

[native] Download and restore compaction
ClosedPublic

Authored by michal on Feb 7 2024, 9:48 AM.
Tags
None
Referenced Files
F3378523: D10987.id36791.diff
Wed, Nov 27, 11:16 AM
F3378494: D10987.id37592.diff
Wed, Nov 27, 11:00 AM
Unknown Object (File)
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)
Oct 27 2024, 4:39 PM
Unknown Object (File)
Oct 27 2024, 9:14 AM
Unknown Object (File)
Oct 25 2024, 7:33 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
Lint Not Applicable
Unit
Tests Not Applicable

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