Opened 2 years ago

Last modified 2 years ago

#3562 assigned undecided

Error using 'usetimestamps=False' with buildbot.changes.HgPoller

Reported by: mab Owned by: gracinet
Priority: minor Milestone: undecided
Version: 0.9.0b9 Keywords: hg
Cc:

Description

When using buildbot.changes.HgPoller() with 'usetimestamps=False' an 'Unhandled Error' occurs:

Traceback (most recent call last):
  File "/home/buildmaster/venv/lib/python2.7/site-packages/twisted/internet/defer.py", line 393, in callback
    self._startRunCallbacks(result)
  File "/home/buildmaster/venv/lib/python2.7/site-packages/twisted/internet/defer.py", line 501, in _startRunCallbacks
    self._runCallbacks()
  File "/home/buildmaster/venv/lib/python2.7/site-packages/twisted/internet/defer.py", line 588, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/home/buildmaster/venv/lib/python2.7/site-packages/twisted/internet/defer.py", line 1184, in gotResult
    _inlineCallbacks(r, g, deferred)
--- <exception caught here> ---
  File "/home/buildmaster/venv/lib/python2.7/site-packages/twisted/internet/defer.py", line 1128, in _inlineCallbacks
    result = g.send(result)
  File "/home/buildmaster/venv/lib/python2.7/site-packages/buildbot/changes/hgpoller.py", line 287, in _processChanges
    when_timestamp=int(timestamp),
exceptions.TypeError: int() argument must be a string or a number, not 'NoneType'

The problem seems to be in buildbot.changes.HgPoller?._processChanges():

...
when_timestamp=int(timestamp)
...

In branch 'eight' epoch2datetime() is used:

...
when_timestamp=epoch2datetime(timestamp)
...

Change History (4)

comment:1 follow-up: Changed 2 years ago by gracinet

  • Owner set to gracinet
  • Status changed from new to assigned

Thanks for the report !

After comparison with buildbot.util.epoch2datetime in Eight and GitPoller in Nine, it seems that simply forwarding None in that case is the way to go. Should be easy to reproduce with a unit test.

I'll look into it unless you want to do it yourself of course

comment:2 in reply to: ↑ 1 Changed 2 years ago by mab

Replying to gracinet:

Thanks for the report !

After comparison with buildbot.util.epoch2datetime in Eight and GitPoller in Nine, it seems that simply forwarding None in that case is the way to go. Should be easy to reproduce with a unit test.

I'll look into it unless you want to do it yourself of course

I would like to give it a shot.

But it might be a few days until I can find the time to do it.

comment:4 Changed 2 years ago by mab

The pull request is merged and closed.

Note: See TracTickets for help on using tickets.