Opened 22 months ago

Last modified 21 months ago

#3273 new defect

GerritChangeFilter support for branch filtering is broken

Reported by: sa2ajj Owned by:
Priority: major Milestone: undecided
Version: 0.8.12 Keywords: gerrit
Cc:

Description (last modified by sa2ajj)

Basically, current implementation expects every event coming from Gerrit to have a change included. As documentation shows, there're some events do not have any changes included, most notablbe ref-updated.

As a practical example, a set of properties for an event with a change:

event.change.branch
event.change.commitMessage
event.change.id
event.change.number
event.change.owner.email
event.change.owner.name
event.change.owner.username
event.change.project
event.change.status
event.change.subject
event.change.topic
event.change.url
event.patchSet.author.email
event.patchSet.author.name
event.patchSet.author.username
event.patchSet.createdOn
event.patchSet.isDraft
event.patchSet.number
event.patchSet.parents
event.patchSet.ref
event.patchSet.revision
event.patchSet.sizeDeletions
event.patchSet.sizeInsertions
event.patchSet.uploader.email
event.patchSet.uploader.name
event.patchSet.uploader.username
event.type
event.uploader.email
event.uploader.name
event.uploader.username

and here's a set of properties for an event that does not have a change (ref-updated):

event.refUpdate.newRev
event.refUpdate.oldRev
event.refUpdate.project
event.refUpdate.refName
event.submitter.email
event.submitter.name
event.submitter.username
event.type

Change History (4)

comment:1 Changed 22 months ago by sa2ajj

  • Description modified (diff)

comment:2 Changed 22 months ago by tardyp

fyi, this is how I solved the problem on buildbot_travis.

https://github.com/tardyp/buildbot_travis/blob/master/buildbot_travis/vcs/gerrit.py#L32

I did not find the time to upstream it yet.

comment:3 Changed 21 months ago by sa2ajj

@tardyp, I'm not sure: the problem is in GerritChangeFilter, you are modifying GerritChangeSource. I assume that you use "normal" ChangeFilter, right?

comment:4 Changed 21 months ago by tardyp

Its an integration problem. You can fix it in either end of the interface.

Note: See TracTickets for help on using tickets.