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

Show repository migration progress in go-ipfs 0.12+ #20106

Open
lidel opened this issue Dec 15, 2021 · 3 comments
Open

Show repository migration progress in go-ipfs 0.12+ #20106

lidel opened this issue Dec 15, 2021 · 3 comments

Comments

@lidel
Copy link

lidel commented Dec 15, 2021

Problem

go-ipfs 0.12 (ipfs/kubo#8344) will ship with datastore migration which may take some time, especially when user had a lot of CIDv1 data – on a slower disk 10GB repo could take multiple minutes.

This means go-ipfs won't be available until migration is done and user won't know the migration is happening.

Proposed solution

Brave should handle migrations in generic way, detect that go-ipfs startup log includes ongoing migration log and show some feedback to the user.

Implementation details

The repo migration log is printed when daemon starts after the update to the new binary.

In go-ipfs 0.12.0-rc1 it looks like this:

Found outdated fs-repo, migrations need to be run.
Looking for suitable migration binaries.
Need 1 migrations, downloading.
Downloading migration: fs-repo-11-to-12...
Fetching with HTTP: "https://ipfs.io/ipfs/QmPweMoUxWFt1MSpYwLWsHB1GBcyYYDKPnANdERMY4U6hK/fs-repo-11-to-12/versions"
Fetching with HTTP: "https://ipfs.io/ipfs/QmPweMoUxWFt1MSpYwLWsHB1GBcyYYDKPnANdERMY4U6hK/fs-repo-11-to-12/v1.0.1/fs-repo-11-to-12_v1.0.1_linux-amd64.tar.gz"
Downloaded and unpacked migration: /tmp/migrations781990026/fs-repo-11-to-12 (v1.0.1)
Running migration fs-repo-11-to-12 ...
  => Running: /tmp/migrations781990026/fs-repo-11-to-12 -path=/data/ipfs -verbose=true
applying 11-to-12 repo migration
locking repo at "/data/ipfs"
....

MVP UI

I think what we need to show some UI with migration progress to our users:

  1. Detect Found outdated fs-repo, migrations need to be run. and show some feedback
  2. Communicate progress based on arbitrary number of Downloading migration: fs-repo- and Running migration fs-repo- steps
  3. Close the progress UI when Success: fs-repo migrated to version is detected

I think MVP for these steps could be to just open brave://internal-ipfs and have realtime console log displayed there as-is. That way user not only knows that the migration is happening, but will see node starting after it is done or can close it and always go back to see its status on that diagnostic page.

This is an MVP idea, Brave may decide to provide a nicer UI built on top of it.

@lidel
Copy link
Author

lidel commented Feb 21, 2022

The latest migration code that ended up in 0.12 should be fast enough, so this UI is not necessary.

I think we could add a step to QA script to eyeball how long a migration takes when go-ipfs is updated, and if it is not noticeable, ship go-ipfs 0.12 without this additional UI.

Thoughts? @spylogsster @stephendonner

@spylogsster
Copy link

lgtm

@stephendonner
Copy link

The latest migration code that ended up in 0.12 should be fast enough, so this UI is not necessary.

I think we could add a step to QA script to eyeball how long a migration takes when go-ipfs is updated, and if it is not noticeable, ship go-ipfs 0.12 without this additional UI.

Thoughts? @spylogsster @stephendonner

Sounds good; am swamped with release duties for 1.36.x so won't be able to get to this until Friday or next Monday, just FYI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants