-
Notifications
You must be signed in to change notification settings - Fork 411
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
Document PubSub changes from go-ipfs v0.11 #1007
Comments
We made a change and it's causing bugs. We used to accept regular strings for pubsub topics over the HTTP API, now we require Base64URL encoding prefixed with a 'u'. |
Fix for the areas specified by @TheDiscordian at PR #1046 |
@TMoMoreau or @TheDiscordian Sorry, I'm new to Base64URL encoding and can't find any discussion of it in respect to a prefix. (46 seems to mean Arguments
Request BodyArgument As for affecting other APIs, publish is the only one that writes and has a Request Body, so it seemed to me that that's the only one to change. Is that correct thinking? (To read existing stuff, you'd have to call it by whatever it's named.) |
@Annamarie2019 The Thanks so much for investigating! Edit: Also sorry for not updating this issue when I realised other prefixes are possible! Totally slipped my mind. |
For reference, this is what the article says now: /api/v0/pubsub/pubPublish data to a given pubsub topic. Arguments Request Body I'll display my ignorance here, in case it helps the cause, but I don't understand:
|
Sorry, I'm genuinely not understanding the disconnect here. @TMoMoreau should be able to update his PR with this new info though. Edit: BTW some of the confusion you've outlined really might be worth new issues to help with clarity. |
Updated PR to document the changes that this issue specified. #1065 |
Related: ipfs/go-ipfs-cmds#224 |
Thanks, @TheDiscordian I read so much stuff, that i forgot where I started: "we used to accept regular strings for pubsub topics...now we require....." (Duh!) So how's this for the update: Arguments |
@TMoMoreau Thanks. Your explanation in #1065 is great, but if we have it up by the argument, maybe after the curl example, all we need to say is, something like: Arguments Request Body...
cc: @TheDiscordian |
@TMoMoreau @TheDiscordian Should we add the u prefix before the topics and link to this explanation for https://docs.ipfs.io/reference/cli/#ipfs-pubsub in the subcommands (maybe tick marks around those commands as well)? |
@lidel First, reading the source, both pub and sub expect multibase, yes? If so, is this bandaid okay (until maybe a new type can be brewed up): https://github.com/ipfs/go-ipfs/blob/a61c53f87fc6b5341c8d0a0b088cb16dd59f8cc8/core/commands/pubsub.go#L173 "Topic to publish to." -> "Topic to publish to (multibase encoded)." I specifically want to know if If so @TMoMoreau can make a PR with those changes. And hopefully put this issue to bed until a better issue spawns. |
iirc all The proposed bandaid is fine until ipfs/go-ipfs-cmds#224 is addressed 👍 There is a small caveat tho: Due to this, we need to clarify that in a way that looks acceptable on both HTTP RPC API reference page, and when user reads Pubsub commands are marked as experimental, so we don't need to stress too much about this, does not have to be pretty. Maybe |
Adds clarification for pubsub multibase encoding over HTTP RPC for issue ipfs/ipfs-docs#1007
* pubsub multibase encoding Adds clarification for pubsub multibase encoding over HTTP RPC for issue ipfs/ipfs-docs#1007 * Grammatical change * Moved period
Closing this since ipfs/kubo#8933 was merged |
Remaining work documented in #1146 |
* pubsub multibase encoding Adds clarification for pubsub multibase encoding over HTTP RPC for issue ipfs/ipfs-docs#1007 * Grammatical change * Moved period
* pubsub multibase encoding Adds clarification for pubsub multibase encoding over HTTP RPC for issue ipfs/ipfs-docs#1007 * Grammatical change * Moved period (cherry picked from commit 9a84a4f)
* pubsub multibase encoding Adds clarification for pubsub multibase encoding over HTTP RPC for issue ipfs/ipfs-docs#1007 * Grammatical change * Moved period (cherry picked from commit 9a84a4f)
* pubsub multibase encoding Adds clarification for pubsub multibase encoding over HTTP RPC for issue ipfs/ipfs-docs#1007 * Grammatical change * Moved period (cherry picked from commit 9a84a4f)
This describes the issue very well: ipfs/kubo#8612
Caused by: ipfs/kubo#8343
Relevant areas: https://docs.ipfs.io/reference/http/api/#api-v0-pubsub-pub && https://docs.ipfs.io/reference/http/api/#api-v0-pubsub-sub (Edit: This actually doesn't effect
sub
, details below!)Basically, we used to accept regular strings for pubsub topics over the HTTP API, now we require Base64URL encoding prefixed with a 'u' (Edit: As outlined below, this isn't entirely true, Base64URL is the default/recommended encoding, but technically any multibase should work https://github.com/multiformats/multibase, which is where the
u
comes from). Noting this down in an issue so I don't forget, I spun my wheels on this for a while not realizing this change happened, this is probably a good first issue though.Also not sure how other APIs have been effected. I believe the CLI handles this for you for example.
The text was updated successfully, but these errors were encountered: