Skip to content
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

feat(iroh-cli): improve ergonomics of iroh gossip subscribe CLI cmd #2751

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

matheus23
Copy link
Member

Description

Previously the gossip command could be confusing:

$ iroh gossip subscribe test --start
error: invalid value 'test' for '[BOOTSTRAP]...': decoding: base32: non-zero trailing bits at 3

Now, the output is more helpful:

$ iroh gossip subscribe test --start
error: the following required arguments were not provided:
  <--topic <TOPIC>|--raw-topic <RAW_TOPIC>>

Usage: iroh gossip subscribe --start <--topic <TOPIC>|--raw-topic <RAW_TOPIC>> <BOOTSTRAP>...

For more information, try '--help'.

And the help text also contains examples & explanation on how the command works.

Breaking Changes

None. The command still works the same way.

Notes & open questions

Closes #2698

Should we rename the command? When I read gossip subscribe initially, I thought a gossip publish command may be missing. But actually gossip subscribe does both.
Perhaps gossip join may be better?
But also: We want to keep the CLI names in sync with the names in the code API. Perhaps we should rename the API call to be join instead of subscribe? Or perhaps something like open_topic?
Anyhow - perhaps that's food for thought & another PR.

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • [ ] Tests if relevant.
  • All breaking changes documented.

@matheus23 matheus23 self-assigned this Sep 27, 2024
Copy link

github-actions bot commented Sep 27, 2024

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2751/docs/iroh/

Last updated: 2024-09-30T08:40:35Z

Copy link
Contributor

@dignifiedquire dignifiedquire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, at least now one can figure out how to use it 😅

@dignifiedquire dignifiedquire changed the title feat(cli): Improve ergonomics of iroh gossip subscribe CLI cmd feat(iroh-cli): improve ergonomics of iroh gossip subscribe CLI cmd Sep 30, 2024
Copy link

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: 52626d4

@dignifiedquire dignifiedquire added this pull request to the merge queue Sep 30, 2024
Merged via the queue into main with commit 90fd6f0 Sep 30, 2024
28 checks passed
@matheus23 matheus23 deleted the matheus23/gossip-subscribe branch September 30, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

gossip cli commands are unusable
2 participants