Sunday, December 5, 2010

Starting code reviews with Crucible

Crucible is an Atlassian product which makes code reviewing process easy.

Here I describe the steps I learned in creating a code review in Crucible. Hope this helps some one who is new to Crucible like me.

Step 1: Login to your crucible account in the hosted crucible server instance.
Step 2: Start creating a review by:
    - Clicking 'Dashboard' on the menu bar on top-> click 'create review' on left hand pane.
    - OR clicking 'Tools' on top right corner and select 'create review'.
Step 3: Select a project for the review by the drop down list.

Here, in the drop down list, you may or may not find the project that include source files that you are going to review. You will find it in the drop down list only if some one had already added that project before for a code review. 

If you find it in here, then your life will be easier. Just follow the rest of the steps mentioned here to complete creating the code review.

If you did not find the project that you want to review on the aforementioned list, then you have to create a project by going to the administration panel.

i. Click on the drop down icon next to your name on top right corner and select 'Administration' .
ii. Login with the administration credentials.
iii. In the Admin menu (on the left) select 'new' under 'Project Settings'.
iv. You will have to enter the details of the project that you are going to create here. Under the Default Repository, you need to select the repository location of the project that you are going to create for the review.
v. If the repository is not already added, you can create a repository by selecting 'new' under Repository settings on the Admin menu.

You have to be little careful about filling the repository details, for the 'svn url' you need to give the root svn location and under 'svn path', you need to give the specific path to the location of the files of your project.

For an example, if you are going to review the code located in: https://svn.wso2.org/repos/wso2/trunk/carbon/components/apacheds-server/,
svn url is: https://svn.wso2.org/repos/wso2/
svn path is: trunk/carbon/components/apacheds-server/

I got the following error when creating the repository because of not setting above two values correctly.
Repository paused due to error - class com.cenqua.fisheye.rep.DbException: Problem getting diff information...
There fore make sure to fill them correctly.

After creating the repository, go back to step iv above and complete the project creation step.

Now go to your account's dashboard again, and in the Step 3 above, now you will see the project you created in the drop down menu. So you can continue with creating the review.

Atlassian has developed plug-ins to integrate crucible with Intellij-IDEA so that you can participate in code reviews and perform all the actions with in your favorite IDE.
Find how to install the plug-in here
Find how to configure the plug-in for your project and IDE from here.
Then find how to use Intellij IDEA for code reviews here.

Happy code reviewing..! :)

1 comment:

  1. Hello Hasini,
    Pls forgive my interrupt, but I put a message on wso2 board to which you kindly replied and asked for more info.

    I REAlly NEED TO GET A REPLY.
    please:

    Hi,

    Sure, we are trying to read an external web service for Authentication attributes and store them wso2 internal D/B for use in XCML.
    I am having a very hard time trying to figure out how to call my web service from wso2.
    I can see how to set up a schema in your D/B, barely.
    I can see how the XCML should work to draw upon the D/B content.
    But how to get the Authentication attributes into the wso2 internal D/B is a puzzle.

    Intitially we are not going to use the ABAC route, but want to gain enough
    experience with XCML in an RBAC setting to be able to cut over to an ABAC in the future.

    Any help is greatly appreciated.

    ThankS much

    ReplyDelete

Note: Only a member of this blog may post a comment.