-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat: add js-kubo-rpc-client #764
feat: add js-kubo-rpc-client #764
Conversation
@lidel I removed the USE_KUBO_JS env var and just passed as overrides to ipfsd-ctl now. should be good to go on this PR |
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.
I think it's worth adding a test that uses the kubo rpc client
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.
iiuc test/*.spec.js
still use js-ipfs-http-client
for talking to Kubo? (e.g., controller one)
I think you need to either refactor them to use js-kubo-rpc-client instead, or duplicate, so we test both.
Good catch, i'm not sure how I missed that. Updated and added logging to ensure that we're using the module we think we're using. |
Log of running |
There are already tests using kubo via ipfsd-ctl's |
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.
LGTM, just a few small tweaks required
Converts this module to typescript
I've done the typescript conversion work in #777 (like #776 but without the changes from this PR). I don't want to merge it off the bat as it'll stomp all over these changes - if it's not a totally outrageous request, could you try integrating |
package.json
Outdated
@@ -152,13 +152,15 @@ | |||
"wherearewe": "^2.0.1" | |||
}, | |||
"devDependencies": { | |||
"@libp2p/interfaces": "^3.0.3", |
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.
without this, ipfs-core-types
was failing on a lack of types from @libp2p/interfaces/events
from the line import type { EventHandler } from '@libp2p/interfaces/events'
tests seem to be stuck on this PR for some reason.. running them at https://github.com/SgtPooki/js-ipfsd-ctl/actions/runs/3178121664 |
@achingbrain CI is passing |
@SgtPooki : that's great. @achingbrain : any concerns with merging? I want get @SgtPooki unblocked. If it's not ok to merge, can you lay out what the conditions for merging will be? |
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.
LGTM, just a couple of small nits and it's good to go.
package.json
Outdated
@@ -152,13 +152,15 @@ | |||
"wherearewe": "^2.0.1" | |||
}, | |||
"devDependencies": { | |||
"@libp2p/interfaces": "^3.0.3", |
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 dep is added but doesn't appear to be used anywhere?
"@libp2p/interfaces": "^3.0.3", |
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.
When removing this, ipfs-core-types throws an error
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.
@SgtPooki : a couple of thoughts:
- Do you want to paste in the error observed to aid in understanding or debugging?
- assuming getting this merged is blocking other work you're trying to do for the js-kubo-rpc-client, I think it's safe to merge and then we fast-followup if there's something deeper to address that @achingbrain calls out.
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.
pushing up a change removing this to see if CI still passes.
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.
@BigLep thanks for chiming in. I was keeping an eye out for the error. I did already comment on the file changes with the error. I was going to share it in the CI if seen there, but it looks like it's going to pass
## [12.2.0](v12.1.1...v12.2.0) (2022-10-05) ### Features * add js-kubo-rpc-client ([#764](#764)) ([9538c1d](9538c1d))
🎉 This PR is included in version 12.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
see ipfs/kubo#9125 and ipfs/js-kubo-rpc-client#3
fixes ipfs/js-kubo-rpc-client#3