[all][infra] CI test result table in the new gerrit review UI

Tristan Cacqueray tdecacqu at redhat.com
Fri Nov 27 14:11:21 UTC 2020

On Fri, Nov 27, 2020 at 14:20 Ian Wienand wrote:
> On Thu, Nov 26, 2020 at 06:10:34PM +0000, Tristan Cacqueray wrote:
>> > Probably the easiest solution will be for one of OpenDev's Zuul
>> > admins to arrange an autohold for a build which includes your new
>> > plugin, and then we can demo it there before releasing it again
>> > (three cheers for "testing like production!").
>> Though I'd be happy to get a test instance and feed it with real ci
>> comments to demonstrate the results.
> We probably want to document this.  As a start, I put a hold on a job.
> After I set /etc/hosts for review.opendev.org to the held node
> locally, I could log into the test gerrit (otherwise i'm redirected to
> the real site).
> I then created a openstack/diskimage-builder project via the UI, just
> for testing.  I started getting some errors which [2] resolved after a
> container restart.
> I copied in the raw git tree from the real openstack/diskimage-builder
> git repo, and ran a re-index by sshing in as the 'Gerrit Code Review'
> user using suexec
>  ssh -i ~gerrit2/review_site/etc/ssh_host_rsa_key -p 29418 -l 'Gerrit
>  Code Review' localhost 'suexec --as "Ian Wienand" gerrit index
>  changes-in-project openstack/diskimage-builder'
> I don't know if that's right, but it seemed to work.  Fiddling with
> this was where I found [2]
> Then I could see the dib changes; e.g.
> Very willing to take suggestions on what we could do better here.  It
> would probably be awesome if we could figure out automated import of a
> live tree in the system-config test, so we have a bunch of changes
> with zuul comments pre-populated.  Perhaps something like keep a zip
> of a smaller repo that has a bunch of reviews and comments, and
> populate that into the testing gerrit?
> I can see the plugin is installed, because in the web console you get
> the log from [3,4].  However, I can't actually see the table.
> Tristan -- have sent you a note separately on how to log in for live
> debugging if you like.

Thanks, I have switched the auth to DEVELOPMENT_BECOME_ANY_ACCOUNT and
created a fake Zuul CI comment in

> I can't say too much, because Tristan has written something and I
> haven't, but the choice of Reason or BuckleScript or OCaml or whatever
> is going on [5] really lowers the "bus factor" of this. I can read it
> and get the gist of what's going on; but it compiles down to [6] which
> I have no idea how to debug.  AFAICT, Reason 3.0.4 was released 3
> years ago, so it's either finished or ... not that active.  I use
> emacs and write email in mutt -- I'm the first to admit I'm behind on
> the latest web framework trends.  But after investigating TBH I remain
> unconvinced mostly that we can mantain this indefinitely, and secondly
> that the tooling will remain maintained.

>From what I understand, we can either use java and the polymer template
system, or the javascript api to implement the zuul results table.

I used a `compile to js` language named ReasonML because this let
me write applications where most of the runtime errors are simply
not possible. Moreover, the code can be compiled to other targets such as
Erlang or native assembly. The language was created by the author of
ReactJS and it is designed for Javascript developper, see the difference
here: https://rescript-lang.org/docs/manual/v8.0.0/overview 

To debug [6], you would use the same tools as for any javascript
applications. For example, using a source map so that the debugger can
hook into the non-minified source.

I'd be happy to use another implementation, I wrote this one rather
quickly to restore the zuul-results build table in the new gerrit.
Though I think ReasonML is the right tool for this job.


> Anyway, getting a better flow for testing plugins will serve us all
> well at any rate.
> -i
> [1] https://review.opendev.org/c/opendev/system-config/+/764396 gerrit: fix db/ mount for gate testing
> [2] https://review.opendev.org/c/opendev/system-config/+/764395 gerrit: set ownership on ~gerrit2/.ssh directory
> [3] https://softwarefactory-project.io/cgit/software-factory/re-gerrit/tree/src/Plugin.re#n23
> [4] https://softwarefactory-project.io/cgit/software-factory/zuul-results-gerrit-plugin/tree/src/ZuulResultsPlugin.re#n112
> [5] https://reasonml.github.io/
> [6]
> [7] https://github.com/facebook/reason/releases/tag/3.0.4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 515 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20201127/7eedb193/attachment.sig>

More information about the openstack-discuss mailing list