Page MenuHomePhabricator

[web] Restore logs
ClosedPublic

Authored by michal on Feb 12 2024, 7:29 AM.
Tags
None
Referenced Files
F2144466: D11044.id37073.diff
Sat, Jun 29, 8:11 PM
F2144447: D11044.id.diff
Sat, Jun 29, 8:08 PM
Unknown Object (File)
Sat, Jun 29, 5:24 AM
Unknown Object (File)
Sun, Jun 23, 4:23 PM
Unknown Object (File)
Sat, Jun 1, 7:54 AM
Unknown Object (File)
May 23 2024, 6:54 AM
Unknown Object (File)
May 21 2024, 1:01 PM
Unknown Object (File)
May 21 2024, 1: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
Lint Not Applicable
Unit
Tests Not Applicable

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.