Zuul doesn't trigger when a draft is published?

Bug #1192477 reported by Mark McLoughlin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zuul
Confirmed
Medium
Unassigned

Bug Description

Just noticed this behaviour with https://review.openstack.org/33595 and https://review.openstack.org/33597

When I pushed the draft (git push gerrit HEAD:refs/drafts/master), no jenkins jobs were triggered - I assume this is intentional to avoid leaking information about the draft change

However, when I clicked the "Publish" button and the draft was made public, no jobs were triggered at that point. I tried a "recheck no bug" and that didn't help either. Only when I pushed a new patch set were the jobs triggered.

Revision history for this message
Jeremy Stanley (fungi) wrote :

The event stream in Gerrit 2.4 does not reflect draft publication. This is one of the reasons we recommend strongly against use of the draft feature. The usual workaround is to leave a review comment of "recheck no bug" immediately following publication.

Revision history for this message
Mark McLoughlin (markmc) wrote :

I did try "recheck no bug" and it didn't show up in http://status.openstack.org/zuul/ after a few minutes

Revision history for this message
Mark McLoughlin (markmc) wrote :

https://review.openstack.org/33597 is where I tried "recheck no bug"

Revision history for this message
Jeremy Stanley (fungi) wrote :

Something else must have happened in that case...

As a test I uploaded https://review.openstack.org/33658 in draft status, then clicked publish, then left a "recheck no bug" comment and Zuul tested it right away.

I'll take a look in the logs to see if anything obvious jumps out at me.

Revision history for this message
Jeremy Stanley (fungi) wrote :

Out of curiosity, did https://review.openstack.org/33598 which depends on 33597 start out as a draft (looks like it did)? If so, do you remember the order in which you published and rechecked them in relation to one another? I think we may have some undefined behavior here with interdependent draft changes. Here's an excerpt from Zuul's debug log:

    2013-06-19 07:44:52,705 DEBUG gear.Client: Polling 1 connections
    2013-06-19 07:44:53,072 INFO zuul.Gerrit: Getting information for 33597,1
    2013-06-19 07:44:53,116 DEBUG zuul.Gerrit: Change <Change 0x1fb5a90 33597,1> status: NEW
    2013-06-19 07:44:53,116 INFO zuul.Gerrit: Getting information for 33598,1
    2013-06-19 07:44:53,228 ERROR zuul.Scheduler: Exception in run handler:
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/zuul-1.2.0.37.g80ac440-py2.7.egg/zuul/scheduler.py", line 443, in run
        self.process_event_queue()
      File "/usr/local/lib/python2.7/dist-packages/zuul-1.2.0.37.g80ac440-py2.7.egg/zuul/scheduler.py", line 478, in process_event_queue
        change = event.getChange(project, self.trigger)
      File "/usr/local/lib/python2.7/dist-packages/zuul-1.2.0.37.g80ac440-py2.7.egg/zuul/model.py", line 659, in getChange
        change = trigger.getChange(self.change_number, self.patch_number)
      File "/usr/local/lib/python2.7/dist-packages/zuul-1.2.0.37.g80ac440-py2.7.egg/zuul/trigger/gerrit.py", line 335, in getChange
        dep = cachedGetChange(dep_num, dep_ps)
      File "/usr/local/lib/python2.7/dist-packages/zuul-1.2.0.37.g80ac440-py2.7.egg/zuul/trigger/gerrit.py", line 321, in cachedGetChange
        c = self.getChange(num, ps, changes)
      File "/usr/local/lib/python2.7/dist-packages/zuul-1.2.0.37.g80ac440-py2.7.egg/zuul/trigger/gerrit.py", line 286, in getChange
        project = self.sched.projects[data['project']]
    KeyError: 'project'

I believe the recheck on 33597 referred Zuul to dependent change 33598 which was possibly still a draft at that point in time, and caused jobs for the former to fail to enqueue because it couldn't retrieve details on the latter.

Changed in openstack-ci:
status: New → Confirmed
affects: openstack-ci → zuul
Changed in zuul:
importance: Undecided → Medium
Revision history for this message
Mark McLoughlin (markmc) wrote :

Yeah, I think 33598 may still have been draft when I triggered the recheck

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.