Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Kafka JIRA and Reviewboard script

1. Setup

1. Follow instructions here to setup the JIRA command line tool

2. Follow instructions here to setup the reviewboard tool

3. Download the kafka reviewboard script here and place it in the location of your git checkout.

2. Usage

Code Block

nnarkhed-mn:kafka-git-idea nnarkhed$ python kafka-rb.py --help
usage: kafka-rb.py [-h] -b BRANCH -j JIRA [-s SUMMARY] [-d DESCRIPTION]
                   [-r REVIEWBOARD] [-v VERSION] [-db]

Kafka patch review tool

optional arguments:
  -h, --help            show this help message and exit
  -b BRANCH, --branch BRANCH
                        Tracking branch to create diff against
  -j JIRA, --jira JIRA  JIRA corresponding to the reviewboard
  -s SUMMARY, --summary SUMMARY
                        Summary for the reviewboard
  -d DESCRIPTION, --description DESCRIPTION
                        Description for reviewboard
  -r REVIEWBOARD, --rb REVIEWBOARD
                        Review board that needs to be updated
  -v VERSION, --version VERSION
                        Version of the patch
  -db, --debug          Enable debug mode

3. Upload patch

1. Ensure the patch review tool is in the directory where the git repository is checked out

2. Specify the branch against which the patch should be created (--branch)

3. Specify the corresponding JIRA (--jira)

4. Specify an optional summary (-summary) and (-description) for the reviewboard

Example:

Code Block

 python kafka-rb.py -b origin/trunk -j KAFKA-42 -s "test summary" -d "test description"

4. Update patch

  1. Ensure the patch review tool is in the directory where the git repository is checked out
  2. Specify the branch against which the patch should be created (--branch)
  3. Specify the corresponding JIRA (--jira)
  4. Specify the rb to be updated (--reviewboard)
  5. Specify an optional summary (-summary) and (-description) for the reviewboard, if you want to update it
  6. 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:

Code Block

python kafka-rb.py -b origin/trunk -j KAFKA-42 -r 14081 -s "update summary" -d "update description" --version v2

JIRA command line tool

1. Download the JIRA command line package

Follow instructions here to download the JIRA command line tool package

2. Customize the jira script

  • Customize the jira.sh script to customize "server", "user" and "password"
    Code Block
     java \-jar `dirname $0`/lib/jira-cli-3.6.0.jar \--server "https://issues.apache.org/jira" \--user nehanarkhede \--password \*******\* "$@" 
  • Add an environment variable JIRA_CMDLINE_HOME and point it to the location of the jira.sh script
    Code Block
    
     nnarkhed-mn:kafka-git-idea nnarkhed$ echo $JIRA_CMDLINE_HOME
    /Users/nnarkhed/bin/jira-cli-3.6.0/
    

Reviewboard

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

...