-
Notifications
You must be signed in to change notification settings - Fork 96
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
refactor: Use inmemory Kubo API if the local node is used. #1615
Conversation
@philwinder just so you know, this is an improvement but I don't think this is solving the exact case we intended to solve (meaningfull stack traces when debugging) because AFAIT the internal node is not used when doing I think a second PR that add support for inprocess kubo node will be needed. |
Hi @Jorropo no I think this PR is what we want by default: Also, the specific problem I was having was with the I've just finished my load tests with this version and the So, fingers crossed, I think this fixes that issue. However, some of the tests are broken, so I need to fix them before merging. But you're right, in the future, there could be an option of using a direct client with the |
Honnestly that very surprising, there are possibilities that Kubo's http api client or server is at fault but except than this, this should be the same codepaths. |
Some issues with respect to how Bacalhau currently uses timeouts. Working through them. Thread: https://filecoinproject.slack.com/archives/CRLC5H4J0/p1673347336829899 |
@philwinder this happen because your tests is using the same node to add and get the files and flatfs does not use context (see ipfs/kubo#9532 (comment)). I think your easiest path here is to use two different IPFS nodes and have them |
f0f8a03
to
3bb067a
Compare
This does 2 main things: First, change the connection to the local IPFS node to directly wire the local CoreAPI object. This will make stack traces more usefull and skip an extra HTTP step, helping to debug. Secondly, more correct type enforcement around the ipfs.Client object, there were many places with code like this: ```go result, err := doStuffFunc(params, client.APIAddress()) // ... func doStuffFunc(params paramsT, api string) (result, error) { cl, err := ipfs.NewClient(api) if err != nil { return nil, err } // ... } ``` All of thoses has been rewriten to: ```go result, err := doStuffFunc(params, client) // ... func doStuffFunc(params paramsT, cl ipfs.Client) (result, error) { // ... } ``` Passing typed clients object is much more expressfull than strings. Fixes #1523
3bb067a
to
07cc484
Compare
timeouts aren't respected when getting cached files
This does 2 main things:
First, change the connection to the local IPFS node to directly wire the local CoreAPI object. This will make stack traces more usefull and skip an extra HTTP step, helping to debug.
Secondly, more correct type enforcement around the ipfs.Client object, there were many places with code like this:
All of thoses has been rewriten to:
Passing typed clients object is much more expressfull than strings.
Fixes #1523