Page MenuHomePhabricator

[native] Download and restore compaction
ClosedPublic

Authored by michal on Feb 7 2024, 9:48 AM.
Tags
None
Referenced Files
F2146549: D10987.diff
Sun, Jun 30, 12:00 AM
Unknown Object (File)
Sun, Jun 23, 2:46 PM
Unknown Object (File)
Sun, Jun 23, 5:21 AM
Unknown Object (File)
Thu, Jun 13, 12:00 AM
Unknown Object (File)
Thu, Jun 6, 9:59 AM
Unknown Object (File)
Thu, Jun 6, 8:03 AM
Unknown Object (File)
Thu, Jun 6, 7:50 AM
Unknown Object (File)
Thu, Jun 6, 7:34 AM
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