Skip to content

feat(backup)_: implement remaining backups and tests #6671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

jrainville
Copy link
Member

Fixes status-im/status-desktop#18120

Implements the missing user data like watch only accounts and settings.

Implements tests to validate.

I skipped the keypairs since I'm waiting on confirmation whether we want to just get rid of it.

@@ -35,6 +35,8 @@ message Backup {
FetchingBackedUpDataDetails watchOnlyAccountDetails = 14;
repeated SyncChat chats = 15;
FetchingBackedUpDataDetails chatsDetails = 16;
repeated SyncSetting settings = 17;
repeated SyncAccount watchOnlyAccounts = 18;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think when this feature is all done, we can remove the old "single" properties or at least deprecate them

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah keeping both doesn't make sense 💯
But I think it might better to do it right away, because it's not really related to the local backup feature 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have this task to clean up all Waku backup stuff when the feature is done and the feature flag enabled by default: status-im/status-desktop#18123

I planned on doing the removal of those old protos then, what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it's fine yes

@jrainville
Copy link
Member Author

It's a big diff, but most of it is tests 😄

@status-im-auto
Copy link
Member

status-im-auto commented Jun 12, 2025

Jenkins Builds

Click to see older builds (36)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 88a5531 #1 2025-06-12 21:02:59 ~2 min android 📦aar
✔️ 88a5531 #1 2025-06-12 21:03:44 ~2 min linux 📦zip
✔️ 88a5531 #1 2025-06-12 21:03:52 ~3 min macos 📦zip
✔️ 88a5531 #1 2025-06-12 21:05:10 ~4 min macos 📦zip
✔️ 88a5531 #1 2025-06-12 21:06:21 ~5 min ios 📦zip
✔️ 88a5531 #1 2025-06-12 21:08:45 ~7 min tests-rpc 📄log
✔️ 88a5531 #1 2025-06-12 21:09:11 ~8 min windows 📦zip
✔️ 88a5531 #1 2025-06-12 21:10:39 ~9 min linux 📦zip
✔️ 88a5531 #1 2025-06-12 21:26:08 ~25 min tests 📄log
✔️ 26f9fbd #2 2025-06-13 20:10:02 ~2 min linux 📦zip
✔️ 26f9fbd #2 2025-06-13 20:10:31 ~3 min android 📦aar
✔️ 26f9fbd #2 2025-06-13 20:11:17 ~4 min macos 📦zip
✔️ 26f9fbd #2 2025-06-13 20:12:39 ~5 min macos 📦zip
✔️ 26f9fbd #2 2025-06-13 20:13:13 ~5 min windows 📦zip
✔️ 26f9fbd #2 2025-06-13 20:13:37 ~6 min ios 📦zip
✔️ 26f9fbd #2 2025-06-13 20:16:11 ~8 min tests-rpc 📄log
✔️ 26f9fbd #2 2025-06-13 20:19:36 ~12 min linux 📦zip
✔️ 26f9fbd #2 2025-06-13 20:37:12 ~29 min tests 📄log
✔️ 315cfe0 #3 2025-06-13 20:30:00 ~4 min windows 📦zip
✔️ 315cfe0 #3 2025-06-13 20:30:06 ~5 min macos 📦zip
✔️ 315cfe0 #3 2025-06-13 20:32:04 ~7 min ios 📦zip
✔️ 315cfe0 #3 2025-06-13 20:32:37 ~7 min android 📦aar
✔️ 315cfe0 #3 2025-06-13 20:33:06 ~8 min macos 📦zip
✔️ 315cfe0 #3 2025-06-13 20:33:24 ~8 min linux 📦zip
✔️ 315cfe0 #3 2025-06-13 20:41:04 ~16 min tests-rpc 📄log
✔️ 315cfe0 #3 2025-06-13 20:42:40 ~17 min linux 📦zip
✔️ 315cfe0 #3 2025-06-13 21:03:03 ~25 min tests 📄log
✔️ 76af0e3 #4 2025-06-19 17:00:32 ~2 min android 📦aar
✔️ 76af0e3 #4 2025-06-19 17:01:19 ~3 min linux 📦zip
✔️ 76af0e3 #4 2025-06-19 17:01:48 ~3 min macos 📦zip
✔️ 76af0e3 #4 2025-06-19 17:02:51 ~4 min macos 📦zip
✔️ 76af0e3 #4 2025-06-19 17:04:54 ~7 min ios 📦zip
✔️ 76af0e3 #4 2025-06-19 17:05:15 ~7 min windows 📦zip
✖️ 76af0e3 #4 2025-06-19 17:07:00 ~9 min tests-rpc 📄log
✔️ 76af0e3 #4 2025-06-19 17:10:28 ~12 min linux 📦zip
✔️ 76af0e3 #4 2025-06-19 17:26:03 ~28 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 2941baa #5 2025-06-20 15:54:47 ~2 min android 📦aar
✔️ 2941baa #5 2025-06-20 15:55:25 ~3 min macos 📦zip
✔️ 2941baa #5 2025-06-20 15:55:57 ~3 min linux 📦zip
✔️ 2941baa #5 2025-06-20 15:56:32 ~4 min macos 📦zip
✔️ 2941baa #5 2025-06-20 15:57:53 ~5 min ios 📦zip
✔️ 2941baa #5 2025-06-20 15:58:18 ~6 min windows 📦zip
✖️ 2941baa #5 2025-06-20 15:59:50 ~7 min tests-rpc 📄log
✔️ 2941baa #5 2025-06-20 16:02:12 ~10 min linux 📦zip
✔️ 2941baa #5 2025-06-20 16:18:44 ~26 min tests 📄log
✔️ 4505816 #6 2025-06-25 15:18:35 ~3 min macos 📦zip
✔️ 4505816 #6 2025-06-25 15:20:00 ~5 min macos 📦zip
✔️ 4505816 #6 2025-06-25 15:21:03 ~6 min android 📦aar
✔️ 4505816 #6 2025-06-25 15:22:20 ~7 min linux 📦zip
✔️ 4505816 #6 2025-06-25 15:22:57 ~7 min windows 📦zip
✔️ 4505816 #6 2025-06-25 15:23:55 ~9 min ios 📦zip
✔️ 4505816 #6 2025-06-25 15:26:39 ~11 min tests-rpc 📄log
✔️ 4505816 #6 2025-06-25 15:32:03 ~17 min linux 📦zip
✔️ 4505816 #6 2025-06-25 15:48:35 ~33 min tests 📄log

Copy link

codecov bot commented Jun 12, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 60.22%. Comparing base (917104b) to head (4505816).

Files with missing lines Patch % Lines
protocol/messenger_backup_handler.go 50.00% 2 Missing and 2 partials ⚠️
protocol/messenger_local_backup.go 55.55% 2 Missing and 2 partials ⚠️
protocol/messenger_sync_settings.go 50.00% 3 Missing and 1 partial ⚠️
protocol/messenger_backup.go 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           feat/poc-local-backup    #6671       +/-   ##
==========================================================
+ Coverage                  28.10%   60.22%   +32.11%     
==========================================================
  Files                        794      831       +37     
  Lines                     100520   103667     +3147     
==========================================================
+ Hits                       28253    62433    +34180     
+ Misses                     67914    33671    -34243     
- Partials                    4353     7563     +3210     
Flag Coverage Δ
functional 28.07% <14.28%> (-0.04%) ⬇️
unit 58.42% <50.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
protocol/messenger_backup.go 75.21% <33.33%> (+64.84%) ⬆️
protocol/messenger_backup_handler.go 57.81% <50.00%> (+57.81%) ⬆️
protocol/messenger_local_backup.go 53.91% <55.55%> (+53.91%) ⬆️
protocol/messenger_sync_settings.go 62.72% <50.00%> (+18.28%) ⬆️

... and 593 files with indirect coverage changes

@jrainville jrainville force-pushed the feat/local-backup-remaining-settings branch from 88a5531 to 26f9fbd Compare June 13, 2025 20:06
@jrainville jrainville force-pushed the feat/poc-local-backup branch from b347fc1 to 449c41c Compare June 13, 2025 20:23
@jrainville jrainville force-pushed the feat/local-backup-remaining-settings branch from 26f9fbd to 315cfe0 Compare June 13, 2025 20:24
@jrainville jrainville force-pushed the feat/poc-local-backup branch from 449c41c to 810241f Compare June 19, 2025 16:57
@jrainville jrainville force-pushed the feat/local-backup-remaining-settings branch from 315cfe0 to 76af0e3 Compare June 19, 2025 16:57
@@ -35,6 +35,8 @@ message Backup {
FetchingBackedUpDataDetails watchOnlyAccountDetails = 14;
repeated SyncChat chats = 15;
FetchingBackedUpDataDetails chatsDetails = 16;
repeated SyncSetting settings = 17;
repeated SyncAccount watchOnlyAccounts = 18;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah keeping both doesn't make sense 💯
But I think it might better to do it right away, because it's not really related to the local backup feature 🤔

Comment on lines 74 to 77
_, settings, errors := m.prepareSyncSettingsMessages(clock, true)
if len(errors) != 0 {
// return just the first error, the others have been logged
return errors[0]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_, settings, errors := m.prepareSyncSettingsMessages(clock, true)
if len(errors) != 0 {
// return just the first error, the others have been logged
return errors[0]
_, settings, errs := m.prepareSyncSettingsMessages(clock, true)
if len(errors) != 0 {
return errors.Join(errs)

or even better to join the errors inside prepareSyncSettingsMessages

@jrainville jrainville force-pushed the feat/poc-local-backup branch from 810241f to a9d669c Compare June 20, 2025 14:47
@jrainville jrainville force-pushed the feat/local-backup-remaining-settings branch from 76af0e3 to 2941baa Compare June 20, 2025 15:51
@jrainville jrainville requested a review from igor-sirotin June 20, 2025 15:51
@jrainville jrainville force-pushed the feat/poc-local-backup branch from a9d669c to 917104b Compare June 25, 2025 15:14
Fixes status-im/status-desktop#18120

Implements the missing user data like watch only accounts and settings.
Implements tests to validate.
@jrainville jrainville force-pushed the feat/local-backup-remaining-settings branch from 2941baa to 4505816 Compare June 25, 2025 15:14
@jrainville
Copy link
Member Author

Replaced by #6722

@jrainville jrainville closed this Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants