Skip to content

feat(backup)_: add api to backup and import local backup #6695

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

@status-im-auto
Copy link
Member

status-im-auto commented Jun 18, 2025

Jenkins Builds

Click to see older builds (18)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 2a581c9 #1 2025-06-18 17:46:12 ~2 min android 📦aar
✔️ 2a581c9 #1 2025-06-18 17:46:43 ~3 min linux 📦zip
✔️ 2a581c9 #1 2025-06-18 17:47:13 ~3 min macos 📦zip
✔️ 2a581c9 #1 2025-06-18 17:47:22 ~3 min macos 📦zip
✔️ 2a581c9 #1 2025-06-18 17:48:22 ~4 min windows 📦zip
✔️ 2a581c9 #1 2025-06-18 17:49:59 ~6 min ios 📦zip
✖️ 2a581c9 #1 2025-06-18 17:51:51 ~8 min tests-rpc 📄log
✔️ 2a581c9 #1 2025-06-18 17:54:35 ~11 min linux 📦zip
✔️ 2a581c9 #1 2025-06-18 18:09:13 ~25 min tests 📄log
✔️ 0b81abe #2 2025-06-19 17:01:59 ~3 min macos 📦zip
✔️ 0b81abe #2 2025-06-19 17:03:00 ~4 min windows 📦zip
✔️ 0b81abe #2 2025-06-19 17:03:08 ~5 min macos 📦zip
✔️ 0b81abe #2 2025-06-19 17:03:43 ~5 min android 📦aar
✔️ 0b81abe #2 2025-06-19 17:04:30 ~6 min linux 📦zip
✔️ 0b81abe #2 2025-06-19 17:06:05 ~8 min ios 📦zip
✔️ 0b81abe #2 2025-06-19 17:10:03 ~11 min tests-rpc 📄log
✔️ 0b81abe #2 2025-06-19 17:13:23 ~15 min linux 📦zip
✔️ 0b81abe #2 2025-06-19 17:29:05 ~30 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 7cb5c4d #3 2025-06-20 16:37:46 ~2 min android 📦aar
✔️ 7cb5c4d #3 2025-06-20 16:38:12 ~3 min macos 📦zip
✔️ 7cb5c4d #3 2025-06-20 16:38:51 ~3 min macos 📦zip
✔️ 7cb5c4d #3 2025-06-20 16:39:00 ~4 min linux 📦zip
✔️ 7cb5c4d #3 2025-06-20 16:39:55 ~4 min windows 📦zip
✔️ 7cb5c4d #3 2025-06-20 16:40:56 ~6 min ios 📦zip
✖️ 7cb5c4d #3 2025-06-20 16:43:52 ~8 min tests-rpc 📄log
✔️ 7cb5c4d #3 2025-06-20 16:49:15 ~14 min linux 📦zip
✔️ 7cb5c4d #3 2025-06-20 17:02:39 ~27 min tests 📄log
✔️ 7d7d648 #4 2025-06-25 15:18:56 ~3 min macos 📦zip
✔️ 7d7d648 #4 2025-06-25 15:21:18 ~5 min macos 📦zip
✔️ 7d7d648 #4 2025-06-25 15:23:55 ~8 min ios 📦zip
✔️ 7d7d648 #4 2025-06-25 15:24:22 ~9 min android 📦aar
✔️ 7d7d648 #4 2025-06-25 15:25:04 ~9 min windows 📦zip
✔️ 7d7d648 #4 2025-06-25 15:25:55 ~10 min linux 📦zip
✔️ 7d7d648 #4 2025-06-25 15:30:38 ~15 min tests-rpc 📄log
✔️ 7d7d648 #4 2025-06-25 15:35:43 ~20 min linux 📦zip
✔️ 7d7d648 #4 2025-06-25 15:51:08 ~35 min tests 📄log

Copy link

codecov bot commented Jun 18, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 6 lines in your changes missing coverage. Please review.

Project coverage is 60.27%. Comparing base (4505816) to head (7d7d648).

Files with missing lines Patch % Lines
services/ext/api.go 0.00% 5 Missing ⚠️
protocol/messenger_local_backup.go 66.66% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (33.33%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@                           Coverage Diff                            @@
##           feat/local-backup-remaining-settings    #6695      +/-   ##
========================================================================
+ Coverage                                 60.22%   60.27%   +0.04%     
========================================================================
  Files                                       831      831              
  Lines                                    103667   103670       +3     
========================================================================
+ Hits                                      62433    62484      +51     
+ Misses                                    33671    33594      -77     
- Partials                                   7563     7592      +29     
Flag Coverage Δ
functional 28.08% <11.11%> (+<0.01%) ⬆️
unit 58.42% <33.33%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
protocol/messenger_handler.go 59.72% <100.00%> (+0.10%) ⬆️
protocol/messenger_local_backup.go 54.46% <66.66%> (+0.55%) ⬆️
services/ext/api.go 26.14% <0.00%> (-0.17%) ⬇️

... and 39 files with indirect coverage changes

@jrainville jrainville force-pushed the feat/local-backup-remaining-settings branch from 315cfe0 to 76af0e3 Compare June 19, 2025 16:57
@jrainville jrainville force-pushed the feat/local-backups-api branch from 2a581c9 to 0b81abe Compare June 19, 2025 16:57
@@ -579,6 +579,7 @@ func (m *Messenger) handleSyncChats(messageState *ReceivedMessageState, chats []
if err != nil {
return err
}
messageState.AllChats.Store(chat.ID, chat)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this some bug you faced? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yes, I forgot to comment on it. It seems we have a bug where we save the chat to the DB and the messenger state, but not in the messageState.AllChats. So there was a mismatch between that and the Response. This made saveDataAndPrepareResponse not return the new chat correctly. I had to restart the app to make it show.

Comment on lines 145 to 149
defer func() {
m.processBackedupMessages = false
}()

m.processBackedupMessages = true
Copy link
Collaborator

Choose a reason for hiding this comment

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

ough, this doesn't look good. I guess it is tricky, but any chance we can avoid this?
Ideally, there should be some level of HandleBackup that doesn't check processBackedupMessages flag. And the level above which does.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I can just call handleBackup instead of HandleBackup

Also, once I do the clean up for the Waku stiff, I'll remove all the backup protobuf handling and we can get rid of processBackedupMessages

@jrainville jrainville force-pushed the feat/local-backup-remaining-settings branch from 76af0e3 to 2941baa Compare June 20, 2025 15:51
@jrainville jrainville force-pushed the feat/local-backups-api branch from 0b81abe to 7cb5c4d Compare June 20, 2025 16:34
@jrainville jrainville force-pushed the feat/local-backup-remaining-settings branch from 2941baa to 4505816 Compare June 25, 2025 15:14
@jrainville jrainville force-pushed the feat/local-backups-api branch from 7cb5c4d to 7d7d648 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.

4 participants