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

crypto: crypto store wrapper migration framework #3800

Closed
wants to merge 1 commit into from

Conversation

BillCarsonFr
Copy link
Member

The rust-sdk offers an abstraction of the persistence layer via the CryptoStore.
There are several implementation, with each of them having their own migration framework to manage their internal data format.
There is some basic migration support at the OlmMachine layer via serde serialization/deserialization. Like for example the use of #[serde(default)] that allows to add a default static value for a field added in a json model, or Serialization helpers like for identity migration.

But this only allows static/basic migration with no access to other existing data.
There is a need to be able to do more in a migration, like seen in this PR, were we are adding a new flag on identities that needs to access the current identity as well as the identity currently migrated. This can be solved by marking all users as dirty, and we have no way to do that currently (appart from doing it in each store implementation?)

This PR adds basic support for such migration.
It impacts a lots of files because the CryptoStoreWrapper::new function needs now to be async

  • Public API changes documented in changelogs (optional)

Signed-off-by:

@richvdh richvdh linked an issue Aug 7, 2024 that may be closed by this pull request
@bnjbvr bnjbvr changed the title feature: Crypto store wrapper migration framework crypto: crypto store wrapper migration framework Sep 3, 2024
@bnjbvr
Copy link
Member

bnjbvr commented Sep 5, 2024

@BillCarsonFr What's the status of this PR? It's been opened as a draft for a long time now, and it has many conflicts with the existing code. We'd rather not keep PRs as draft for too long, so curious if you have any update on the status here?

@BillCarsonFr
Copy link
Member Author

@BillCarsonFr What's the status of this PR? It's been opened as a draft for a long time now, and it has many conflicts with the existing code. We'd rather not keep PRs as draft for too long, so curious if you have any update on the status here?

WIll close for now. Tracked here #3811

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.

Consider a generic schema migration framework for CryptoStore
2 participants