[Buildbot-commits] [Buildbot] #2054: buildbot/github post-receive URL timestamp problem

Buildbot nobody at buildbot.net
Mon Jul 18 18:26:57 UTC 2011


#2054: buildbot/github post-receive URL timestamp problem
--------------------+-----------------------
Reporter:  mmorse   |      Owner:
    Type:  defect   |     Status:  new
Priority:  major    |  Milestone:  undecided
 Version:  0.8.4p1  |   Keywords:  git
--------------------+-----------------------
 I'm trying to trigger a buildbot run whenever there's a change to a github
 repo. I've added a post-receive URL service hook to the repo, and verified
 that the POST is making it back to my buildmaster. However, an exception
 is raised when that POST is processed:

 {{{
 2011-07-12 11:32:18-0700 [HTTPChannel,0,17.226.192.60] Attempting to load
 module buildbot.status.web.hooks.github
 2011-07-12 11:32:18-0700 [HTTPChannel,0,17.226.192.60] in process_change
 2011-07-12 11:32:18-0700 [HTTPChannel,0,17.226.192.60]
 ERROR:root:Encountered an exception:
 2011-07-12 11:32:18-0700 [HTTPChannel,0,17.226.192.60]
 ERROR:root:Traceback (most recent call last):
 2011-07-12 11:32:18-0700 [HTTPChannel,0,17.226.192.60] ERROR:root:File
 "/Library/Python/2.6/site-packages/buildbot/status/web/hooks/github.py",
 line 100, in getChanges
 2011-07-12 11:32:18-0700 [HTTPChannel,0,17.226.192.60]     changes =
 process_change(payload, user, repo, repo_url, project)
 2011-07-12 11:32:18-0700 [HTTPChannel,0,17.226.192.60] ERROR:root:File
 "/Library/Python/2.6/site-packages/buildbot/status/web/hooks/github.py",
 line 139, in process_change
 2011-07-12 11:32:18-0700 [HTTPChannel,0,17.226.192.60]     when =
 convertTime( commit['timestamp'])
 2011-07-12 11:32:18-0700 [HTTPChannel,0,17.226.192.60] ERROR:root:File
 "/Library/Python/2.6/site-packages/buildbot/status/web/hooks/github.py",
 line 63, in convertTime
 2011-07-12 11:32:18-0700 [HTTPChannel,0,17.226.192.60]     result.groups()
 2011-07-12 11:32:18-0700 [HTTPChannel,0,17.226.192.60]
 ERROR:root:AttributeError: 'NoneType' object has no attribute 'groups'
 2011-07-12 11:32:18-0700 [HTTPChannel,0,17.226.192.60] Got the following
 changes None
 }}}

 From what I can determine, the problem is that the timestamp coming from
 the github repo looks like this:

 {{{
 "timestamp":"2011-07-12T18:32:05Z"
 }}}

 ...but module buildbot.status.web.hooks.github is looking for something in
 the format:

 {{{
 "timestamp":"1970-01-01T00:00:00+00:00"
 }}}
 Here's the code
 (http://buildbot.net/buildbot/docs/0.8.3/reference/buildbot.status.web.hooks
 .github-pysrc.html):

 {{{
 59 def convertTime(myTestTimestamp):
 60      #"1970-01-01T00:00:00+00:00"
 61      matcher =
 re.compile(r'(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)([-+])(\d\d):(\d\d)')
 62      result  = matcher.match(myTestTimestamp)
 63      (year, month, day, hour, minute, second, offsetsign, houroffset,
 minoffset) = \
 64          result.groups()
 }}}


 Here's the configuration of the build master
 {{{
 System Version: Mac OS X Server 10.6.8 (10K540)
   Server Configuration: Advanced
   Kernel Version:       Darwin 10.8.0
   Boot Volume:  SnowLeopardServer
   Boot Mode:    Normal
   Computer Name:        DevPubsContinuousIntegration
   User Name:    BuildMaster (buildmaster)
   Secure Virtual Memory:        Not Enabled
   64-bit Kernel and Extensions: No
   Time since boot:      1 day6:37

 Buildbot version: 0.8.4p1
 Twisted version: 11.0.0

 }}}

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2054>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list