Plugin its-bugzilla

326 views
Skip to first unread message

Fabio Porcedda

unread,
Jan 19, 2015, 7:55:17 AM1/19/15
to repo-d...@googlegroups.com
Hi all,
Would it possible to add a stable-2.9 branch for the plugin "its-bugzilla", like what is done for the plugin "its-base"?
IMHO the master branch is good only for gerrit 2.11 starting from this commit:

Thanks and best regards
--
Fabio Porcedda

Fabio Porcedda

unread,
Jan 19, 2015, 9:13:39 AM1/19/15
to repo-d...@googlegroups.com
I've tried  to build the plugin https://gerrit.googlesource.com/plugins/its-bugzilla/+/6d858c8e5bf5cbf06ecda9f675fc8339bf6713be for gerrit 2.9, with the following command:
   mvn clean package


[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /e/gerrit/plugins/its-bugzilla/src/main/java/com/googlesource/gerrit/plugins/hooks/bz/BugzillaModule.java:[17,27] error: package org.eclipse.jgit.lib does not exist
[ERROR] /e/gerrit/plugins/its-bugzilla/src/main/java/com/googlesource/gerrit/plugins/hooks/bz/BugzillaModule.java:[18,16] error: package org.slf4j does not exist
[ERROR] /e/gerrit/plugins/its-bugzilla/src/main/java/com/googlesource/gerrit/plugins/hooks/bz/BugzillaModule.java:[19,16] error: package org.slf4j does not exist
....

I'm doing something wrong?

Thanks and best regards

Zaro

unread,
Jan 19, 2015, 12:22:56 PM1/19/15
to Fabio Porcedda, repo-d...@googlegroups.com
This specific error looks like it's saying that you are missing libs.  I think you might not have run the 'buck install api_install' step: https://gerrit-review.googlesource.com/Documentation/dev-buck.html#_extension_and_plugin_api_jar_files

This step will install the gerrit apis into your local repo so that maven can reference them when building the its-bugzilla plugin.



--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fabio Porcedda

unread,
Jan 19, 2015, 12:27:52 PM1/19/15
to Zaro, repo-d...@googlegroups.com
On Mon, Jan 19, 2015 at 6:22 PM, Zaro <zaro...@gmail.com> wrote:
> This specific error looks like it's saying that you are missing libs. I
> think you might not have run the 'buck install api_install' step:
> https://gerrit-review.googlesource.com/Documentation/dev-buck.html#_extension_and_plugin_api_jar_files
>
> This step will install the gerrit apis into your local repo so that maven
> can reference them when building the its-bugzilla plugin.

That was the missing step, now it builds fine!.

Thanks
--
Fabio Porcedda

Fabio Porcedda

unread,
Jan 20, 2015, 10:42:01 AM1/20/15
to repo-d...@googlegroups.com, zaro...@gmail.com

Now the problem is that i'm unable to add to bugzilla any information regarding changes on gerrit.

Status:
I've successfully build and installed the its-buzilla plugin (commit a909bfc836b1a97a7afcd45d085bda6ef4ec6371) on gerrit v2.9.4.

Configuration:

etc/gerrit.config:
[plugin "its-bugzilla"]
        enabled = true
[its-bugzilla]
        url = <url>
        username = <username>

[commentLink "its-bugzilla"]
        match = [bB][uU][gG]\\s*(\\d+)
        link = <url>/show_bug.cgi?id=$1
        association = SUGGESTED

etc/secure.config:
[its-bugzilla]
        password = <password>


etc/its/action.config:

[rule "rule1"]
        status = !,DRAFT
        action = add-comment This a sample comment
        action = log-event error
[rule "rule2"]
        event-type = comment-added
        action = add-comment This a sample comment
        action = log-event error


When gerrit start in the error.log file it says that the plugin is able to connect to the bugzilla service.
The problem is that when:
- add a new patch set
- update a patch set
- add a comment to a patch set
- abandon a patch set
- restore a patch set

I don't see any information added to bugzilla or any error in gerrit's log, so what i'm missing?

Thanks in advance for any help
Fabio Porcedda

Zaro

unread,
Jan 20, 2015, 12:25:01 PM1/20/15
to Fabio Porcedda, repo-d...@googlegroups.com
you might try increasing the logging level to debug to see if you get more info:

[rule "LOG"]
        action = log-event debug


Fabio Porcedda

unread,
Jan 23, 2015, 7:57:01 AM1/23/15
to repo-d...@googlegroups.com, fabio.p...@gmail.com


On Tuesday, January 20, 2015 at 6:25:01 PM UTC+1, Khai Do wrote:
you might try increasing the logging level to debug to see if you get more info:

[rule "LOG"]
        action = log-event debug
Thanks for helping me.

Unfortunately  even after adding this rule in the "etc/its/action.config" the "logs/error_log" does not print any information when a push a commit with a right bug numeber.
But when i push a bug with a wrong bug is warn me about that and print a error in "logs/error_log".

So the commentLink configuration seems right but it seems the its-bugzilla plugin doesn't see the push?

Thanks and BR
Fabio Porcedda

Jan Kundrát

unread,
Jan 24, 2015, 11:56:49 AM1/24/15
to repo-d...@googlegroups.com
On Tuesday, 20 January 2015 16:42:01 CEST, Fabio Porcedda wrote:
> I don't see any information added to bugzilla or any error in gerrit's log,
> so what i'm missing?

I see you already commented at [1] and that you use Bugzilla 4.4.6. They
changed their XMLRPC interface in an incompatible manner around 4.4.4 (or
earlier?), and as a result, one now has to use tokens for authenticated
operations.

It seems that you're looking for
https://gerrit-review.googlesource.com/61241 -- can you check whether your
plugin build already contains that commit?

Cheers,
Jan

[1] http://code.google.com/p/gerrit/issues/detail?id=803


--
Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/

Fabio Porcedda

unread,
Feb 19, 2015, 10:20:49 AM2/19/15
to repo-d...@googlegroups.com
I've finally managed to have a working its-bugzilla using gerrit 2.10.

Now i would like to add the url of the Gerrit Change to the "See Also" fied of bugzilla, it's possible with this plugin? Maybe i need to add code to do that?

Thanks in advance for any help.


Reply all
Reply to author
Forward
0 new messages