-
Notifications
You must be signed in to change notification settings - Fork 15
refactor: use new async await APIs and update ipfsd-ctl #96
Conversation
TODO: 1. [ ] fix the websocket-star tests - websocket-star was not conevrted to async/await and has a security vulnerability. Switch to using stardust or webrtc-star for the tests 1. [ ] fix ipfsd-ctl to auto kill process if it does not stop within a timeout. The previous version of ipfsd-ctl had this feature and was killing go-ipfs daemons. I've observed here and in master that go-ipfs does not quit when running tests where it sends files to/from a js-ipfs node. @Stebalien were you aware? 1. [ ] fix issue with ky never returning from a call to `res.json()` if the payload is BIG. IDK why but ky clones the response, which causes it to be piped to two places, the first is never consumed so for large responses the high water mark is hit and th stream stops flowing. It's similar to the problem we [worked around here](https://github.com/ipfs/js-ipfs-http-client/blob/d7eb0e8ffb15e207a8a6062e292a3b5babf35a9e/src/lib/error-handler.js#L12-L23).
I'll work on converting this over to webrtc-star |
Go-ipfs will try to wait for all in-progress commands to stop. If that doesn't work, it'll die after 10s. We try to cancel in-progress commands but could be getting stuck. Could you file an issue somewhere? We should try killing go-ipfs with SIGQUIT sometime to see where it's getting stuck (that will dump a stack trace). |
@Stebalien should we wait for the 10s or just SIGKILL please have a look at ipfs/js-ipfsd-ctl#441 (review) |
…efactor/async-await
* fix: throw if no requested address is available We loop through available multiaddrs looking for certain types of address in our tests. If there are non of the type we are looking for, we don't return anything which results in undescriptive error messages from libp2p. The change here is to throw an error with an explicit message if, for example, no webrtc-star address is available when we expect there to be. * chore: pr comments Co-Authored-By: Alan Shaw <[email protected]>
Looks like it just needs the two gh urls removing from package.json and it's good to go. @alanshaw build is green - is the fix for the |
The test is skipped. It still needs fixing (i.e. remove ky from ipfs-http-client) but we can probably merge this, open an issue and revisit when we've fixed the ky issue. cc @hugomrdias |
yes, ill remove ky asap and come back to this issue. |
I'm going to merge this since this branch is basically defacto master right now. I've opened #101 to track the skipped test. |
resolves #92 - does not specify
bits
anymoreresolves #31 - uses "test" profile for all daemon spawns
resolves #30 - new ipfsd-ctl exposes daemon logs via
DEBUG=ipfsd-ctl:daemon:std*
TODO:
res.json()
if the payload is BIG. IDK why but ky clones the response, which causes it to be piped to two places, the first is never consumed so for large responses the high water mark is hit and the stream stops flowing. It's similar to the problem we worked around here.