-
Notifications
You must be signed in to change notification settings - Fork 22
Conversation
``` | ||
{ | ||
"Hash": "Qmd286K6pohQcTKYqnS1YhWrCiS4gz7Xi34sdwMe9USZ7u", | ||
"Links": null |
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.
Are Links
supposed to be always null
on this endpoint?
ipfs object links
returns 2 links for this Hash
, for example:
➜ js-ipfs git:(master) ✗ ipfs object links Qmd286K6pohQcTKYqnS1YhWrCiS4gz7Xi34sdwMe9USZ7u
QmPEKipMh6LsXzvtLxunSPP7ZsBM8y9xQ2SQQwBXy5UY6e 262158
QmT8onRUfPgvkoPMdMvCHPYxh98iKCfFkBYM1ufYpnkHJn 181100
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'm not sure. @whyrusleeping?
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 is for ipfs object patch append-data
? I have no idea why it would be returning Links
... seems wrong
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.
Removing it. Opened ipfs/kubo#2589.
"Hash": "QmSt5pTDuoZ5xi1iqroo8W57Fvp4U23h5gXfj6X7rWLcbn", | ||
"Links": null | ||
} | ||
``` |
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.
Isn't this a bug as well? Isn't the third arg required?
BTW, I tried running this locally and I'm getting the same behaviour as the Request With Invalid Third Argument (There is no response: the request hangs.)
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.
@diasdavid Do you have any idea?
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.
(let's see if I managed to jump into the same context where your heads are)
So for this req:
curl -i -X POST "http://localhost:5001/api/v0/object/patch/add-link?arg=QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn&arg=foo&arg=
We are adding to the MerkleDAG object, which multihash is "QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn", a link with key "foo" and value "".
There isn't really anything wrong with adding empty links, other than it is worthless from the practical standpoint. Nevertheless, pointing to null is a valid pointer and it should not hang nor crash.
Did I answer your question?
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.
Suitable for me. This works.
@diasdavid not #32. That's a wontfix. Review this and #67. |
555decf
to
eb921be
Compare
This closes #32, if #67 is also merged. Opened in new PR because rebasing is hell.