Page MenuHomePhabricator

Gerrit attributed my comments to jenkins-bot
Open, LowPublic

Description

Something very weird has happened at https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/763604:

image.png (2×3 px, 397 KB)

It looks like jenkins-bot and myself have managed to post at the same time (to a second), and my inline comments are displayed under jenkins-bot's message.

Event Timeline

I think its just some funky display issue, as the comment is properly attributed to you if we look at the API

{
	"author": {
		"_account_id": 417,
		"name": "Bartosz Dziewoński",
		"email": "matma.rex@gmail.com",
		"username": "matmarex"
	},
	"change_message_id": "c11e04032c1f88d6077c29d950f2186dd36156b3",
	"unresolved": true,
	"context_lines": [],
	"source_content_type": "",
	"patch_set": 9,
	"id": "39dd4bf5_919e942d",
	"in_reply_to": "e1c2630a_304ad77e",
	"updated": "2022-05-13 22:11:47.000000000",
	"message": "We should probably fall back to reloading the whole page in this scenario, we do that on desktop: https://github.com/wikimedia/mediawiki-extensions-VisualEditor/blob/6b6b065e073d59380e4ff2384d8d43a05460fbb6/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js#L667-L669",
	"commit_id": "e532af95c9c77365aa1c7ce543467e3ab7c38494"
}

How much do you wanna bet that "updated": "2022-05-13 22:11:47.000000000", is gonna be real close to jenkins-bots'?

hashar subscribed.

The whole history of comments is stored directly in git and can be retrieved and browsed using:

cd mediawiki/extensions/VisualEditor
git fetch origin refs/changes/04/763604/meta
git log -p FETCH_HEAD

Or that can be done via the Change REST API.

The jenkins-bot message on patchset 11 happened at Fri May 13 22:11:47 2022 +0000 and Bartosz message happened within the same second Fri May 13 22:11:47 2022 +0000. It is thus an UI glitch and @TheresNoTime won the bet :]

Maybe it has been addressed in a future Gerrit version (we run 3.4.4, they have released 3.5.x 3.6.x).

My guess is the issue comes from polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.ts probably somewhere in _computeCombinedMessages which seems to compare date strictly with < and does not take in account it can come from different persons:

if (rDate < mDate) {
  combinedMessages.push(reviewerUpdates[ri++]);
  rDate = null;
} else {
  combinedMessages.push(messages[mi++]);
  mDate = null;
}

I guess it can be reported to upstream

hashar triaged this task as Low priority.Jun 3 2022, 9:55 AM