Skip to content

Migrations: Add in progress data to migration #925

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

Merged
merged 5 commits into from
Apr 16, 2025

Conversation

nodech
Copy link
Contributor

@nodech nodech commented Mar 28, 2025

Add in progress arbitrary data storage to the migrations. Long running processes may be interrupted and may not have simple way to recover last state. This should allow those migrations to store metadata to the db.

  • Add version entry to the migration state. Repurpose unused 16 bits of flags into the version, that should allow conditional serialization of the migration state.

  • Create and pass the migration context to the migrations instead of just passing Results.

  • Migration context now contains state that will get committed after the migration is done, but also provides saveState for the data.

  • Add migration to the chain/wallet to increment migration state version.

@nodech nodech marked this pull request as draft March 28, 2025 13:00
@nodech nodech added migrations part of the codebase enhancement general - improving existing feature breaking-major Backwards incompatible - Release version labels Mar 28, 2025
@coveralls
Copy link

coveralls commented Mar 28, 2025

Coverage Status

coverage: 71.346% (+0.09%) from 71.254%
when pulling 3ff5399 on nodech:wallet-migration-progress-data
into 73533cd on handshake-org:master.

@nodech nodech marked this pull request as ready for review March 31, 2025 11:38
@nodech nodech merged commit 5f11d62 into handshake-org:master Apr 16, 2025
7 checks passed
@nodech nodech deleted the wallet-migration-progress-data branch April 16, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-major Backwards incompatible - Release version enhancement general - improving existing feature migrations part of the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants