Page MenuHomePhabricator

[web] Restore logs
ClosedPublic

Authored by michal on Feb 12 2024, 7:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 5:40 PM
Unknown Object (File)
Sat, Nov 23, 5:36 PM
Unknown Object (File)
Sat, Nov 23, 3:23 PM
Unknown Object (File)
Wed, Nov 13, 9:53 AM
Unknown Object (File)
Fri, Nov 8, 8:38 AM
Unknown Object (File)
Wed, Nov 6, 5:34 PM
Unknown Object (File)
Oct 15 2024, 12:01 PM
Unknown Object (File)
Oct 15 2024, 12:01 PM
Subscribers

Details

Summary

After restoring the compaction we can restore the logs, using another key passed in the message.

Depends on D11043

Test Plan
  • Add logging to the native client so that it logs backupID and encryption keys for compaction and logs
  • Upload a new compaction from native with a draft
  • Add a new draft, so that there are logs created
  • Send restore message on web with values logged from native
  • Reload web app
  • Check that both drafts (from compaction and logs) exists now on web. Check that the enabled apps are the same as before restore (redux persist didn't change)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 12 2024, 7:34 AM
Harbormaster failed remote builds in B26764: Diff 37003!
michal published this revision for review.Feb 14 2024, 6:43 AM
This revision is now accepted and ready to land.Feb 19 2024, 4:40 AM
web/database/worker/backup.js
58 ↗(On Diff #37073)

This method can throw and in case it does error message isn't directly understandable by JS. Please before you land:
Wrap the call to sqliteQueryExecutor with try{} .. catch{} and log error using getExceptionMessage from dbModule.