Skip to content
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

jsonrpc: add functions missing for desktop migration #5533

Closed
Simon-Laux opened this issue May 2, 2024 · 3 comments · Fixed by #5584
Closed

jsonrpc: add functions missing for desktop migration #5533

Simon-Laux opened this issue May 2, 2024 · 3 comments · Fixed by #5584
Assignees

Comments

@Simon-Laux
Copy link
Member

It's the last function that still uses the deltachat-node bindings in desktop. the purpose of the function is to make sure that a user can update from the old/early versions of delta chat and still keep their account.

https://github.com/deltachat/deltachat-desktop/blob/69f3a76e853f20c4d1007dd0edb0c260dd6f4831/src/main/deltachat/controller.ts#L150

The task is to move this function to a jsonrpc method and create tests for it to ensure it can successfully migrate the data from the old versions to the new version.

For this I collected test data from all released versions: https://github.com/deltachat/dektop_migration_test_data
This test data should be deduplicated (actually there are only 3-4 different formats, we don't need to move all test data to the core repo, only the parts that matter).
I logged in into the same 2 accounts in these test data, so in the test try migrating the data from those folders and then check if both accounts still exist and are configured.

@hpk42
Copy link
Contributor

hpk42 commented May 2, 2024

does the whole migrateToAccountsApiIfNeeded() function need to be ported to Rust? Seems potentially involved specially for someone not well versed in rust.

@nicodh
Copy link
Contributor

nicodh commented May 4, 2024

I would suggest we show a message if old account format is detected:

Your account data is not compatible with current version of Delta Chat.
Please install Version 1.44 (Link) first to migrate your accounts to the new format.
After that you install and run the newest version.

@Simon-Laux
Copy link
Member Author

I thought about this again, and came to the conclusion that it's better to keep in desktop, then for the tauri version we can either just ignore the legacy versions or need to reimplement the logic in rust.
I'll rename this issue to be for the missing jsonrpc apis

@Simon-Laux Simon-Laux changed the title Move desktop migration function to jsonrpc layer jsonrpc: add functions missing for desktop migration May 16, 2024
Simon-Laux added a commit that referenced this issue May 17, 2024
closes #5533

adds the functions that were still missing for migration to jsonrpc (the
ones that the cffi already had, so just should be quick to review ;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

3 participants