buildbot_travis icon indicating copy to clipboard operation
buildbot_travis copied to clipboard

cannot work after install and config in GitHub EE

Open meritozh opened this issue 7 years ago • 4 comments

Followed this https://medium.com/buildbot/using-hyper-sh-to-deploy-your-buildbot-126888e1164d I config this by webUI, set number of local workers to 8, then generate tokens, webhook (push and PR), set payload URL, then delivery payload, github EE show me 200, success

screen shot 2018-01-08 at 3 59 55 pm

My .travis.yml:

script:
  - echo 'test CI'

then, when I push to this repo, github EE webhooks show me 500, failed

screen shot 2018-01-08 at 4 02 13 pm

This is twistd.log:

2018-01-08 15:24:52+0800 [_GenericHTTPChannelProtocol,39,10.200.55.139] X-GitHub-Event: push
2018-01-08 15:24:52+0800 [_GenericHTTPChannelProtocol,39,10.200.55.139] New revision: 21126b0f
2018-01-08 15:24:52+0800 [_GenericHTTPChannelProtocol,39,10.200.55.139] adding changes from web hook
	Traceback (most recent call last):
	  File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot/www/hooks/github.py", line 334, in getChanges
	    return self.handler.process(request)
	  File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 1532, in unwindGenerator
	    return _inlineCallbacks(None, gen, Deferred())
	  File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 1386, in _inlineCallbacks
	    result = g.send(result)
	  File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot/www/hooks/github.py", line 89, in process
	    result = yield defer.maybeDeferred(lambda: handler(payload, event_type))
	--- <exception caught here> ---
	  File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
	    result = f(*args, **kw)
	  File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot/www/hooks/github.py", line 89, in <lambda>
	    result = yield defer.maybeDeferred(lambda: handler(payload, event_type))
	  File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot/www/hooks/github.py", line 149, in handle_push
	    event, properties)
	  File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot/www/hooks/github.py", line 287, in _process_change
	    change['codebase'] = self._codebase(payload)
	  File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot_travis/vcs/github.py", line 28, in getCodebaseForGitHubChange
	    return getCodebaseForRepository(payload['repository']['html_url'])
	  File "/Users/xxx/BuildBot/bb-travis/sandbox/lib/python3.6/site-packages/buildbot_travis/vcs/base.py", line 178, in getCodebaseForRepository
	    return repository_db_by_url[url].name
	builtins.KeyError: u'<my_repo_url>'

But when I force build it, builder will block, can only show preparing worker. And I cannot stop this builder.

Do I missing some steps?

meritozh avatar Jan 08 '18 08:01 meritozh

~~Another python3 compatible problem?~~

Test in python2, force build works, but when push(I can not test PR event), GitHub EE repo webhook still show 500, failed , twistd.log same as above.

meritozh avatar Jan 08 '18 08:01 meritozh

@tardyp After reading doc and source code, I think I need set github_api_endpoint to proper value, but sorry for that I am a newbie in python, can you provide a configuration detail?

meritozh avatar Jan 08 '18 17:01 meritozh

After change all api.github.com to <github_ee_instance_host_url>/api/v3 in buildbot repo, install master from source, same error as above. DB is empty?

meritozh avatar Jan 09 '18 03:01 meritozh

Solved. Source code use payload['repository']['html_url'], but I just use the url in Clone with HTTPS which contains .git.

Finally, Am I need set github_api_endpoint? If yes, how to set?

Thx.

meritozh avatar Jan 09 '18 05:01 meritozh