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

chore(deps): bump ipfs to v0.5.0 #1273

Closed
wants to merge 3 commits into from
Closed

chore(deps): bump ipfs to v0.5.0 #1273

wants to merge 3 commits into from

Conversation

b5
Copy link
Member

@b5 b5 commented Apr 9, 2020

closes #1225

I'm going to leave this as a draft while we work on the 0.5.0 upgrade process. We'll only merge this after 0.5.0 has landed.

@b5 b5 added chore Changes to the build process or auxiliary tools and libraries such as documentation generation qfs qri filesystem persistence issues (includes IPFS persistence issues) labels Apr 9, 2020
@b5 b5 self-assigned this Apr 9, 2020
@b5 b5 changed the title Chore bump ipfs chore(deps): bump ipfs to v0.5.0 Apr 9, 2020
@b5 b5 force-pushed the chore_bump_ipfs branch from 3cd06f4 to 5cc19b2 Compare April 15, 2020 22:24
@b5 b5 added this to the v0.9.9 milestone Apr 27, 2020
@@ -129,7 +131,13 @@ func NewCAFSStore(ctx context.Context, cfg *config.Config) (store cafs.Filestore
},
ipfs.OptsFromMap(cfg.Store.Options),
}
return ipfs.NewFilestore(fsOpts...)
store, err = ipfs.NewFilestore(fsOpts...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't let me comment on the actual import, but the change in cmd from importing qfs/cafs/ipfs as qipfs makes understanding what's happening much easier.
Recommend changing it in repo/buildrepo/build.go as well! Perhaps also qipfs_http

@b5 b5 mentioned this pull request Apr 29, 2020
8 tasks
}

if err = f.Init(); err != nil {
return err
if errors.Is(err, qipfs.ErrNeedMigration) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to migrate before this point, I am getting a nil pointer dereference error before we even get into the connect command code:

In our cmd PersistentPreRun func, we call opt.Instance() to get an instance so we can get to the config. opt.Instance() runs o.Init(), which calls lib.NewInstance, which errors with the ipfs ErrNeedsMigration error. o.Init() returns the error, and opt.Instance() does not display the error, but does pass back nil as the instance pointer. When we try to access the config using this nil instance pointer, we get the nil pointer dereference error.

Made a change to move the migration into o.Init(), handling the confirmation there. But this also feels wrong, and seems like it should happen when we try to give the Instance the Filestore, but still feeling for what is appropriate.

However, making this change meant I successfully migrated my repo!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made these changes on branch chore_ipfs_bump_ramfox, didn't want to push to this branch before knowing if these changes made sense

@b5
Copy link
Member Author

b5 commented Jun 24, 2020

closing! We've merged a migration to ipfs v0.6.0 into master

@b5 b5 closed this Jun 24, 2020
@b5 b5 deleted the chore_bump_ipfs branch June 24, 2020 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes to the build process or auxiliary tools and libraries such as documentation generation qfs qri filesystem persistence issues (includes IPFS persistence issues)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrating to go-ipfs v0.5.0
2 participants