CandyShop / gerrit

Automatically exported from code.google.com/p/gerrit
Apache License 2.0
1 stars 0 forks source link

Stream events do not include the label (vote) info #3220

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We use stream events heavily and want info on the votes even if it did not 
change.  One of our use cases is to automate tasks depending on comments and 
label info on any event.  An event that encompass the entire data of the event 
(include the labels) would help.

Affected Version: master

What steps will reproduce the problem?
1. view the Gerrit stream events
2. create a change
3. vote on that change with a Code-Review +1/-1 

Note - the event contains the label info:
"approvals":[{"type":"Code-Review","description":"Code-Review","value":"1"}],"co
mment":"Patch Set 2: Code-Review+1"}

4. now vote on that change again. This time add a comment but don't change any 
votes.
Note - the event does not contain the label infos, only the comment that was 
added.

What is the expected output? What do you see instead?
I would expect the event to contain the label info even if it didn't change. 

Original issue reported on code.google.com by zaro0508 on 27 Feb 2015 at 6:03

GoogleCodeExporter commented 9 years ago
change for this: https://gerrit-review.googlesource.com/#/c/65530

Original comment by zaro0508 on 27 Feb 2015 at 10:47

GoogleCodeExporter commented 9 years ago

Original comment by david.pu...@sonymobile.com on 19 May 2015 at 5:18

GoogleCodeExporter commented 9 years ago
The change was reverted:
  https://gerrit-review.googlesource.com/67973

Original comment by edwin.ke...@gmail.com on 19 May 2015 at 10:33

GoogleCodeExporter commented 9 years ago
The problem is, that there are different use cases where the current behaviour 
seems better. 

E.g. we have a custom label that triggers builds on jenkins (via 
gerrit-trigger-plugin) if it is set. So we do not want this to appear in the 
event if a unrelated comment is set on the change.

Original comment by icee...@googlemail.com on 21 May 2015 at 9:18

GoogleCodeExporter commented 9 years ago
@iceelch, Could you please help me understand your use case a little more?  
When a comment is added to a change how can you tell if it is unrelated to that 
change?  The label appearing in the stream event only means that there has been 
some modification to a vote it does not mean that the associated comments are 
related to that change.  I think in your use case you still have the data to 
either trigger or ignore.  In my use case I need both the comment and label 
data to decide whether I want to trigger a build. 

Original comment by zaro0508 on 24 May 2015 at 12:28

GoogleCodeExporter commented 9 years ago
Sorry guys, could we please try again?  This change includes a fix for the 
tests: https://gerrit-review.googlesource.com/#/c/68242

Original comment by zaro0508 on 1 Jun 2015 at 9:42