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

fix(setup): load plugins before attempting to setup IPFS #795

Merged
merged 1 commit into from
Jun 7, 2019
Merged

Conversation

b5
Copy link
Member

@b5 b5 commented Jun 7, 2019

need to load plugins before attempting to configure IPFS, flatfs is
specified as part of the default IPFS configuration, but all flatfs
code is loaded as a plugin. ¯_(ツ)_/¯

This works without anything present in the /.ipfs/plugins/ directory b/c the default plugin set is complied into go-ipfs (and subsequently, the qri binary) by default

Our tests missed this because the test suite needs to load all plugins to run
tests in the first place. This is going to be particularly tough to test.
We'll need to either:

  • figure out a way to cleanly unload all plugins in IPFS
  • use an "external" test of some sort

We should do some research into plugin unloading, we could also consider using a higher level package to test the "final" setup behaviour, which may not call plugin loading at initialization time.

need to load plugins before attempting to configure IPFS, flatfs is
specified as part of the default IPFS configuration, but all flatfs
code is loaded as a plugin.  ¯\_(ツ)_/¯

This works without anything present in the /.ipfs/plugins/ directory b/c
the default plugin set is complied into go-ipfs (and subsequently, the
qri binary) by default

Our tests missed this because the test suite needs to load all plugins to run
tests in the first place. This is going to be particularly tough to test.
We'll need to either:
* figure out a way to cleanly unload all plugins in IPFS
* use an "external" test of some sort

We should do some research into plugin unloading, we could also consider
using a higher level package to test the "final" setup behaviour, which
may not call plugin loading at initialization time.
@b5 b5 requested a review from ramfox June 7, 2019 18:23
@b5 b5 self-assigned this Jun 7, 2019
@b5 b5 added fix A bug fix onboarding issues getting up & running with Qri, including both buggy behaviours and UX confusion labels Jun 7, 2019
@b5 b5 requested a review from dustmop June 7, 2019 18:31
Copy link
Contributor

@dustmop dustmop left a comment

Choose a reason for hiding this comment

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

Wow. LGTM

@b5 b5 merged commit 69c5fda into master Jun 7, 2019
@b5 b5 deleted the fix_setup branch June 7, 2019 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix A bug fix onboarding issues getting up & running with Qri, including both buggy behaviours and UX confusion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants