Page MenuHomePhabricator

reviewer comments missing on a specific change
Closed, ResolvedPublic

Description

When i load https://gerrit.wikimedia.org/r/c/mediawiki/core/+/176799/ there are a bunch of empty comments.

I assume there should be text there.

Related Objects

Event Timeline

It seems to be missing from NoteDb as well:

git fetch https://gerrit.wikimedia.org/r/mediawiki/core refs/changes/99/176799/meta && git rev-list FETCH_HEAD | xargs git show --no-patch --format="%b"

shows these comments as empty. Maybe some sort of ReviewDb -> NoteDb migration bug?

Even in Phabricator, vanish @ori comments!

More seriously: when looking at the change in the Web UI with all comments expanded, the 6th and 7th comments by Ryan Kaldari are empty but show they increment the patchset number to 2 and 3.

Inspecting refs/changes/99/176799/meta there are several entries and one can see them over the ssh query:

$ ssh -p 29418 gerrit.wikimedia.org gerrit query --comments 176799
...
comments:
...
  comments:
    timestamp: 2014-12-01 21:56:01 UTC
    reviewer:
      name: Kaldari
      email: kaldari@gmail.com
      username: Kaldari
    message: Patch Set 2: Commit message was updated
  comments:
    timestamp: 2014-12-01 21:58:02 UTC
    reviewer:
      name: Kaldari
      email: kaldari@gmail.com
      username: Kaldari
    message: Patch Set 3: Commit message was updated

And they are in the REST API response:

curl https://gerrit.wikimedia.org/r/changes/mediawiki%2Fcore~176799/detail|tail -n1|jq .messages
{
  "id": "0908bcb7b325683ebe8e4557db4a68ef5245c863",
  "author": {
    "_account_id": 78,
    "name": "Kaldari",
    "email": "kaldari@gmail.com",
    "username": "Kaldari"
  },
  "real_author": {
    "_account_id": 78,
    "name": "Kaldari",
    "email": "kaldari@gmail.com",
    "username": "Kaldari"
  },
  "date": "2014-12-01 21:56:01.000000000",
  "message": "Patch Set 2: Commit message was updated",
  "_revision_number": 2
},
{
  "id": "b739d3954746223a1fa2d169768a792053e22d88",
  "author": {
    "_account_id": 78,
    "name": "Kaldari",
    "email": "kaldari@gmail.com",
    "username": "Kaldari"
  },
  "real_author": {
    "_account_id": 78,
    "name": "Kaldari",
    "email": "kaldari@gmail.com",
    "username": "Kaldari"
  },
  "date": "2014-12-01 21:58:02.000000000",
  "message": "Patch Set 3: Commit message was updated",
  "_revision_number": 3
},
hashar edited projects, added Gerrit (Gerrit 3.5); removed Gerrit.

This is most probably a representation bug in the Web interface (PolyGerrit).

I went to look at the source code in polygerrit-ui/app/elements/change/gr-message/gr-message.ts, instantly found 171003f5c7551af08ee66e0b32d0eca729783b75:

Fix to render legacy change messages correctly

Without this change, a legacy change message (for example
"Patch Set 1: Test") will show up as an empty comment in UI.
This change fixes the message rendering to show it correctly.

Bug: Issue 15927
Release-Notes: skip
Change-Id: I3265a59e012c8e01d9bddf9d5f312d25f4ef790b

Which is https://bugs.chromium.org/p/gerrit/issues/detail?id=15927 and it looks like it matches this issue. The patch has been released with Gerrit 3.5.3 which I hope to upgrade to soonish.

hashar claimed this task.

Fixed after I have upgraded to Gerrit 3.5.4 this morning (T307334):

gerrit_old_comments_fixed_in_3_5.png (480×682 px, 119 KB)