Opened 4 years ago

Last modified 4 years ago

#3649 new defect

GerritChangeFilter doesn't trigger a builder if a push is done without a gerrit review

Reported by: RockHed Owned by:
Priority: major Milestone: 0.8.x
Version: 0.8.12 Keywords: Gerrit

Description (last modified by sa2ajj)

I'm on 0.8.14 and If I go through the usual Gerrit flow of a push for/branch & it's then merged into said branch, Buildbot triggers a build just fine. However, if I push it directly into said branch, even though Buildbot sees the change, no build is triggerred. my AnyBranchScheduler is set up as:

change_filter=GerritChangeFilter(project=repo, branch="master", eventtype=["ref-updated", "change-merged"])

and the below change was added that had no effect:

2016-11-29 22:45:49-0800 [-] added change Change(revision=u'e69d....', branch=u'master', comments=u'Gerrit: patchset(s) merged.', when=1480488349, category=u'ref-updated',

Change History (4)

comment:1 Changed 4 years ago by sa2ajj

  • Description modified (diff)
  • Milestone changed from undecided to 0.8.x

I'm a bit confused: the filter you show would not handled "push for/branch". Can you provide a bit more details about your setup? A redacted version of your master.cfg?

comment:2 Changed 4 years ago by RockHed

My bad, for the for/branch pushes, I have another GerritChangeFilter? that tracks: eventtype=["patchset-created", "change-restored"] -- and triggers another builder.

The one that handles eventtype=["ref-updated", "change-merged"] seems to react just fine to the change-merged events, but not the ref-updated events.

comment:3 Changed 4 years ago by sa2ajj

If this not a problem any more, could you please mark the ticket fixed? (I just want to avoid the hassle of you re-opening it :))

comment:4 Changed 4 years ago by RockHed

Sorry for the delay -- no, this is still a problem. Essentially, here's master.cfg:


cchange_source?.append(GerritChangeSource?(GERRIT_SERVER, GERRIT_USER, handled_events=["patchset-created", "change-abandoned", "change-restored", "change-merged", "ref-updated"]))


name="tester", change_filter=GerritChangeFilter?(project=repo, branch="master", eventtype=["ref-updated", "change-merged"]), treeStableTimer=5*60, builderNames=["{0} reconfigure".format(repo)]


and here's the incoming event:

2016-12-16 10:31:30-0800 [-] gerrit: {"submitter":{"name":"...REDACTED..."project":"blah"},"type":"ref-updated","eventCreatedOn":1481913090}

2016-12-16 10:31:30-0800 [-] added change Change(revision=u'...', who=u'RockHed?'...branch=u'master', comments=u'Gerrit: patchset(s) merged.', when=1481913090, category=u'ref-updated', project=u'blah', ....

So the incoming change is definitely recognized, but the builder in builderNames did not seem to get kicked off.

Last edited 4 years ago by RockHed (previous) (diff)
Note: See TracTickets for help on using tickets.