-
Notifications
You must be signed in to change notification settings - Fork 264
chore(backup)_: cherry-pick local backup commits on 2.34 release branch #6804
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
chore(backup)_: cherry-pick local backup commits on 2.34 release branch #6804
Conversation
Jenkins BuildsClick to see older builds (81)
|
9940feb to
a152135
Compare
6d14459 to
ebabb25
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release/10.29.x #6804 +/- ##
==================================================
Coverage ? 60.28%
==================================================
Files ? 854
Lines ? 106109
Branches ? 0
==================================================
Hits ? 63971
Misses ? 34470
Partials ? 7668
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
I don't think you have to actually review this, but feel free to do it if you're a masochist lol |
|
We require commits to follow the Conventional Commits, but with |
Fixes status-im/status-desktop#18248 status-im/status-desktop#18107 status-im/status-desktop#18120 status-im/status-desktop#18122 status-im/status-desktop#18141 status-im/status-desktop#18121 Implements all the backend for the local user data backups. Uses the scaffold @osmaczko created to make it more extendable. Instead of using the old Messenger code for backups, we now use a new controller that let's other modules register to be backed up. This includes the messenger for chats, contacts and communities, the accounts service for settings and the wallet service for watch-only accounts. I also created new Protobufs for those backups, so that we no longer user the super generic Waku Backup protobuf. Finally, I added some integration tests and a functional test that does the whole flow. A lot of cleanups can still be done to reduce duplication, but they can be done in another commit/issue, since the internal of the services can be modified without the backup process being affected, since the protobufs are in place already.
This is a light deprecation of Waku backups
This is a fix for the backup and also just a performance improvement. Basically, when we have a SyncCommunity message, we leave the community if the state of said community is not pending or joined (meaning we left it). However, in the case of backup messages, we backup left communities too, but when trying to "leave" those communities, it threw an error about unknown chat, since we never spectated that community in that imported profile. The solution is just to early return when we don't have anything to leave. We gracefully ignore the error in the Sync function and pass the error when actively trying to leave (you can't leave twice). Added tests and also cleaned up some warnings.
This should make it work on mobile as well plus it sets a default to the setting
It is the name that users are used to see, so it will be less confusing
Fixes status-im/status-desktop#18529 Implements a rough but functional proof of concept for message backup and import. It is guarded by a new setting so that you need to opt-in to have it, thus not breaking PFS by default. It works for text messages, contacts requests, images, emojis, transaction commands, pins and stickers.
Fixes status-im/status-desktop#18895 Adds the code to sync messages when doing a local pairing. The code is currently flagged out and the test commented. We will later add the param to let users accept syncing the messages and use that param as the condition.
Fixes status-im/status-desktop#18894 Adds a param for users to enable message syncing during local pairing. Updates the test to use that param
e2ea8b3 to
4c068ab
Compare
4c068ab to
13db971
Compare
There was an issue where 1-1 chat messages didn't seem to be synced and it was because we were using the ChatID instead of the LocalChatID, meaning that messages from other people had our own chat ID instead of having their chat ID. Also upgrades the integration and functional test to validate the behaviour.
This reverts commit 2f47fa8.
|
@vkjr This PR is ready to be used. I hardcoded the settings to With it, I tested, on Android, that the backup file is created and that when imported in Desktop, I do have the data plus the messages. I also tested local pairing, and with the hardcodes, I was also able to get the messages. I have reverted the hardcoded values back to the normal behaviour in this commit: b7c853d You can revert it to test for yourself. I have not tested IOS, so there might be something buggy there, especially the default path for the backup file. Since this PR is on an old branch than is still on Go 1.22, I don't think the CI will ever pass, so I can just force merge if you want or @alaibe or @igor-sirotin can do it. |
|
@jrainville, this PR works well for mobile, please merge it whenever you have time 🙏 |
|
@igor-sirotin, would you mind to merge it? |
|
hmmm @vkjr I see I might take a look soon as well 👌 |
|
@vkjr I've fixed the linter issues. Will check tests results tomorrow and merge |
|
Tests passed now, merging |
|
Thank! |

Cherry-picks the local backup commits so that we can ship a 2.34 patch on the old mobile with it. This will enable old mobile users to use that backup file to upgrade to the new app.
The only missing part is the RPC test I wrote because it used some new test files and I didn't want to have to backport all the function test files that were committed in between.
In the end, we don't really care about importing on the old mobile, just the loop to export, so we can test that manually.
related mobile PR