Page MenuHomePhabricator

Use upstream Gerrit.war instead of building our own
Closed, ResolvedPublic

Description

We are building our own Gerrit.war using operations/software/gerrit , that comes from a time when we had a lot of cherry picks and were not closely following upstream releases.

The sole purpose for building our own fork is currently for a single cherry pick to bring a json library 185bdc3a69370c3ab96cc94d20c0746fe6bade56. If we can get rid of it, I am confident we can then simply reuse the upstream release.

They are released at https://gerrit-releases.storage.googleapis.com/index.html

Or as signed artifacts on Maven Central https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.google.gerrit%22

Thus tentatively we could have a script that borrows the material from Maven Central, verify the signature and send it to our Archiva?

Event Timeline

The summary is:

  • T268020 185bdc3a69370c3ab96cc94d20c0746fe6bade56 is to add net.logstash.log4j:jsonevent-layout:1.7 in the Gerrit.war. We use it for log formatting. I have made a patch to have the lib shipped at deployment time instead of via a wikimedia built .war
  • T240264 which is for plugins/gitiles it does not really prevent us from using the upstream gerrit.war as long as we keep overriding the shipped gitiles plugin with our own fork.

With T268020 solved, we no more need to maintain our own fork and can just borrow upstream war file! What is left to do is to update https://wikitech.wikimedia.org/wiki/Gerrit :]

I have done some update to https://wikitech.wikimedia.org/wiki/Gerrit but need to continue. Notably how to retrieve the .jar from upstream and how to rebuild our plugin or borrow from upstream.

hashar claimed this task.

The upstream war can now be retrieved by using mvn package. It is documented at https://wikitech.wikimedia.org/wiki/Gerrit/Upgrade#Upstream_.war

The related change is https://gerrit.wikimedia.org/r/c/operations/software/gerrit/+/693450