Page MenuHomePhabricator

Gerrit notification emails are missing the content of inline comments on unchanged files
Closed, ResolvedPublic

Assigned To
None
Authored By
matmarex
Jan 17 2024, 6:55 PM
Referenced Files
F53973532: image.png
May 20 2024, 5:24 PM
F41697105: image.png
Jan 18 2024, 10:10 AM
F41695971: Bugmail 28527.txt
Jan 17 2024, 6:55 PM
F41695969: image.png
Jan 17 2024, 6:55 PM
F41695960: Bugmail 28560.txt
Jan 17 2024, 6:55 PM
F41695967: image.png
Jan 17 2024, 6:55 PM
F41695959: Bugmail 28530.txt
Jan 17 2024, 6:55 PM
F41695965: image.png
Jan 17 2024, 6:55 PM

Description

Gerrit notification emails are missing the content of inline comments sometimes.

For example, for the two comments visible here: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/983186/2/data-access/src/ByTypeDispatchingEntityRevisionLookup.php I have received the attached notification emails. They state that a comment was added and the file name, but do not have the comment text:

image.png (629×1 px, 86 KB)
image.png (629×1 px, 87 KB)

I don't know what causes this issue, although it's funny that it happened for two comments on the same change and file. I've seen it a couple times before on other changes, but I don't remember which ones.

For comparison, here's the email for a comment from here: https://gerrit.wikimedia.org/r/c/mediawiki/libs/less.php/+/991310/4/lib/Less/Cache.php which worked correctly:

image.png (869×1 px, 159 KB)

Event Timeline

I likewise got an incomplete notification email about @matmarex’ reply there:

image.png (263×656 px, 28 KB)

I wonder if it’s because I started that comment thread on a file that the Gerrit change originally didn’t touch at all? You can leave comments on untouched files by editing the URL, but perhaps it’s not fully supported by Gerrit.

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

[operations/puppet@production] gerrit: sync soy email template with version 3.7

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

We have forked the templates used to generate emails notifications and looks like I forgot to rebase/update them as I upgraded Gerrit. The Puppet patch above rebase our forked templates so at least we will be aligned with upstream.

You can try/spam the test repository at https://gerrit.wikimedia.org/g/test/gerrit-ping :)

Change 993695 merged by Dzahn:

[operations/puppet@production] gerrit: sync soy email template with version 3.7

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

I have synced the template used to generate the emails, then modules/gerrit/files/site/etc/mail/Comment.soy is for the plain text emails so that is a bit irrelevant to this task and I don't think the sole customization we have in it justify keeping it.

Does this issue still happen to you?

matmarex renamed this task from Gerrit notification emails are missing the content of inline comments sometimes to Gerrit notification emails are missing the content of inline comments on unchanged files.May 20 2024, 5:24 PM
hashar moved this task from Patch merged upstream to Patch released upstream on the Upstream board.

The fix has been released in v3.11.2, v3.10.5 and v3.9.10

We are on 3.10.6 now, so this is presumably fixed ?