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

Implement 'osnadmin channel info' subcommand and update tests #4892

Closed
wants to merge 5 commits into from

Conversation

Priyansurout
Copy link
Contributor

Implemented the osnadmin channel info subcommand to retrieve detailed information about a specific channel from an Ordering Service Node (OSN). This involved modifying the CLI commands and adding corresponding functionality to interact with the channel participation API.

Type of change

  • New feature

Implemented the osnadmin channel info subcommand to retrieve detailed information about a specific channel from an Ordering Service Node (OSN).

  • Introduced info subcommand under osnadmin channel to support querying individual channel details.
  • Updated existing tests and added new tests to cover the new feature and edge cases.

Closes #4890

Signed-off-by: Priyansu Rout <priyansurout192004@gmail.com>
@Priyansurout Priyansurout requested a review from a team as a code owner June 13, 2024 18:37
Signed-off-by: Priyansu Rout <priyansurout192004@gmail.com>
Signed-off-by: Priyansu Rout <priyansurout192004@gmail.com>
Signed-off-by: Priyansu Rout <priyansurout192004@gmail.com>
Signed-off-by: Priyansu Rout <priyansurout192004@gmail.com>
Copy link
Contributor

@denyeart denyeart left a comment

Choose a reason for hiding this comment

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

You got a check failure because anytime you change commands, you need to regenerate the doc to match.

See the instructions at
https://github.com/hyperledger/fabric/blob/main/docs/source/docs_guide.md#commands-reference-updates

Basically, the command help will be called when you regenerate the doc with each of the subcommands (including the new one which needs to be added in scripts/generateHelpDocs.sh), and this help text will be injected into the osnadminchannel.md doc topic which also needs to be included in the pull request.

You'll also need to add some text to the doc topic preamble and postscript.

To better understand, you can look at the commit that added the initial osnadmin help doc. This will show all the updates that are needed.
1e90c88

Comment on lines +55 to +56
info := channel.Command("info", "Get detailed information about a specific channel.")
infoChannelID := info.Flag("channelID", "Channel ID").Short('c').Required().String()
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm thinking we can do this in a backward compatible way.
Keep the support for passing channel id to list with this line:
listChannelID := list.Flag("channelID", "Channel ID").Short('c').String()

Then add an entirely new "info" command.

Change the function osnadmin.ListSingleChannel() to osnadmin.Info() and have both of them call it.

The help text doesn't need to mention that you can pass channel id to list command anymore, but keep the functionality there so that any existing users that depend on it don't break.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should we introduce a osnadmin channel info subcmd?
2 participants