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

[tools] improve bkctl help message #1793

Merged
merged 3 commits into from
Nov 10, 2018
Merged

[tools] improve bkctl help message #1793

merged 3 commits into from
Nov 10, 2018

Conversation

sijie
Copy link
Member

@sijie sijie commented Nov 7, 2018

Descriptions of the changes in this PR:

Motivation

Currently bin/bktcl help will output all command groups all together.
It is a bit hard to tell what command groups to use, especially some
commands are used for table service.

Changes

Introduce category in the cli spec to define which category that a
command group belongs to. So when it prints out the help message, it
can use that information to categorize the command groups together
to provide better user experience.

Results

$ bin/bkctl help
bkctl interacts and operates Apache BookKeeper clusters

Usage:  bkctl [flags] [command group] [commands]

Infrastructure commands :

    bookie          Commands on operating a single bookie
    bookies         Commands on operating a cluster of bookies
    cluster         Commands on administrating bookkeeper clusters

Ledger service commands :

    ledger          Commands on interacting with ledgers

Table service commands :

    namespace       Commands on operating namespaces
    table           Commands on interacting with tables
    tables          Commands on operating tables

Other commands :

    help            Display help information about it

In order to uphold a high standard for quality for code contributions, Apache BookKeeper runs various precommit
checks for pull requests. A pull request can only be merged when it passes precommit checks. However running all
the precommit checks can take a long time, some trivial changes don't need to run all the precommit checks. You
can check following list to skip the tests that don't need to run for your pull request. Leave them unchecked if
you are not sure, committers will help you:

  • [skip bookkeeper-server bookie tests]: skip testing org.apache.bookkeeper.bookie in bookkeeper-server module.
  • [skip bookkeeper-server client tests]: skip testing org.apache.bookkeeper.client in bookkeeper-server module.
  • [skip bookkeeper-server replication tests]: skip testing org.apache.bookkeeper.replication in bookkeeper-server module.
  • [skip bookkeeper-server tls tests]: skip testing org.apache.bookkeeper.tls in bookkeeper-server module.
  • [skip bookkeeper-server remaining tests]: skip testing all other tests in bookkeeper-server module.
  • [skip integration tests]: skip docker based integration tests. if you make java code changes, you shouldn't skip integration tests.
  • [skip build java8]: skip build on java8. ONLY skip this when ONLY changing files under documentation under site.
  • [skip build java9]: skip build on java9. ONLY skip this when ONLY changing files under documentation under site.


Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

If this PR is a BookKeeper Proposal (BP):

  • Make sure the PR title is formatted like:
    <BP-#>: Description of bookkeeper proposal
    e.g. BP-1: 64 bits ledger is support
  • Attach the master issue link in the description of this PR.
  • Attach the google doc link if the BP is written in Google Doc.

Otherwise:

  • Make sure the PR title is formatted like:
    <Issue #>: Description of pull request
    e.g. Issue 123: Description ...
  • Make sure tests pass via mvn clean apache-rat:check install spotbugs:check.
  • Replace <Issue #> in the title with the actual Issue number.

*Motivation*

Currently `bin/bktcl help` will output all command groups all together.
It is a bit hard to tell what command groups to use, especially some
commands are used for table service.

*Changes*

Introduce `category` in the cli spec to define which category that a
command group belongs to. So when it prints out the help message, it
can use that information to categorize the command groups together
to provide better user experience.

*Results*

```
$ bin/bkctl help
bkctl interacts and operates Apache BookKeeper clusters

Usage:  bkctl [flags] [command group] [commands]

Infrastructure commands :

    bookie          Commands on operating a single bookie
    bookies         Commands on operating a cluster of bookies
    cluster         Commands on administrating bookkeeper clusters

Ledger service commands :

    ledger          Commands on interacting with ledgers

Table service commands :

    namespace       Commands on operating namespaces
    table           Commands on interacting with tables
    tables          Commands on operating tables

Other commands :

    help            Display help information about it
```
@sijie
Copy link
Member Author

sijie commented Nov 8, 2018

run pr validation
run integration tests
run bookkeeper remaining tests

@sijie
Copy link
Member Author

sijie commented Nov 8, 2018

run bookkeeper-server remaining tests

@sijie
Copy link
Member Author

sijie commented Nov 9, 2018

run bookkeeper-server replication tests

@sijie sijie self-assigned this Nov 10, 2018
@sijie sijie merged commit 843c0cc into apache:master Nov 10, 2018
sijie added a commit that referenced this pull request Nov 10, 2018
Descriptions of the changes in this PR:

*Motivation*

Currently `bin/bktcl help` will output all command groups all together.
It is a bit hard to tell what command groups to use, especially some
commands are used for table service.

*Changes*

Introduce `category` in the cli spec to define which category that a
command group belongs to. So when it prints out the help message, it
can use that information to categorize the command groups together
to provide better user experience.

*Results*

```
$ bin/bkctl help
bkctl interacts and operates Apache BookKeeper clusters

Usage:  bkctl [flags] [command group] [commands]

Infrastructure commands :

    bookie          Commands on operating a single bookie
    bookies         Commands on operating a cluster of bookies
    cluster         Commands on administrating bookkeeper clusters

Ledger service commands :

    ledger          Commands on interacting with ledgers

Table service commands :

    namespace       Commands on operating namespaces
    table           Commands on interacting with tables
    tables          Commands on operating tables

Other commands :

    help            Display help information about it
```

Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Matteo Merli <mmerli@apache.org>

This closes #1793 from sijie/add_groups

(cherry picked from commit 843c0cc)
Signed-off-by: Sijie Guo <sijie@apache.org>
@sijie sijie deleted the add_groups branch November 10, 2018 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants