Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot work after install and config in GitHub EE #80

Open
meritozh opened this issue Jan 8, 2018 · 4 comments
Open

cannot work after install and config in GitHub EE #80

meritozh opened this issue Jan 8, 2018 · 4 comments

Comments

@meritozh
Copy link

meritozh commented Jan 8, 2018

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
Copy link
Author

meritozh commented Jan 8, 2018

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 meritozh changed the title cannot work after install and config cannot work after install and config in GitHub EE Jan 8, 2018
@meritozh
Copy link
Author

meritozh commented Jan 8, 2018

@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
Copy link
Author

meritozh commented Jan 9, 2018

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
Copy link
Author

meritozh commented Jan 9, 2018

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.

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

No branches or pull requests

1 participant