Page MenuHomePhabricator

Zuul Depends-On footer processing missing from Gerrit UI after 3.4.4 upgrade
Closed, ResolvedPublic

Description

For example the cross-repo dependency set in https://gerrit.wikimedia.org/r/c/mediawiki/tools/train-dev/+/789255/ 's commit message is not resulting in the dependency chain being displayed in the top-right of the UI when viewing that commit.

@hashar says that the zuul plugin needs to be updated.

Event Timeline

https://gerrit.wikimedia.org/r/admin/plugins shows the Zuul plugin is at ea30290 which is the tip of the master branch at upstream.

When @QChris upgraded to Gerrit 3 he made a lot of changes to the plugin which are in upstream branch stable-3.2. Those changes never got merged up to the other stable branches / master. I might have send commits for that to upstream but never went to merge them.

When I have overhauled the Gerrit deployment last summer for stable-3.3, our wmf/stable-3.3 declared the zuul plugin as a submodule with our forked version:

.gitmodules
# Forked since Christian work is only in upstream stable-3.2
[submodule "plugins/zuul"]
        path = plugins/zuul
        url = https://gerrit.wikimedia.org/r/operations/software/gerrit/plugins/zuul.git
  branch = wmf/stable-3.3

But when I prepared the wmf/stable-3.4 I missed that and rolled back to the upstream repo:

[submodule "plugins/zuul"]
	path = plugins/zuul
	url = https://gerrit.googlesource.com/plugins/zuul

Since it does not have a 3.4.4 tag or a stable-3.4 branch the build script fall back to master which is outdated.

A workaround is to change our branch to use our forked repo again. The ultimate fix is to get those commits merged in upstream repo.

In both case we need to rebuild the plugin:

  • bump the plugins/zuul submodules in Gerrit wmf/stable-3.4 branch
  • send for review
  • grab the generated zuul.jar
  • add it to the deploy/wmf/stable-3.4 branch with git fat

Did you already do this? The UI looks correct now.

hashar renamed this task from Depends-On footer processing missing from Gerrit UI after 3.4.4 upgrade to Zuul Depends-On footer processing missing from Gerrit UI after 3.4.4 upgrade.May 6 2022, 1:36 PM

I haven't touched anything, maybe some cached filed had to be invalidated.

Regardless the change we need for plugins/zuul is https://gerrit-review.googlesource.com/c/plugins/zuul/+/313303 which I could not merge due to some CI hipcup. I need a CR+2 for it to be merged :] I have asked @Paladox about it.

Once it is available I can get the plugin updated in our wmf/stable-3.4 branch, add the resulting zuul.jar to the deploy branch and recycle Gerrit :)

Change 790261 had a related patch set uploaded (by Hashar; author: Hashar):

[operations/software/gerrit@wmf/stable-3.4] [WMF] update Zuul plugin

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

Change 790262 had a related patch set uploaded (by Hashar; author: Hashar):

[operations/software/gerrit@deploy/wmf/stable-3.4] Update Zuul plugin

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

Change 790261 merged by jenkins-bot:

[operations/software/gerrit@wmf/stable-3.4] [WMF] update Zuul plugin

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

Change 790262 merged by jenkins-bot:

[operations/software/gerrit@deploy/wmf/stable-3.4] Update Zuul plugin

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

Mentioned in SAL (#wikimedia-operations) [2022-05-09T08:41:35Z] <hashar@deploy1002> Started deploy [gerrit/gerrit@94c5028]: Update Zuul plugin - T307621

Mentioned in SAL (#wikimedia-operations) [2022-05-09T08:41:44Z] <hashar@deploy1002> Finished deploy [gerrit/gerrit@94c5028]: Update Zuul plugin - T307621 (duration: 00m 09s)

Mentioned in SAL (#wikimedia-operations) [2022-05-09T08:42:25Z] <hashar> Restarting Gerrit on replica gerrit2001.wikimedia.org to update the Zuul plugin # T307621

Mentioned in SAL (#wikimedia-operations) [2022-05-09T08:43:48Z] <hashar@deploy1002> Started deploy [gerrit/gerrit@94c5028]: Update Zuul plugin - T307621

Mentioned in SAL (#wikimedia-operations) [2022-05-09T08:43:55Z] <hashar@deploy1002> Finished deploy [gerrit/gerrit@94c5028]: Update Zuul plugin - T307621 (duration: 00m 07s)

I have restarted Gerrit on gerrit2001. For gerrit1001 the plugin scanner caught the update after deployment:

[2022-05-09T08:44:33.892Z] [PluginScanner] INFO  com.google.gerrit.server.plugins.PluginLoader : Reloading plugin zuul
[2022-05-09T08:44:33.912Z] [PluginScanner] INFO  com.google.gerrit.server.plugins.PluginLoader : Unloading plugin zuul, version ea30290
[2022-05-09T08:44:33.912Z] [PluginScanner] INFO  com.google.gerrit.server.plugins.PluginLoader : Reloaded plugin zuul, version 16a217c

Which kick in after the scap deploy which remove all built-in plugins shipped by gerrit.war. I thus ran java -jar bin/gerrit.war init --batch --install-all-plugins and other commands from https://wikitech.wikimedia.org/wiki/Gerrit/Upgrade#Deploying and restarted Gerrit.

I have updated the plugin but it does not seem to work with Gerrit 3.4 (I should have tested it locally). Heading to a change that has a Depends-On header (searching message:Depends-On) raises two errors in the javascript console:

TypeError: e.depends_on is undefined
    _onChangeChanged https://gerrit.wikimedia.org/r/plugins/zuul/static/zuul.js:121
gr-app.js:1:4520

Uncaught (in promise) TypeError: e.depends_on is undefined
    _onChangeChanged https://gerrit.wikimedia.org/r/plugins/zuul/static/zuul.js:121
zuul.js:121:520

The JavaScript issue was a caching related issue, force reloading the web UI fixed it. The list of Depends-On / Needed-By changes looks correct now.