Project idea for "Better Bugzilla Integration"

103 views
Skip to first unread message

Anshu Kumar

unread,
Mar 19, 2012, 5:10:04 PM3/19/12
to reviewbo...@googlegroups.com, mike.d...@gmail.com
Hi Guys,

I looked into the GSoC project ideas for Review Board and I would like to improve the community by doing some project under GSoC with ReviewBoard. I have an idea which can be applied to the project "Better Bugzilla Integration". The idea is

1. There will be a "Code Review" button on bugzilla's interface. While submitting a patch, you will have to select the repository from the drop down. The information about repositories can be extracted from Review Board instance.

2. Clicking on Code Review button will take you to the review board interface maybe in a popup. The submitted patch will be right there on the review board's file new RR form. You will have to give other details there. Fill in the details and click on submit.

3. After that the popup will be closed and submitting the bug will cause a review request to be created.

4. There would be a minimum number of ship it's, before which a particular user cant commit the code. A pre commit hook will check the no of ship its and will restrict code from checking in.

5. If you have required no of Ship Its, you can commit the code. After code checkin, the status of review request will be changed to Submitted and the corresponding changes will be done on the bugzilla also.

--
Regards,
Anshu Kumar

Mike Conley

unread,
Mar 20, 2012, 7:54:31 PM3/20/12
to Review Board Summer of Code
Hey Anshu,

Thanks for getting in touch! I have a few questions regarding your
proposal:

1) How do you plan on putting a "Code Review" button on Bugzilla's
interface, and the repository dropdown?
2) How do you plan on dealing with accounts? Will every user of a
Bugzilla instance have to sign-up for an account on the Review Board
instance?

I'm concerned that your (4) and (5) also make too many assumptions
about how a particular team operates on Bugzilla. A minimum number of
ship-its, and a pre-commit hook, are likely out of scope for this
project.

So, in summary - I'm happy that you're interested in tackling this! I
think, however, that you need to narrow the focus down a little bit.
How can we make it super easy to review patches that have been posted
on Bugzilla, and have those reviews be fed back into Bugzilla - as a
comment, and perhaps a review flag?

I look forward to hearing more about this! All the best,

-Mike

Anshu Kumar

unread,
Mar 21, 2012, 2:37:53 AM3/21/12
to Mike Conley, reviewbo...@googlegroups.com
Hey Mike,
Thanks for your reply.

1. So we need to put a Code Review button on bugzilla's interface along with a dropdown of repositories. For doing this we will need to create a plugin for bugzilla also which will do the required thing for the integration of reviewboard instance. Bugzilla provides the option for creating extensions as per specific requirements making use of code hooks and template hooks. One such template hook will create the button for us. Now the other concern is how to fetch repositories information from review board instance. This task is fairly simple. Please check the attached screenshot demo.jpg. This screen shot is of review board demo. Now the task is to get the name of repositories in our code. ReviewBoard offers a service that if you send a get request to  /api/repositories/, it will return you the repositories information in xml form. Check attachment response.xml. This xml file can be parsed and from here repositories could be found.

2. Bugzilla supports 2 types of user authentication (the bugzilla database and external source such as LDAP). In organizations, generally, LDAP kind of authentication is used because of the central directory structure and use of a single database for all the authentication. So if they use LDAP database, we can just simply apply those LDAP settings to ReviewBoard instance as well and authenticate user against it. But if they use bugzilla database, we may need to create account for them on review board (or we can query against BugZilla database to fetch user information). So basically, you wont be able to attach Code Review with patch if you are not registered on ReviewBoard. You can however file patches without it (this can be further discussed).

Leaving 4 and 5 as they may be out of scope here. I worked on similar kind of thing in last summers.
Waiting for your reply.

--
You received this message because you are subscribed to the Google Groups "Review Board Summer of Code" group.
To post to this group, send email to reviewbo...@googlegroups.com.
To unsubscribe from this group, send email to reviewboard-gs...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/reviewboard-gsoc?hl=en.




--
Regards,
Ansh

demo.jpg
response.xml

Anshu Kumar

unread,
Mar 21, 2012, 5:00:01 PM3/21/12
to Mike Conley, reviewbo...@googlegroups.com
Hey Mike,

I missed to reply the last part of your mail earlier. 
You asked, how can the review process of patches submitted on BugZilla can be made easy and the reviews be filed into bugzilla (as a comment)? 
For the first part, if a review has been filed for the patch that the user submitted then the review process will be similar to the general review request as we have the diff to work with. Second part is how to post on the review comment on bugzilla. For this kind of thing we can use BugZilla's REST API. This API gives a lot of useful method for  getting all bugs, adding new bugs, adding attachments and everything that you can think of. One such method specifies that if you send you a GET request to bugzillaURL/bug/<bugID>/comment, you can fetch the comments for the specific bug and if you send out a POST request to the URL you can append the comment with the bug. We can also post the url to the review submitted. So we can send out the review comments submitted as a POST parameter to the url and a comment will be posted to a particular post.
--
Regards,
Ansh

