Page MenuHomePhabricator

[native] Download and restore compaction
ClosedPublic

Authored by michal on Feb 7 2024, 9:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 11:28 PM
Unknown Object (File)
Mon, Dec 23, 11:28 PM
Unknown Object (File)
Mon, Dec 23, 11:28 PM
Unknown Object (File)
Mon, Dec 23, 11:27 PM
Unknown Object (File)
Thu, Dec 12, 9:09 PM
Unknown Object (File)
Fri, Dec 6, 7:08 PM
Unknown Object (File)
Nov 27 2024, 11:16 AM
Unknown Object (File)
Nov 27 2024, 11:00 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