Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

Migration progress #32

Closed
achingbrain opened this issue Aug 7, 2020 · 2 comments · Fixed by #33
Closed

Migration progress #32

achingbrain opened this issue Aug 7, 2020 · 2 comments · Fixed by #33
Labels
kind/enhancement A net-new feature or improvement to an existing feature status/ready Ready to be worked

Comments

@achingbrain
Copy link
Member

At the moment there's no progress available during a migration. These can take a long time so it's a poor user experience.

You should be able to pass a callback that gets invoked with some sort of notion of how much information has been processed and how much is left.

@achingbrain achingbrain added need/triage Needs initial labeling and prioritization kind/enhancement A net-new feature or improvement to an existing feature and removed need/triage Needs initial labeling and prioritization labels Aug 7, 2020
@ipfs ipfs deleted a comment from welcome bot Aug 7, 2020
@AuHau
Copy link
Member

AuHau commented Aug 7, 2020

Well, there is the onProgress callback, but this only reports on what migration you are currently migrating... Just to think about if the "in-migration-progress" should be part of this callback or it should be a different one.

@achingbrain
Copy link
Member Author

Yes, I was thinking something a bit more fine-grained, though obviously it becomes harder to be generic as the migrations are not typically similar.

Something like this would probably work:

migrate(..., {
  onProgress: ({ migration: { from, to }, percent, message }) => {}
})

@jacobheun jacobheun added the status/ready Ready to be worked label Aug 13, 2020
achingbrain added a commit that referenced this issue Aug 15, 2020
Changes the `onProgress` option to receive feedback on how far each
migration has progressed with a percent complete indicator and a
message to show the user.

If an `onProgress` option is passed, migrations will get a bit slower
as we need to calculate the total volume of work before starting a
migration in order to work out the percent complete.

Also removes datastores from runtime dependencies as these should only
ever be passed in as config.

Fixes #32

BREAKING CHANGES:

- The signature of the `onProgress` callback has changed
achingbrain added a commit that referenced this issue Aug 15, 2020
Changes the `onProgress` option to receive feedback on how far each
migration has progressed with a percent complete indicator and a
message to show the user.

If an `onProgress` option is passed, migrations will get a bit slower
as we need to calculate the total volume of work before starting a
migration in order to work out the percent complete.

Also removes datastores from runtime dependencies as these should only
ever be passed in as config.

Fixes #32

BREAKING CHANGES:

- The signature of the `onProgress` callback has changed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement A net-new feature or improvement to an existing feature status/ready Ready to be worked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants