Page MenuHomePhabricator

Zuul: de-uglify the test build results list in Gerrit
Closed, ResolvedPublic

Description

OpenStack's Jenkins Comments

[I assume this would be fixed in Zuul/Jenkins not in Gerrit (Zuul/Jenkins is leaving the comment).]


Version: wmf-deployment
Severity: enhancement

Attached:

OpenStackGerritJenkins.png (201×779 px, 17 KB)

Details

Reference
bz66095

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:10 AM
bzimport set Reference to bz66095.

(Gah! Mis-targetted enter key!)

Compare the screenshot of OpenStack's Jenkins comments in Gerrit and ours. One is easily readable, the other isn't. Let's have easily readable.

Created attachment 15560
WMF Jenkins Comments

Attached:

WMFGerritJenkins.png (286×782 px, 42 KB)

We could do it.

Zuul need to prepend the job name in the reported URL which is a single configuration change in zuul.conf:

https://review.openstack.org/#/c/42495/2/modules/zuul/templates/zuul.conf.erb

Then in Gerrit configuration add a [commentlink] that for a matched regex replace it with some HTML:

https://review.openstack.org/#/c/42495/2/modules/openstack_project/manifests/gerrit.pp,unified

[commentlink "testresult"]

match = '<li>([^ ]+) <a href=\"[^\"]+\">([^<]+)</a> : ([^ ]+)([^<]*)</li>',
html  = '<li><span class=\"comment_test_name\"><a href=\"$2\">$1</a></span> <span class=\"c

omment_test_result\"><span class=\"result_$3\">$3</span>$4</span></li>',

We can give it a try on integration-dev.eqiad.wmflabs.

I don't have much time to look at it right now though.

Change 154524 had a related patch set uploaded by Hashar:
gerrit: prettify Zuul build results

https://gerrit.wikimedia.org/r/154524

I gave it a try and the above puppet change tweak Gerrit and Zuul config to make the build result a bit nicer.

An example can be shown on a labs instance http://integration.wmflabs.org/gerrit/#/c/12/ (the link will eventually disappear one day).

Change 154524 merged by Dzahn:
gerrit: prettify Zuul build results

https://gerrit.wikimedia.org/r/154524

Created attachment 16250
Pretty comment on Wikimedia setup

Attached is the result of the crazy regex on Wikimedia Gerrit installation. Much nicer.

Attached:

Capture_d’écran_2014-08-20_à_21.54.26.png (228×785 px, 55 KB)

The original regex comes from James E. Blair (OpenStack).

Christian Aistleitner kindly reviewed and further improved the regex (thanks!).

Daniel Zahn deployed the change on spot.

\O/