[Buildbot-commits] [Buildbot] #2206: Change Hooks always return a HTTP 500 error
Buildbot
nobody at buildbot.net
Thu Feb 16 23:15:01 UTC 2012
#2206: Change Hooks always return a HTTP 500 error
---------------------+----------------------------------------------
Reporter: kalessin | Owner:
Type: defect | Status: new
Priority: major | Milestone: undecided
Version: master | Keywords: master, status, web, change_hook
---------------------+----------------------------------------------
Hello,
I recently added support for the Google Code webhook in buildbot's
change_hooks.
But I noticed that even when the Google POST request is correctly parsed
(and the changes correctly returned to
[https://github.com/buildbot/buildbot/blob/master/master/buildbot/status/web/change_hook.py#L77
buildbot.status.web.change_hook.ChangeHookResource.getChanges]), buildbot
was returning a 500 error to Google Code (then Google Code resubmits the
request which triggers a lot of builds for the same revision).
Here is an example:
{{{
> 2012/02/16 05:36:36.576258 length=2128 from=0 to=2127
POST /change_hook/googlecode HTTP/1.1\r
Google-Code-Project-Hosting-Hook-HMAC: 59721811b23b664451aad75dc8cb03ff\r
Content-Type: application/json; charset=UTF-8\r
User-Agent: Google Code Project Hosting
(+http://code.google.com/p/support/wiki/PostCommitWebHooks)\r
Host: builds.rathaxes.org:20096\r
Content-Length: 1788\r
Accept-Encoding: gzip\r
\r
{"repository_path":"https://code.google.com/p/rathaxes/","project_name":"rathaxes","revisions":[{"added":[],"parents":["8021567e5b325faf82150f85b91e49cc3e5f7aa1"],"author":"David
xxxxxx
\\u003Cdav.xxxxxx at gmail.com\\u003E","url":"http://rathaxes.googlecode.com
/hg-
history/068f44aee029127b0fc45af999b8d4c131e54fa7/","timestamp":1329355433,"message":"rathaxes:
compiler: Fix the builtins and the way to manage the config matching to
reflect the recent
changes.","path_count":11,"removed":[],"modified":["/rathaxes/compiler/rtxLink/rtxLink_ConfigMatcher.inc.cws","/rathaxes/compiler/rtxNode/rtxNode.inc.cws","/rathaxes/compiler/rtxType/rules_types/number.inc.cws","/rathaxes/compiler/rtxType/rules_types/string.inc.cws","/rathaxes/compiler/rtxType/rules_types/symbol.inc.cws","/rathaxes/compiler/tests/03_A_test_config_match_lesser.cws","/rathaxes/compiler/tests/03_B_test_config_match_lesser_or_equal.cws","/rathaxes/compiler/tests/03_C_test_config_match_equal.cws","/rathaxes/compiler/tests/03_D_test_config_match_greater_or_equal.cws","/rathaxes/compiler/tests/03_E_test_config_match_greater.cws","/rathaxes/compiler/tests/03_F_test_config_match.cws"],"revision":"068f44aee029127b0fc45af999b8d4c131e54fa7"},{"added":[],"parents":["068f44aee029127b0fc45af999b8d4c131e54fa7","819e991f716f24a5eb7ee7ec1fb1d6f60b5f1f94"],"author":"David
xxxxxx
\\u003Cdav.xxxxxx at gmail.com\\u003E","url":"http://rathaxes.googlecode.com
/hg-
history/69e66ba52716815d2b358c22b4260234962235cf/","timestamp":1329355461,"message":"merge","path_count":3,"removed":[],"modified":["/rathaxes/compiler/rtxType/rules_types/number.inc.cws","/rathaxes/compiler/rtxType/rules_types/string.inc.cws","/rathaxes/compiler/rtxType/rules_types/symbol.inc.cws"],"revision":"69e66ba52716815d2b358c22b4260234962235cf"}],"revision_count":2}
< 2012/02/16 05:36:36.598502 length=548 from=0 to=547
HTTP/1.1 500 Internal Server Error\r
Date: Thu, 16 Feb 2012 05:36:36 GMT\r
Content-Length: 385\r
Content-Type: text/html; charset=utf-8\r
Server: TwistedWeb/11.1.0\r
\r
<html>
<head><title>500 - Request did not return a string</title></head>
<body>
<h1>Request did not return a string</h1>
<p>Request: <pre><POST /change_hook/googlecode
HTTP/1.1></pre><br />Resource:
<pre><buildbot.status.web.change_hook.ChangeHookResource instance at
0x2075cf8></pre><br />Value: <pre><Deferred at
0x2d6cea8></pre></p>
</body>
</html>
}}}
I'm not familiar with Twisted at all, so I'm not sure what the problem is.
Could that be something missing in
[https://github.com/buildbot/buildbot/blob/master/master/buildbot/status/web/change_hook.py#L51
ChangeHookResource.render_POST] to indicate that the request is a success?
Thanks
--
Ticket URL: <http://trac.buildbot.net/ticket/2206>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the Commits
mailing list