My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 2809: Exceptions from plugins listening to PatchSetCreatedEvent causes gerrit to incorrectly report reject.
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by dwx1...@gmail.com, Aug 1, 2014
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version: 2.9

What steps will reproduce the problem?
1. Write a plugin which extends ChangeListener, but throws an exception on PatchSetCreatedEvents
2. Load plugin successfully into Gerrit
3. Push a new changeset to gerrit

What is the expected output? What do you see instead?

The plugin threw an exception, which should be isolated from the rest of gerrit. Instead, messages will fail to send, further PatchsetCreated hooks also do not fire, and the user will see a remote rejected, internal server error message. However, looking at Changes screen shows patchset was successfully created, with no problems.

Please provide any additional information below.

Something similar was found for the ref_updated hook, see https://gerrit-review.googlesource.com/#/c/49727/.
However, it seems that it was not carried over to the newer extension points.
In particular, the fireEventForUnrestrictedListeners() method in ChangeHookRunner is not checked for exceptions, leading to problems. 
Attached a minimum plugin to replicate it.
bug.tar.gz
1.5 KB   Download
Sign in to add a comment

Powered by Google Project Hosting