Page MenuHomePhabricator

Deal with new patchset level comments
Closed, ResolvedPublic

Description

Gerrit 3.3 changes the way change messages are managed:

The reply dialog posts patchset level comments instead of change messages.

This is an experiment that is enabled by default. However, it can be disabled by adding UiFeature__patchset_comments as disabled key in experiments section of gerrit.config. This is useful if your CI system parses back change messages (e.g. /rerun) and has not been updated yet to parse patchset level comments. The option to revert this behavior will be removed in Gerrit 3.4. Until then, administrators need to have migrated.

For Gerrit 3.3:

[experiments]
  disabled = UiFeature__patchset_comments

Internally those comments are send to a special file: /PATCHSET_LEVEL

It is unclear what happens to the comment-added event we rely on for Zuul. I am guessing it disappears? Or maybe that is properly emitted to the stream-events channel.

From a mail thread there are a couple issues:

https://gerrit-review.googlesource.com/c/gerrit/+/291144 adds:

event.comment-added.publishPatchSetLevelComment::

Add patch set level comment as event comment. Without this option, patch set
level comment will not be included in the event comment attribute. Given that
currently patch set level, file and robot comments are not exposed in the
comment-added event type, those comments will be lost. One particular use
case is to re-trigger CI build from the change screen by adding a comment with
specific content, e.g.: recheck. Jenkins Gerrit Trigger plugin and Zuul CI
depend on this feature to trigger change verification.

By default, true.

Related Objects

Event Timeline

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

[operations/puppet@production] gerrit: disabled patchset level comments

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

Change 708124 abandoned by Hashar:

[operations/puppet@production] gerrit: disabled patchset level comments

Reason:

Not needed. There is a back compatibility for stream-events via event.comment-added.publishPatchSetLevelComment and I cant reproduce a potential breakage.

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

hashar claimed this task.

This got found in upstream issue 13800 and addressed by adding a configuration setting event.comment-added.publishPatchSetLevelComment which defaults to True.