"Show Comments Only" doesn't hide messages from Jenkins bot

217 views
Skip to first unread message

Vitaliy Lotorev

unread,
Jun 17, 2018, 2:46:16 PM6/17/18
to Repo and Gerrit Discussion
Hi,

We are using Gerrit 2.15.2 and recent Jenkins with Jenkins Gerrit trigger plugun to check changes.

When I hit "Show Comments Only" button in PG UI on the change screen on our Gerrit instance messages from Jenkins Verified+1 are not filtered out.

On the other hand clicking "Show Comments Only" on the Google Gerrit (e. g. [1]) hides messages Verified+1 from Tricium.

Does anyone know what should be done to hide messages from Jenkins bot on change screen?

Probably Jenkins Gerrit trigger plugin should use robot comments but it's not currently capable?


Regards,
Vitaliy Lotorev

David Ostrovsky

unread,
Jun 18, 2018, 12:56:30 AM6/18/18
to Repo and Gerrit Discussion

On Sunday, June 17, 2018 at 8:46:16 PM UTC+2, Vitaliy Lotorev wrote:
Hi,

We are using Gerrit 2.15.2 and recent Jenkins with Jenkins Gerrit trigger plugun to check changes.

When I hit "Show Comments Only" button in PG UI on the change screen on our Gerrit instance messages from Jenkins Verified+1 are not filtered out.

On the other hand clicking "Show Comments Only" on the Google Gerrit (e. g. [1]) hides messages Verified+1 from Tricium.

Does anyone know what should be done to hide messages from Jenkins bot on change screen?

You need to tag comments so that Gerrit can distinguish between human
(non tagged) and bot (tagged) comments.

Jenkins Gerrit trigger plugun allows to adjust SSH command,
and additional option could be passed, e.g.: --tag "autogenerated:jenkins:review".

FTR, the comment tagging was added here: [1], see also documentation of tag
attribute in SSH command. Gerrit-CI change, that added this feature is here: [2].


lot...@gmail.com

unread,
Jun 18, 2018, 1:59:29 PM6/18/18
to Repo and Gerrit Discussion
Thanks, I'll give it a try and come back.

lot...@gmail.com

unread,
Jun 20, 2018, 3:07:37 AM6/20/18
to Repo and Gerrit Discussion
Hi,

facts:
* using SSH commands with tag 'autogenerated:..' results in Show Comments button in PG UI working as expected
* we use REST API instead of SSH commands, this way Jenkins is able to find missed uploaded PS while Jenkins is down and trigger the builds once Jenkins is up.
* Jenkins Gerrit plugin only allows editing SSH command properties, but for REST plugin copies options from SSH command properties.
* While using REST plugin doesn't copy properties for --tag options
* While using REST Jenkins sets tag 'jenkins-gerrit-trigger' which is not recognized by Gerrit as bot message
* There is an issue for Gerrit tag documentation [1].

Is 'autogenerated:' prefix required in tags or not? It seems there mixed developers' opinions in [1].

* In case 'yes' [1] then there is an issue with Jenkins Gerrit Trigger plugin: generated tags for REST should start with 'autogenerated:' prefix.
* In case 'no' then PG UI needs fixing.

David Ostrovsky

unread,
Jun 20, 2018, 3:47:54 AM6/20/18
to Repo and Gerrit Discussion

lot...@gmail.com

unread,
Jun 20, 2018, 4:53:51 AM6/20/18
to Repo and Gerrit Discussion
Thanks.

ps. Old UI hides any tagged comment (including Jenkins ones) with "Hide tagged comments" button, as Jenkins Trigger plugin messages has tag.

lot...@gmail.com

unread,
Sep 3, 2018, 5:05:40 AM9/3/18
to Repo and Gerrit Discussion
This commit is included in Gerrit Trigger Plugin 2.27.6 [1], I checked and it works on Gerrit 2.15.2: "Show Comments Only" in PG UI hides tagged comments.

David Ostrovsky

unread,
Sep 3, 2018, 5:46:54 AM9/3/18
to Repo and Gerrit Discussion

Thanks for letting us know that it works as expected now.
 
Reply all
Reply to author
Forward
0 new messages