Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

github_buildbot.py error on PR creation and Merge #7

Open
WayneKeenan opened this issue Nov 28, 2017 · 4 comments
Open

github_buildbot.py error on PR creation and Merge #7

WayneKeenan opened this issue Nov 28, 2017 · 4 comments

Comments

@WayneKeenan
Copy link

WayneKeenan commented Nov 28, 2017

I've created a GitHub app with very permissive permissions, and only enabling push and pull requests events, as per the script comments.

But there is a keywords must be strings error being raised for both events.

Perhaps of interest is that the only file in the PR is missing in the PR creation, but present in the subsequent PR merge.

The GitHub 'Recent Deliveries' status pages shows ok responses.

Buildbot version: 0.9.13
Twisted version: 17.9.0

PR Creation error:

2017-11-28 20:38:33+0000 [Broker,2,192.168.1.15] perspective_addChange called
2017-11-28 20:38:33+0000 [Broker,2,192.168.1.15] No files listed in change... bit strange, but not fatal.
2017-11-28 20:38:33+0000 [Broker,2,192.168.1.15] <bound method ChangePerspective.perspective_addChange of <buildbot.changes.pb.ChangePerspective object at 0x73d9e190>> didn't accept ({b'repository': 'https://github.com/WayneKeenan/python-bleson', 'files': [], b'who': 'WayneKeenan', b'branch': 'refs/pull/11/head', b'project': 'WayneKeenan/python-bleson', b'revision': 'e8a68002de8e805a51a260689ec442998c94ad1c', b'src': 'git', b'revlink': 'https://github.com/WayneKeenan/python-bleson/pull/11', b'files': [], b'comments': ''},) and {}
2017-11-28 20:38:33+0000 [Broker,2,192.168.1.15] Peer will receive following PB traceback:
2017-11-28 20:38:33+0000 [Broker,2,192.168.1.15] Unhandled Error
	Traceback (most recent call last):
	  File "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/site-packages/twisted/spread/banana.py", line 173, in gotItem
	    self.callExpressionReceived(item)
	  File "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/site-packages/twisted/spread/banana.py", line 136, in callExpressionReceived
	    self.expressionReceived(obj)
	  File "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/site-packages/twisted/spread/pb.py", line 621, in expressionReceived
	    method(*sexp[1:])
	  File "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/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 "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/site-packages/twisted/spread/pb.py", line 1054, in _recvMessage
	    netResult = object.remoteMessageReceived(self, message, netArgs, netKw)
	  File "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/site-packages/twisted/spread/pb.py", line 245, in perspectiveMessageReceived
	    state = method(*args, **kw)
	  File "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/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
	

PR Merge error:

2017-11-28 20:39:24+0000 [Broker,3,192.168.1.15] perspective_addChange called
2017-11-28 20:39:24+0000 [Broker,3,192.168.1.15] No files listed in change... bit strange, but not fatal.
2017-11-28 20:39:24+0000 [Broker,3,192.168.1.15] <bound method ChangePerspective.perspective_addChange of <buildbot.changes.pb.ChangePerspective object at 0x73d9e4f0>> didn't accept ({b'repository': 'https://github.com/WayneKeenan/python-bleson', 'files': [], b'who': 'WayneKeenan <wayne.keenan@gmail.com>', b'branch': 'master', b'project': 'WayneKeenan/python-bleson', b'revision': '001ce77febf7812603a50cdf8a1d48b23ed33d59', b'src': 'git', b'revlink': 'https://github.com/WayneKeenan/python-bleson/commit/001ce77febf7812603a50cdf8a1d48b23ed33d59', b'files': ['tox.ini'], b'comments': 'test'},) and {}
2017-11-28 20:39:24+0000 [Broker,3,192.168.1.15] Peer will receive following PB traceback:
2017-11-28 20:39:24+0000 [Broker,3,192.168.1.15] Unhandled Error
	Traceback (most recent call last):
	  File "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/site-packages/twisted/spread/banana.py", line 173, in gotItem
	    self.callExpressionReceived(item)
	  File "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/site-packages/twisted/spread/banana.py", line 136, in callExpressionReceived
	    self.expressionReceived(obj)
	  File "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/site-packages/twisted/spread/pb.py", line 621, in expressionReceived
	    method(*sexp[1:])
	  File "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/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 "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/site-packages/twisted/spread/pb.py", line 1054, in _recvMessage
	    netResult = object.remoteMessageReceived(self, message, netArgs, netKw)
	  File "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/site-packages/twisted/spread/pb.py", line 245, in perspectiveMessageReceived
	    state = method(*args, **kw)
	  File "/opt/thebubbleworks/rogue1/pyenv/rogue1_buildbot_master_env/lib/python3.5/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
	
@WayneKeenan WayneKeenan changed the title github_buildbot.py out github_buildbot.py error on PR creation and Merge Nov 28, 2017
@tardyp
Copy link
Member

tardyp commented Nov 28, 2017

Hi,
github_buildbot has been developed on python2.7, and is most probably not compatible with python3.
I would recommend you to use the newer webhook method in order to integrate with github.
http://docs.buildbot.net/latest/manual/cfg-wwwhooks.html#github-hook

@WayneKeenan
Copy link
Author

Hi,
I am using python 2.7 for the script and 3.6 for the master. I thought it being 3 years old might be a factor, this is my first time in the GitHub hooks/apps corner.
Thanks for the info, I will take a look.
Cheers
Wayne

@WayneKeenan
Copy link
Author

Although, I did use the script because I wanted to reverse proxy the request thru it. (As the note on that link suggests todo if you dont/can't expose the master publicly)

I think that it's a valid architectural option so would be keen to see the script working. Or use nginx I guess.

Thanks
Wayne

@tardyp
Copy link
Member

tardyp commented Nov 29, 2017

Yes, I recommand to use nginx if you do not want to expose the whole buildbot REST api to the marvels of the internet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants