-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
If someone needs a temporary workaround, either apply this patch manually, or avoid using |
Thanks for submitting this - could you add a test please, to prevent future regressions. |
7bcb8e6
to
7436d9f
Compare
@achingbrain Yeah sure, which file should I add the test to? I see that Should I create a new file? |
Awesome, thanks - please add it to the interface suite: https://github.com/ipfs/js-ipfs/blob/master/packages/interface-ipfs-core/src/files/read.js |
7436d9f
to
ebd01bc
Compare
Pushed a test, also checked that the test was failing before the fix so this should catch future issues. |
Yikes, not sure what';s up with the CI errors, but I don't think it's a result of the PR |
The new test is failing when run against kubo. I've fixed it up by copying the added file to the MFS first, rather than using MFS methods to read the block using the ipfs path. This is a bug with kubo really, it should be able to handle raw leaves. |
TY for the quick turnaround time. 😁 Is this something that will be auto-released or is there somewhere I can track the release schedule? |
@RangerMauve most of the js ipfs/libp2p repos use release-please action which, on push to master, publishes an rc and preps a release pr. |
I notice some of the jobs failed, does that mean I need to wait for the next successful release for the publish? https://github.com/ipfs/js-ipfs/actions/runs/3895148505/jobs/6650213839 |
An rc is published with every successful merge to master. The current HEAD is passing so this is available to try out via |
Perfect thank you. I'll subscribe to that and update my deps accordingly. 🙇 |
Actually looking back on this, I don't think it's a bug in kubo. The original test used Adding the CID to the MFS with a file name and then reading that works because both js-ipfs and kubo can resolve the file name as an MFS path. The approach Kubo takes, although less flexible, is probably easier to reason about so is probably preferable. |
Currently, if you write to an MFS directory with
rawLeaves: true
, it'll error out when doing a read sayingError: /example-0/example.txt was not a file
.This accounts for that case by handling the
raw
type the same as a file.There might be other places this should be looked at but this was an immediate blocker I was dealing with.
This might also be something we should fix in the exporter?