Mike Conley

unread,
Mar 25, 2012, 2:19:53 PM3/25/12
to Review Board Summer of Code
Hey Anshu,

Thanks for the response - and sorry, I didn't get your message on IRC
until you were already offline.

So it sounds like your proposal has two parts:

1) A Bugzilla extension that:
a) Makes it easy for a developer to mark a patch on a bug as
something they'd like reviewed with Review Board
b) Does the heavy-lifting for creating the review request on a
Review Board instance, so the user doesn't have to hop between
different forms / applications to get the review request published
c) Adds a "code review" button for patches that have gone through
(a) and (b), so that reviewers can quickly open up the RB diff-viewer,
start and publish a review

and

2) A Review Board extension that:
a) When a review has been published for a Bugzilla bug, converts
the review into a comment that can be posted to the appropriate bug
(the Review Board instance will need a Bugzilla account to post with)

Another thing:

There are some installs of Bugzilla that use the "Splinter" code
review tool. Similarly, there are projects on a Bugzilla instance
that are happy using the Splinter code review tool. We should make it
easy for the Review Board Bugzilla extension to only be applicable for
particular projects per instance - or maybe even per-component.

This way, we're not shoving Review Board down the throats of all
projects on a Bugzilla instance, where some might prefer to use
Splinter instead.

I'd love to see this proposal written up - it'd be very exciting, and
as a Mozilla developer, I can tell you that I know of at least one
major project that would love to use Review Board instead of Splinter!

For your proposal, try to break down the task into smaller chunks,
giving estimates on how long you think each chunk will take. Also,
give yourself lots of buffer time - things can go wrong, and we might
have to alter Review Board to make it do what we need.

All the best!

-Mike

On Mar 21, 5:00 pm, Anshu Kumar <ansharyan...@gmail.com> wrote:
> Hey Mike,
>
> I missed to reply the last part of your mail earlier.
> You asked, *how can the review process of patches submitted on BugZilla can
> be made easy and the reviews be filed into bugzilla (as a comment)?*
> For the first part, if a review has been filed for the patch that the user
> submitted then the review process will be similar to the general review
> request as we have the diff to work with. Second part is how to post on the
> review comment on bugzilla. For this kind of thing we can use BugZilla's
> REST API. This API gives a lot of useful method for  getting all bugs,
> adding new bugs, adding attachments and everything that you can think of.
> One such method specifies that if you send you a GET request to
> *bugzillaURL/bug/<bugID>/comment,
> *you can fetch the comments for the specific bug and if you send out a POST
> request to the URL you can append the comment with the bug. We can also
> post the url to the review submitted. So we can send out the review
> comments submitted as a POST parameter to the url and a comment will be
> posted to a particular post.
>
> On Wed, Mar 21, 2012 at 12:07 PM, Anshu Kumar <ansharyan...@gmail.com>wrote:
>
>
>
>
>
>
>
>
>
> > Hey Mike,
> > Thanks for your reply.
>
> > 1. So we need to put a Code Review button on bugzilla's interface along
> > with a dropdown of repositories. For doing this we will need to create a
> > plugin for bugzilla also which will do the required thing for the
> > integration of reviewboard instance. Bugzilla provides the option for
> > creating extensions as per specific requirements making use of code hooks
> > and template hooks. One such template hook will create the button for us.
> > Now the other concern is how to fetch repositories information from review
> > board instance. This task is fairly simple. Please check the attached
> > screenshot *demo.jpg*. This screen shot is of review board demo. Now the
> > task is to get the name of repositories in our code. ReviewBoard offers a
> > service that if you send a get request to  /api/repositories/, it will
> > return you the repositories information in xml form. Check attachment *
> > response.xml*. This xml file can be parsed and from here repositories
> > could be found.
>
> > 2. Bugzilla supports 2 types of user authentication (the bugzilla database
> > and external source such as LDAP). In organizations, generally, LDAP kind
> > of authentication is used because of the central directory structure and
> > use of a single database for all the authentication. So if they use LDAP
> > database, we can just simply apply those LDAP settings to ReviewBoard
> > instance as well and authenticate user against it. But if they use bugzilla
> > database, we may need to create account for them on review board (or we can
> > query against BugZilla database to fetch user information). So basically,
> > you wont be able to attach Code Review with patch if you are not registered
> > on ReviewBoard. You can however file patches without it (this can be
> > further discussed).
>
> > Leaving 4 and 5 as they may be out of scope here. I worked on similar kind
> > of thing in last summers.
> > Waiting for your reply.
>
Reply all
Reply to author
Forward
0 new messages