Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

feat: filter IPFS addrs correctly #62

Merged
merged 18 commits into from
Oct 20, 2017
Merged

feat: filter IPFS addrs correctly #62

merged 18 commits into from
Oct 20, 2017

Conversation

dryajov
Copy link
Member

@dryajov dryajov commented Aug 3, 2017

This depends on mafmt PR - multiformats/js-mafmt#16

@dryajov dryajov added the status/in-progress In progress label Aug 3, 2017
@dryajov dryajov requested review from daviddias and a team August 3, 2017 21:42
@dryajov dryajov force-pushed the feat/circuit-interop branch from e012fdd to a49b546 Compare August 3, 2017 21:45
@daviddias daviddias mentioned this pull request Aug 3, 2017
53 tasks
@dryajov dryajov requested review from dignifiedquire and whyrusleeping and removed request for a team August 16, 2017 02:21
src/index.js Outdated
@@ -2,7 +2,6 @@

const connect = require('pull-ws/client')
const mafmt = require('mafmt')
const includes = require('lodash.includes')
Copy link
Member

Choose a reason for hiding this comment

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

can this module be removed from the dependencies now?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's gone! 👍

@dryajov dryajov mentioned this pull request Aug 16, 2017
48 tasks
src/index.js Outdated
return mafmt.WebSockets.matches(ma) ||
mafmt.WebSocketsSecure.matches(ma) ||
mafmt.WebSocketsIPFS.matches(ma) ||
mafmt.WebSocketsSecureIPFS.matches(ma)
Copy link
Member

Choose a reason for hiding this comment

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

Following multiformats/js-mafmt#16 (comment), if you do multiple assertions anyways, why having some mix and some not. Just assert for IPFS separately.

From this Boolean assertion, seems that having IPFS is actually not relevant.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wasn't sure when I coded this if it was the best way of doing it. The main idea behind leaving the non IPFS version was fear of breaking something else. I think in this case it should be safe to just do:

 mafmt.WebSocketsIPFS.matches(ma) ||
 mafmt.WebSocketsSecureIPFS.matches(ma)

Copy link
Member Author

@dryajov dryajov Aug 17, 2017

Choose a reason for hiding this comment

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

As for being able to just do IPFS.match(ma) as you pointed out in multiformats/js-mafmt#16 (comment), I don't think that would work, since it would also match TCP and WebRTC addrs here.

@dryajov dryajov force-pushed the feat/circuit-interop branch from 08ab66b to e600990 Compare August 29, 2017 22:52
@dryajov dryajov changed the title feat: filter IPFS addrs correctly WIP - feat: filter IPFS addrs correctly Aug 29, 2017
@dryajov dryajov force-pushed the feat/circuit-interop branch from e600990 to 58410a2 Compare September 3, 2017 22:24
@dryajov dryajov closed this Sep 14, 2017
@dryajov dryajov removed the status/in-progress In progress label Sep 14, 2017
@dryajov dryajov reopened this Sep 14, 2017
@dryajov dryajov added the status/in-progress In progress label Sep 14, 2017
@dryajov dryajov changed the title WIP - feat: filter IPFS addrs correctly feat: filter IPFS addrs correctly Sep 16, 2017
Copy link
Member

@daviddias daviddias left a comment

Choose a reason for hiding this comment

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

@dryajov a PR should not be considered "Ready to Review and Merge" if CI is failing.

Also, could you make sure to update deps as part of this PR?

@dryajov
Copy link
Member Author

dryajov commented Oct 13, 2017

Seems like travis is failing on an IO error, not sure what it means exactly - I don't see a specific error besides xfvb not starting, which is most likely a side effect. I can see circle bailing out of a failed chrome install.

Also, I don't have a way of triggering rebuilds so my ability to troubleshoot this is limited.

@daviddias
Copy link
Member

@dryajov use the latest CI configs from https://github.com/ipfs/js-ipfs

@ghost ghost assigned dryajov Oct 13, 2017
package.json Outdated
"coverage-publish": "aegir-coverage publish"
"lint": "aegir lint",
"build": "aegir build",
"test": "aegir test --target node --target browser",
Copy link
Member

Choose a reason for hiding this comment

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

try with --no-parallel and increasing the timeout for the test with multiple writes

@dryajov
Copy link
Member Author

dryajov commented Oct 16, 2017

@diasdavid this is passing now in both travis and circle... had to go pretty aggressive with the timeout tho, will need to fine tune - but I think we can merge safely for now?

@dryajov
Copy link
Member Author

dryajov commented Oct 17, 2017

@diasdavid I removed the global timeouts and this should be ready to merge.

* feat: resolve 0 addresses

* chore: upgrading pull-ws

* chore: update circle CI

* chore: update gitignore
@ghost ghost assigned daviddias Oct 20, 2017
@daviddias daviddias removed the request for review from whyrusleeping October 20, 2017 10:47
Copy link
Member

@daviddias daviddias left a comment

Choose a reason for hiding this comment

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

Let's wait for that CI now :)

@daviddias daviddias merged commit 9ddff85 into master Oct 20, 2017
@daviddias daviddias deleted the feat/circuit-interop branch October 20, 2017 11:12
@ghost ghost removed the status/in-progress In progress label Oct 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants