Page MenuHomePhabricator

Upgrade to Gerrit 3.8
Closed, ResolvedPublic

Description

This task is to upgrade to 3.8.x series

Release notes https://www.gerritcodereview.com/3.8.html

breaking changes https://www.gerritcodereview.com/3.8.html#breaking-changes


Change 360219: Delete vote now fails for an already deleted vote

Would affect Zuul as we have configured it to vote --verified=0 when starting gate-and-submit. As I understand it if a change had no test run (ie it is immediately +2ed) then Gerrit would report a failure.

Per T354886#9536879 below: that only affects the REST API.


Change 356941: Do not set real_author in ChangeMessageInfo if author == real_author

It’s not needed to return the author twice if the change message was not impersonated. Documentation already stated this, but clients should double check they don’t rely on real_author always being returned. See also T328484


T356051 Change 354916: Remove registerStyleModule() plugin API

plugin.registerStyleModule() has been deprecated since Gerrit 3.5 and is removed in 3.8. The new API to use (which is only in 3.8) is plugin.styleApi().insertCSSRule():

https://gerrit.wikimedia.org/r/1002931 stable-3.7Let Gerrit manage light/dark theme
https://gerrit.wikimedia.org/r/1002932 stable-3.7Support Gerrit 3.8 CSS styling API
https://gerrit.wikimedia.org/r/1002933stable-3.8Remove registerStyleModule() for Gerrit 3.8

Change 351515 : Remove html commentlink functionality.

Html commentlinks allow for arbitrary html injection on the page. Replaced them with link commentlinks, using optional prefix, suffix, text parameters to achieve the same functionality. Existing configs can be migrated using scripts in tools/migration/html_to_link_commentlink.md

Event Timeline

Change 992109 had a related patch set uploaded (by Paladox; author: Paladox):

[operations/puppet@production] gerrit: Fix linking to hash url

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

Change 992109 merged by Dzahn:

[operations/puppet@production] gerrit: Fix linking to hash url

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

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

[operations/puppet@production] gerrit: use finer groups for commit commentlink

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

Change 993029 merged by Dzahn:

[operations/puppet@production] gerrit: use finer groups for commit commentlink

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

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

[operations/software/gerrit@deploy/wmf/stable-3.7] Gerrit 3.8 no more set redundant real_author

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

hashar updated the task description. (Show Details)

Change 360219: Delete vote now fails for an already deleted vote

Would affect Zuul as we have configured it to vote --verified=0 when starting gate-and-submit. As I understand it if a change had no test run (ie it is immediately +2ed) then Gerrit would report a failure.

I have tried it with Gerrit 3.8.3 (which does have this change since that got released with 3.8.0). Over ssh (which is what our Zuul is using) I was able to cast a first message with Verified 0, reset the vote and set it again explicitly to 0:

Gerrit_3.8.3_verified0.png (182×948 px, 49 KB)

So that really only affects the REST API.

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

[operations/software/gerrit@deploy/wmf/stable-3.7] Let Gerrit manage light/dark theme

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

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

[operations/software/gerrit@deploy/wmf/stable-3.7] Support Gerrit 3.8 CSS styling API

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

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

[operations/software/gerrit@deploy/wmf/stable-3.8] Remove registerStyleModule() for Gerrit 3.8

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

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

[operations/puppet@production] gerrit: remove html based commentlinks

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

Change 1002931 merged by jenkins-bot:

[operations/software/gerrit@deploy/wmf/stable-3.7] Let Gerrit manage light/dark theme

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

Change 1002932 merged by jenkins-bot:

[operations/software/gerrit@deploy/wmf/stable-3.7] Support Gerrit 3.8 CSS styling API

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

Mentioned in SAL (#wikimedia-operations) [2024-02-13T13:33:48Z] <hashar@deploy2002> Started deploy [gerrit/gerrit@7dd9a27]: Support Gerrit 3.8 CSS styling API - T354886

Mentioned in SAL (#wikimedia-operations) [2024-02-13T13:33:55Z] <hashar@deploy2002> Finished deploy [gerrit/gerrit@7dd9a27]: Support Gerrit 3.8 CSS styling API - T354886 (duration: 00m 07s)

Change 999928 merged by jenkins-bot:

[operations/software/gerrit@deploy/wmf/stable-3.7] wm-checks-api: Gerrit 3.8 no more sets redundant real_author

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

Change 1002938 merged by Jelto:

[operations/puppet@production] gerrit: remove html based commentlinks

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

Schedule wise:

The next slot is thus the week of March 25-29th

Icinga downtime and Alertmanager silence (ID=5e84f07a-1459-41c7-8172-a1d766a61750) set by jelto@cumin1002 for 1:00:00 on 1 host(s) and their services with reason: Gerrit update

gerrit1003.wikimedia.org

Icinga downtime and Alertmanager silence (ID=08fdbbb1-b4a1-4bdc-b1f7-2372e3f8ecc2) set by jelto@cumin1002 for 1:00:00 on 1 host(s) and their services with reason: Gerrit update

gerrit2002.wikimedia.org

I have cancelled the Gerrit 3.8 upgrade since I did not do the preliminary steps required to perform it. I was pretty sure I did, but clearly I did not. I will reschedule it for next week.

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

[operations/software/gerrit@wmf/stable-3.8] Merge tag 'v3.8.4' into wmf/stable-3.8

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

My message sent to upstream:

I have an issue with the Gerrit 3.8.4 release, it looks like it got tagged on Feb 23 and is missing a bunch of commits that made it to v3.7.8 (tagged on March 2). So if I upgrade from 3.7.8 to 3.8.4, I end up removing some code?

If I got my git correctly, the list of missing commits can be retrieved from git cherry -v v3.8.4 v3.7.8:

+ 313b1975a2fb33ab65c61ee64254ec6f4d945b5e Set version to 3.7.7
+ 5fb44f8c1a7a7c76a030620ff6348ee3209786d9 Set version to 3.7.8-SNAPSHOT
+ 4151e6f9efd71d9239bd2b65cac17790239b454c Remove the useIndex option in SSH commands change id parsing
+ ce8c8412c3fda2b6ca04c8d15f0d938bf7131433 Update JGit to acf21c0bc
+ 662f6cffa24b3d442e5eddf95d3f12154495bf7c Remove unused method ChangeNotes.containsComment()
+ 55b95261cfe591ef74ce67f5a4cbb6ca91393a0e Consistently normalize PatchSetApprovals when persisting
+ 99e8ad00012db78e310c086f0cea8d1215844f6a Update git submodules
+ 7196d6fb189b45d242c5357cb83321b3e3c9ba55 Remove drafts and stars from the ref_state_pattern index field
+ 3bd227b7bf9e2dd23466f0d35462e9475e313f00 build: Disable ErrorProne warnings
+ b5b67cff3de5da522a84686c64a49831eace3e56 Set version to 3.7.8

Looking at them, they look safe to rollback.

Change #1013953 merged by jenkins-bot:

[operations/software/gerrit@wmf/stable-3.8] Merge tag 'v3.8.4' into wmf/stable-3.8

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

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

[operations/software/gerrit@deploy/wmf/stable-3.8] Gerrit 3.8.4 and rebuild plugins

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

Change #1014488 merged by jenkins-bot:

[operations/software/gerrit@deploy/wmf/stable-3.8] Gerrit 3.8.4 and rebuild plugins

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

I have an issue with the Gerrit 3.8.4 release, it looks like it got tagged on Feb 23 and is missing a bunch of commits that made it to v3.7.8 (tagged on March 2). So if I upgrade from 3.7.8 to 3.8.4, I end up removing some code?

To summarize: yes. The reason is the branch merges take a bit of time. To quote Luca Milanesio: 3.7.7 was supposed to be included in 3.8.4 but it had a merge issue and had to be re-release. Meanwhile some fixes sneaked in and got merged in stable-3.7 and ended up in 3.7.8 (while v3.8.4 had already been released). The thread https://discord.com/channels/775374026587373568/1222284207745925395

There are some changes that are being merged in 3.4 to 3.9 and master and once that has completed, new releases will be issued.

Regarding scheduling, next week has an holiday on Monday and the MediaWiki train is rolled during European morning. The Gerrit upgrade can thus done on the next Monday after that which is April 8th.

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

[operations/software/gerrit@wmf/stable-3.8] Merge tag 'v3.8.5' into wmf/stable-3.8

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

Change #1019674 merged by jenkins-bot:

[operations/software/gerrit@wmf/stable-3.8] Merge tag 'v3.8.5' into wmf/stable-3.8

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

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

[operations/software/gerrit@deploy/wmf/stable-3.8] Gerrit 3.8.5 and rebuild plugins

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

Change #1019685 merged by jenkins-bot:

[operations/software/gerrit@deploy/wmf/stable-3.8] Gerrit 3.8.5 and rebuild plugins

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

Mentioned in SAL (#wikimedia-operations) [2024-04-15T09:52:53Z] <hashar@deploy1002> Started deploy [gerrit/gerrit@2f3d3d4]: Gerrit to 3.8.5 on gerrit2002 - T354886

Mentioned in SAL (#wikimedia-operations) [2024-04-15T09:53:02Z] <hashar@deploy1002> Finished deploy [gerrit/gerrit@2f3d3d4]: Gerrit to 3.8.5 on gerrit2002 - T354886 (duration: 00m 08s)

Mentioned in SAL (#wikimedia-operations) [2024-04-15T09:56:56Z] <hashar@deploy1002> Started deploy [gerrit/gerrit@2f3d3d4]: Gerrit to 3.8.5 on gerrit1003 - T354886

Mentioned in SAL (#wikimedia-operations) [2024-04-15T09:57:02Z] <hashar@deploy1002> Finished deploy [gerrit/gerrit@2f3d3d4]: Gerrit to 3.8.5 on gerrit1003 - T354886 (duration: 00m 06s)

Mentioned in SAL (#wikimedia-operations) [2024-04-15T10:10:29Z] <hashar@deploy1002> Started deploy [gerrit/gerrit@47eacb9]: Update Javascript plugins for Gerrit 3.8 - T354886

Mentioned in SAL (#wikimedia-operations) [2024-04-15T10:10:37Z] <hashar@deploy1002> Finished deploy [gerrit/gerrit@47eacb9]: Update Javascript plugins for Gerrit 3.8 - T354886 (duration: 00m 07s)

Mentioned in SAL (#wikimedia-releng) [2024-04-15T16:17:25Z] <hashar> Changed operations/software/gerrit HEAD to deploy/wmf/stable-3.8 # T354886

Change #1002933 merged by jenkins-bot:

[operations/software/gerrit@deploy/wmf/stable-3.8] Remove registerStyleModule() for Gerrit 3.8

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

Mentioned in SAL (#wikimedia-operations) [2024-04-23T12:45:19Z] <hashar@deploy1002> Finished deploy [gerrit/gerrit@ff51759]: Remove registerStyleModule() for Gerrit 3.8 - T354886 (duration: 00m 07s)