Kafka patch review tool
Skip to end of metadata
Go to start of metadata

Kafka JIRA and Reviewboard script

1. Setup

  1. Follow instructions here to setup the jira-python package
  2. Follow instructions here to setup the reviewboard python tools
  3. Install the argparse module

2. Usage

3. Upload patch

  1. Specify the branch against which the patch should be created (-b)
  2. Specify the corresponding JIRA (-j)
  3. Specify an optional summary (-s) and description (-d) for the reviewboard

Example:

4. Update patch

  1. Specify the branch against which the patch should be created (-b)
  2. Specify the corresponding JIRA (--jira)
  3. Specify the rb to be updated (-r)
  4. Specify an optional summary (-s) and description (-d) for the reviewboard, if you want to update it
  5. Specify an optional version of the patch. This will be appended to the jira to create a file named JIRA-<version>.patch. The purpose is to be able to upload multiple patches to the JIRA. This has no bearing on the reviewboard update.

Example:

JIRA command line tool

1. Download the JIRA command line package

Install the jira-python package

2. Configure JIRA username and password

Include a jira.ini file in your $HOME directory that contains your Apache JIRA username and password

Reviewboard

This is a quick tutorial on using Review Board with Kafka.

1. Install the post-review tool

If you are on RHEL, Fedora or CentOS, follow these steps

If you are on Mac, follow these steps

For other platforms, follow the instructions here to setup the post-review tool.

2. Configure Stuff

Then you need to configure a few things to make it work:

First set the review board url to use. You can do this from in git:

If you checked out using the git wip http url that confusingly won't work with review board. So you need to configure an override to use the non-http url. You can do this by adding a config file like this:

FAQ

When I run the script, it throws the following error and exits

There are 2 reasons that can cause this -

  • The code is not checked into your local branch
  • The -b branch is not pointing to the remote branch. In the example above, "trunk" is specified as the branch, which is the local branch. The correct value for the -b (--branch) option is the remote branch. "git branch -r" gives the list of the remote branch names.

When I run the script, it throws the following error and exits

One of the most common root causes of this error are that the git remote branches are not up-to-date. Since the script already does that, it is probably due to some other problem. You can run the script with the --debug option that will make post-review run in the debug mode and list the root cause of the issue.

Labels
  • No labels