-
Notifications
You must be signed in to change notification settings - Fork 27
Incompatibilities between git_buildbot.py with Python2 and Buildbot 1.7.0 on Python3 #18
Description
I had Buildbot running fine with git integration using git_buildbot.py using the official Docker container for 1.6.0. The git server is running a Debian stable (9.6) with all packages installed from the official APT repositories, which is python-twisted 16.6.0.
After updating Buildbot to version 1.7.0 (the Docker container of which runs on Python3) commits would no longer trigger a new build. Instead the following error was printed to the log:
2019-02-19 15:53:50+0000 [Broker,0,172.16.1.233] perspective_addChange called
2019-02-19 15:53:50+0000 [Broker,0,172.16.1.233] No files listed in change... bit strange, but not fatal.
2019-02-19 15:53:50+0000 [Broker,0,172.16.1.233] <bound method ChangePerspective.perspective_addChange of <buildbot.changes.pb.ChangePerspective object at 0x7fa9fddf44e0>> didn't accept ({b'files': ['a'], b'src': 'git', b'who': 'Lennart Sauerbeck <REDACTED>', b'comments': 'Updating a\n', b'branch': 'LeS_git_buildbot', b'revision': 'edd85cad55180f0ba1b549668c9bf49bef7bc547', 'files': []},) and {}
2019-02-19 15:53:50+0000 [Broker,0,172.16.1.233] Peer will receive following PB traceback:
2019-02-19 15:53:50+0000 [Broker,0,172.16.1.233] Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/twisted/spread/banana.py", line 173, in gotItem
self.callExpressionReceived(item)
File "/usr/lib/python3.6/site-packages/twisted/spread/banana.py", line 136, in callExpressionReceived
self.expressionReceived(obj)
File "/usr/lib/python3.6/site-packages/twisted/spread/pb.py", line 621, in expressionReceived
method(*sexp[1:])
File "/usr/lib/python3.6/site-packages/twisted/spread/pb.py", line 1025, in proto_message
self._recvMessage(self.localObjectForID, requestID, objectID, message, answerRequired, netArgs, netKw)
--- <exception caught here> ---
File "/usr/lib/python3.6/site-packages/twisted/spread/pb.py", line 1054, in _recvMessage
netResult = object.remoteMessageReceived(self, message, netArgs, netKw)
File "/usr/lib/python3.6/site-packages/twisted/spread/pb.py", line 245, in perspectiveMessageReceived
state = method(*args, **kw)
File "/usr/lib/python3.6/site-packages/buildbot/changes/pb.py", line 94, in perspective_addChange
d = self.master.data.updates.addChange(**changedict)
builtins.TypeError: unwindGenerator() keywords must be strings
Searching the Web I stumbled upon an old Twisted Ticket https://twistedmatrix.com/trac/ticket/9047
which seems to describe the same issue.
I fixed the issue by prepending all dictionary keys in git_buildbot.py with u. If that is an acceptable solution and also works for Python2-->Python2 communication I'd be happy to create a pull request.
Originally I updated the Buildbot master directly to 2.0.0, where this issue also exists, but then downgraded it to find the first version which doesn't behave as expected.