-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
add 'ipfs repo migrate' command #7658
Conversation
This comment has been minimized.
This comment has been minimized.
Thanks @zaibon for starting this. Could you do two more things:
Thanks again and let me know if you need any guidance here. |
Thanks for the review @aschmahmann.
Right, forgot that part. What should be the behavior when this flag is set ? At the moment I always call
Yep, will do, thanks for the guidance here. |
test/sharness/t0066-migration.sh
Outdated
@@ -13,7 +13,7 @@ test_init_ipfs | |||
test_expect_success "setup mock migrations" ' | |||
mkdir bin && | |||
echo "#!/bin/bash" > bin/fs-repo-migrations && | |||
echo "echo 5" >> bin/fs-repo-migrations && | |||
echo "echo 10" >> bin/fs-repo-migrations && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to change this here to make the detection of the fs-repo-migrations
to work since it seems now the code also checks the version the migration tool is able to handle.
54b4019
to
f2e7133
Compare
@aschmahmann I hooked up the I also added some test for the new command. I'm not sure how I can test the downgrade though, some input there would be welcome :-) |
@zaibon sorry it's taking a while to get to this. A little busy with things related to the v0.7.0 release, but will try and get to this next week. |
@aschmahmann ping ;-) |
Thanks @zaibon for the reminder and apologies it slipped off my radar. I'll try and take a look over the weekend. I was actually thinking about this PR yesterday because some of the pain around migrations has made implementing something like ipfs/fs-repo-migrations#98 more important. This would likely rely on |
Nice, I'll have a look at ipfs/fs-repo-migrations#98. Should I already try to rebase this PR since I guess it's a bit out of date with master or wait your review ? |
I suspect it's an easy rebase, but if it's a pain for some reason then I'd hold off until there's some progress on ipfs/fs-repo-migrations#98. If we do basically what's recommended in that issue then this command will replace the fs-repo-migrations binary for people doing manual migration manipulation. |
f2e7133
to
6499f36
Compare
@zaibon Wanted to let you know that this PR has not been forgotten about. The work to overhaul the migrations and binary distribution is code-complete, and is waiting until there is time to review it all. Once #7857 is merged, then you can rebase this PR and make any necessary changes. Hopefully in the next couple of weeks. |
@gammazero seems ipfs/fs-repo-migrations#98 is now closed. Can I start rebasing and make the required change here or is there anything else in the pipeline ? |
@zaibon You can rebase now. You will need to make some changes to how you call |
6499f36
to
2455742
Compare
@zaibon not sure if this is ready for re-review yet, but when you're ready just request review from me or tag me |
@zaibon I took a look at the changes to the sharness tests, and realized that what was there (before your changes) needs to be fixed. go-ipfs no longer uses Attn: @aschmahmann |
2455742
to
82e1efb
Compare
82e1efb
to
cc7e14f
Compare
@aschmahmann I just rebased on top of #8053, so this PR should be ready now. |
test/sharness/t0066-migration.sh
Outdated
@@ -90,11 +90,11 @@ test_expect_success "ipfs repo migrate succeed" ' | |||
|
|||
test_expect_success "output looks good" ' | |||
grep "Found outdated fs-repo, starting migration." migrate_out > /dev/null && | |||
grep "Success: fs-repo has been migrated to version 10" migrate_out > /dev/null | |||
grep "Success: fs-repo has been migrated to version 11" migrate_out > /dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a duplicate of the test at line 72-74.
You may want to take this test from the current master branch and reapply your changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is up to date with master branch, all the new code is only related this me PR.
This line looks similar to 71-74, cause it does test the same thing but it is the result of another command. In 71-74 we test the result of the ipfs daemon
command, while here we test the result of the ipfs migrate
command.
@aschmahmann With the recent changes to allow migrations over IPFS, and to import downloaded migrations, we probably want this PR to at least be able to fetch migrations via IPFS. This command would also benefit from being able to import downloaded migrations as CAR files. |
👍
We get this basically for free if we can fetch the migrations using IPFS then if the user really wants to work with CAR files they can use |
@aschmahmann Do you still need some action from me on this ? |
67960ec
to
3a94ced
Compare
@BigLep done. |
am not sure wwhATA U NED ME TO DUE
…On Fri, Aug 13, 2021 at 11:31 AM Christophe de Carvalho < ***@***.***> wrote:
@BigLep <https://github.com/BigLep> done.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#7658 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOB2WPNRT4SA7T5CANRR4JTT4U3EXANCNFSM4Q6YG46Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
I took care of step 3 above to allow this command to use IPFS to download migrations. |
Arg, and not it looks like CI is not passing. I have limited internet bandwidth to track it down, but I believe I sawt his mentioned somewhere else. @aschumann is there another issue we can track against so can then merge this? |
@gammazero : can you please rebase on master and see if it's good to go? |
@gammazero : just checking in - are you able to get this across the line? |
eca5f20
to
59a418b
Compare
@aschmahmann @BigLep As far as I can tell, this PR is done. The problem is that it does not have privileges to run the sharness tests using a |
this command allows to run the repo migration without starting the daemon. resolves ipfs#7471
Additional change to remove leftover debug output from ipfsfetcher.go noticed during testing.
f823d83
to
647cb41
Compare
Closing: This PR is replaced by #8428 to move it into a branch to avoid CI problems associated with the repo. |
* Add 'ipfs repo migrate' command This PR replaces #7658 that was originally contributed by zaibons, in order to move code into a branch and avoid some CI problem. The command allows the user to run the repo migration without starting the daemon. resolves #7471 * return non-ErrNeedMigration errors from fsrepo.Open() Co-authored-by: Gus Eggert <gus@gus.dev>
this command allows to run the repo migration without starting the daemon.
resolves #7471