Page MenuHomePhabricator

Gerrit commit message formatting does not handle angle-bracketed URLs well, adds extra semicolon
Open, Needs TriagePublic

Description

In this WikibaseLexeme Gerrit change, the commit message line

Pulls in <https://github.com/wmde/new-lexeme-special-page/pull/641>.

gets rendered as:

Pulls in <https://github.com/wmde/new-lexeme-special-page/pull/641>;.

Notice that the > became part of the link, and there’s also an extra ; for no apparent reason; angle brackets are supposed to be a way to mark the boundaries of a URL in Markdown-like text.

From duplicated T359878:

In this change: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1009851

The Gerrit interface shows this:

image.png (89×1 px, 21 KB)

he Zend hack is no longer needed, as this existed to support PHP 5.5
as per <https://3v4l.org/EU6Ro>;.

But in the actual commit, as seen e.g. at https://gerrit.wikimedia.org/g/mediawiki/core/+/6194cf19ce73a90bb3bedf01a9c97eb5fbc40d17, the text is written as:

The Zend hack is no longer needed, as this existed to support PHP 5.5
as per <https://3v4l.org/EU6Ro>.

Gerrit shows an extra ; that appears out of nowhere.

Event Timeline

I don’t know if this is anything specific in our config or an upstream issue – I figured I’d report it here first.

I’ve now pushed a new patch set that removes the angle brackets; unfortunately, Gerrit always shows the latest commit message even when looking at an older patch set, so that means you can’t easily reproduce this anymore :S

This is a upstream issue but testing on master it appears it's fixed.

I believe gerrit 3.8 may fix the problem. It got rid of a library that had problems. Although I can't guarantee as I've only tested on master.

Alright, thanks! Feel free to close this already then. (Or keep it open and link it to T354886, I guess?)

hashar subscribed.

Alright, thanks! Feel free to close this already then. (Or keep it open and link it to T354886, I guess?)

I keep the bug reports opens and mark them with a milestone associated with the version that fixes it, in this case #gerrit3.8: Gerrit (Gerrit 3.8). Then once upgraded, we can crawl through the milestone, verify all those have indeed been fixed and closed them as needed (else move them to the next milestone or back in the default Gerrit).

hashar claimed this task.

The issue has been fixed by upgrading to Gerrit 3.8 on Monday 15th :)

Indeed that was not fixed. The reason I have marked the task resolved was that the first link in this task points to https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseLexeme/+/1007609/1 which does not show the issue and I thus assumed it to have been fixed but it does show https://gerrit.wikimedia.org/r/c/mediawiki/core/+/1009851 which I guess is a variation.