-
Notifications
You must be signed in to change notification settings - Fork 106
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
fix: test for subscribers to ipns pubsub topic #584
Conversation
555a187
to
ab6b385
Compare
I did not mean to close this, bad Github. |
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.
The code looks fine to me. Seems to just be validating that Kubo is actually subscribed like you mention in the PR description.
However, I'm confused why trying to resolve the IPNS name causes Kubo to subscribe to it. Is this a Kubo specific behavior or something in a spec somewhere?
"IPNS over pubsub" is an example of alternative way of resolving IPNS (than Amino DHT). Modified test's Kubo runs with "IPNS over PubSub" experiment enabled:
This means once we resolve IPNS name, we keep subscription to a topic specific to the name, for getting updates faster than over DHT. |
@achingbrain are you good with this change? also, since this is a published "testing" package, I think it should be "fix: " in PR title |
@achingbrain ping, if we land this we can remove workaround from https://github.com/ipfs/kubo/pull/10490/files#diff-08fd495f89f05538a2cd6179a4936bbcea98ae9ff3fcecefb295fdf758acfcd5R74 |
Description
IPNS interop tests for helia→pubsub→kubo did not execute the same tests as kubo→pubsub→helia.
Namely, publishing to IPNS was executed with assumption it will fail, as a convoluted way of confirming the kubo is not subscribed to the topic, and also kubo connectivity state is somehow taken on belief, rather than being programmatically verified:
Good news is that there are native APIs for inspecting subsub topic subscriptions, and this PR refactors test to use them and have tests in both directions do more-or-less the same thing with the same asserts.
This should make interop less brittle.
Notes & open questions
This PR aims to fix problem identified in ipfs/kubo#10488 (comment).
Change checklist